2010年5月29日土曜日

A little modifications of the program and circuit

FOR Emily
this circuit might have a problem. It was worked perfectly yesterday but it burn my LEDs today. I totally do not know why.



This circuit and program are control the LEDs. The green LED lits 0.1 second and 0.1 second later, the Red lits 0.6 second.


I know very very little bit about Java. Java developed from C and the Arduino has similarity with C. Therefore, I can understand the Arduino program little more easier.

I did a modification.

int nko =11;// LED connected to digital pin 11 which is yellow

int ten =13;// LED connected to digital pin 13 which is red



void setup() {
// initialize the digital pin as an output:
pinMode(nko, OUTPUT);
pinMode(ten, OUTPUT);
}



void loop()
{

digitalWrite(nko, HIGH); // set the LED on

delay(1000); // wait for a second

digitalWrite(nko, LOW); // set the LED off
delay(1000); // wait for a second


digitalWrite(ten, HIGH); // set the LED on
delay(6000);

digitalWrite(ten, LOW); // set the LED off
delay(1000);
}

0 件のコメント:

コメントを投稿