Grab a Byte

In this project we coded Arduino UNO circuit boards so that they had an output that we could use to turn on and off an LED. We used a software called tinker cad to get a feel for what we were doing and to get a little comfortable with the Arduino's and coding them.


Led - Blink

This shows a Arduino UNO in tinker cad with jumper wires, a resistor, and an LED to create a full circuit with the Arduino powering it and coded it so that it blinked.

This is the coed that allows the LED to blink. The first line "void setup(){}" lets the Arduino know what pin to give an output. You would place it inside the brackets( {} ) and use pinMode(__, OUTPUT);, the underscore is blank and is replaced with a pin number that you plan on using. Then "void loop(){}" to loop the following code and again you insert what you output you want the pen to do, whether that's high or low and you use the delay so that LED will be lit up for a custom amount of milliseconds.

This is a physical form of what I made in tinker cad. In the photo, the LED is lit to show that it worked.

This is the exact same code as from tinker cad. I like to use pin 13 because it is right next to the ground pin.

IMG_0388.MOV

This is a video of the physical form working.

led - stoplight

This is the stoplight in tinker cad. To let each LED blink at a different time you have to give each one its own pin and resistor.

This is the code for the stoplight. In "void setup(){}" you can select as many pins as you want to give an out put. Like a real stoplight each LED has a different blink pattern.

This is a physical form of what I made in tinker cad. In the photo, one of the LED's is lit to show that it worked.


This is the exact same code as from tinker cad. I like to use the pin that are closer to ground just to make thinks a little cleaner.

IMG_0396.MOV

This is a video of the physical form working.