First Project - Switch

Arduino Project 1

The arduino that used is Arduino Uno and my team consist of three people. This first project is to make a LED on when a button is being pushed and off at the time the button is being pushed again. The processes will be shown below.


The first thing to do was gathering the components. (Arduino Uno, breadboard, LED, 220Ohm & 10KOhm Resistor, push button) 

Components
The Circuit
  • The black cable is connecting resistor to ground
  • The red cable is connecting push button to 5V
  • The green cable is connecting resistor to pin number 9
  • The orange cable is connecting LED to pin number 8 

After that, we started to code and uploaded it to the arduino, and we tried until we succeed. Below is the source code that we used. 
Source Code

 and succeed!




That's it, we're done. Thank you and have a good day :)

Source: here




Comments