![Oomlout ARDX Experimenter'S Manual Download Page 11](http://html1.mh-extra.com/html/oomlout/ardx/ardx_experimenters-manual_1639044011.webp)
09
CIRC-01
Code
(no need to type everything in just)
File > Examples > Digital > Blink
(example from the great arduino.cc site check it out for other ideas)
/* Blink
* Turns on an LED on for one second, then off for one second,
* repeatedly.
* Created 1 June 2005 By David Cuartielles
* http://arduino.cc/en/Tutorial/Blink
* based on an orginal by H. Barragan for the Wiring i/o board
*/
int ledPin = 13; // LED connected to digital pin 13
// The setup() method runs once, when the sketch starts
void setup() { // initialize the digital pin as an output:
pinMode(ledPin, OUTPUT); }
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop() {
digitalWrite(ledPin, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // set the LED off
delay(1000); // wait for a second
}
Not Working?
(3 things to try)
More, More, More:
More details, where to buy more parts, where to ask more questions.
http://tinyurl.com/cmn5nh
Making it Better
LED Not Lighting Up?
LEDs will only work in one
direction.
Try taking it out and twisting it
180 degrees.
(no need to worry, installing it
backwards does no permanent
harm)
Changing the pin:
Control the Brightness:
The LED is connected to pin 13 but we can use any of
Along with digital (on/off) control the Arduino can control
the Arduino’s pins. To change it take the wire plugged
some pins in an analog (brightness) fashion. (more details on
into pin 13 and move it to a pin of your choice (from 0-
this in later circuits). To play around with it.
13) (you can also use analog 0-5 analog 0 is 14...)
Change the LED to pin 9: (also change the wire)
ledPin = 13; -> int ledPin = 9;
Then in the code change the line:
int ledPin = 13; -> int ledPin =
newpin
;
Replace the code inside the
{ }
's of
loop()
with this:
Then upload the sketch: (ctrl-u)
analogWrite(ledPin,
new number
);
Change the Blink Time:
(new number) = any number between 0 and 255.
Unhappy with one second on one second off?
0 = off, 255 = on, in between = different brightness
Fading:
In the code change the lines:
digitalWrite(ledPin, HIGH);
We will use another included example program. To open go to.
delay(
time on
); //(seconds * 1000)
File > Examples > Analog > Fading
digitalWrite(ledPin, LOW);
delay(
time off
); //(seconds * 1000)
Then upload to your board and watch as the LED fades in and
then out.
Still No Success?
A broken circuit is no fun, send
us an e-mail and we will get
back to you as soon as we can.
08
CIRC-01
What We’re Doing:
.:Getting Started:.
.:(Blinking LED):.
LEDs (light emitting diodes) are used in all sorts of clever
things which is why we have included them in this kit. We will
start off with something very simple, turning one on and off,
repeatedly, producing a pleasant blinking effect. To get started
grab the parts listed below, pin the layout sheet to your breadboard and then plug everything in.
Once the circuit is assembled you'll need to upload the program. To do this plug the Arduino
board into your USB port. Then select the proper port in
Tools > Serial Port > (the comm
port of your Arduino)
. Next upload the program by going to
File > Upload to I/O Board
(ctrl+U)
. Finally bask in the glory and possibility that controlling lights offers.
If you are having trouble uploading, a full trouble shooting guide can be found here:
http://tinyurl.com/89s2po
The Circuit:
Wire
10mm LED
x1
560 Ohm Resistor
Green-Blue-Brown
x1
2 Pin Header
x4
CIRC-01
Breadboard sheet
x1
Schematic:
Arduino
pin 13
LED
(light emitting diode)
resistor
(560ohm)
(green-blue-brown)
gnd
(ground) (-)
Parts:
Program Not Uploading
This happens sometimes,
the most likely cause is a
confused serial port, you
can change this in
tools>serial port>
.:download:.
breadboard layout sheet
http://tinyurl.com/qukhvc
.:view:.
assembling video
http://tinyurl.com/cwhx27
The Internet
longer lead
+