LED Bulb

by amycat996 in Craft > Paper

48 Views, 0 Favorites, 0 Comments

LED Bulb

51rJAAd6-5L._AC_SY450_.jpg

Prepare some LED bulbs.

URL Source

https://www.instructables.com/id/Arduino-Blinking-LED/

Things I Changed

S__3571715.jpg

I modified the number of bulbs and the flashing interval.

Write Code

截圖.PNG

void setup(){ // put your setup code here, to run once:

pinMode( 12 , OUTPUT); // sets the digital pin as output pinMode( 11 , OUTPUT); // sets the digital pin as output }

void loop(){ // put your main code here, to run repeatedly: digitalWrite( 12 , HIGH ); // sets the digital pin on/off delay( 500 ); // waits a few milliseconds digitalWrite( 11 , HIGH ); // sets the digital pin on/off delay( 500 ); // waits a few milliseconds digitalWrite( 12 , LOW ); // sets the digital pin on/off delay( 500 ); // waits a few milliseconds digitalWrite( 11 , LOW ); // sets the digital pin on/off delay( 500 ); // waits a few milliseconds }

Video

2020電腦作業