McKeil Michalek's profile

Arduino Programming

Arduino, Programming -
 
One of the projects that was required was a project with Arduino, a programming program that would allow us to code actions and reactions made through the Innovation Board. For this specific project we had to make two lights light up which each of their respective buttons were pressed. To start out the code I announced the components that would remain the same throughout the rest of the code. In the second area provided (the void SETUP[ ] ) I listed what each of the previously made components would be allocated as upon the physical Innovation Board. Getting into the looping area of the command I set up two If - Then - Else statements that basically said, if button 1 is pressed then light 1 lights up, if not then light remains off. Same for button and light #2. Once this code was uploaded to the Innovation Board I had to hook the pins up according to the way that I programmed them. So the LED's were hooked to pins 12 and 13, while the buttons were hooked to 7 and 8. One pin on the button recieved 5 V while the other was hooked to both the ground (through a resister) and to their designated pin. The Positive side of the LED was hooked to its respective pin and the negative was sent to ground through a resistor. After hooking everything up I was able to press the buttons to get each one to light up their respective LED.
Arduino Programming
Published:

Arduino Programming

Programming two LED's to light up when their respective buttons are pressed

Published:

Creative Fields