Due Aug.13 - Aug.15
1.Testing compatibility of arduino nano board by using library "blink led"
[code]
void setup(){
Serial.begin(9600);
}
[Explanation]
-This code tells the arduino board that uses serial communication
-We need to set the communication rate which is called Baudrate
-Normally, it puts 9600 as the default value
[code]
void loop(){
Serial.println("Led on, off");
}
[Explanation]
-This function passes one line of strings inside of "___" to the arduino board
[Extra Info.]
-setup() is executed only once either when arduino board has turned on or the board has been reset
-loop() is called infinitely after setup function
2.Changing blink rate of led
[code]
int led = 13;
void setup(){
pinMode(led,output);
}
void loop(){
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
-pinMode function reset pin13 to OUTPUT mode
-digitalWrite function practically makes on(5v)/off(0v)
-delay(1000); stops arduino board for (1/1000milisecond * 1000)
Things to buy for next project
- 10k Ohm 저항
- Bread Board
-포텐셔미터(Potentiometer)
댓글 없음:
댓글 쓰기