|
本帖最後由 imingho 於 2016-10-6 19:30 編輯
- int ledpin = 3;
- // the setup routine runs once when you press reset:
- void setup() {
- // initialize the digital pin as an output.
- pinMode(ledpin, OUTPUT);
- }
- // the loop routine runs over and over again forever:
- void loop() {
- digitalWrite(ledpin, HIGH); // turn the LED on (HIGH is the voltage level)
- delay(3000); // wait for a second
- digitalWrite(ledpin, LOW); // turn the LED off by making the voltage LOW
- delay(1000); // wait for a second
- }
複製代碼 |
|