Switch with two LED’s – Elora Mastison

I set up a switch with two LED’s and a button as an input, once I knew it was working by just touching them, I tried a few things like leaves, different types of paper, and a little cup of salt water which worked. Made a quick video to show that, the rest of my documentation with code and the boards set up is below the cut.

Code: https://create.arduino.cc/example/builtin/02.Digital%5CButton/Button/preview

I used the example code for a button to work from; played with the outputs until I found that I could copy/paste the LedPin line renaming it LedPino to include pin 9 as an output.


And here is a sketch of how my board was set up, I worked off the example in the powerpoint from Wednesday’s lecture. Tried to keep it organized but it was a little messy!

switch doc 1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s