02_Switch_input02 by yasusanto

This sketch is missing a short description
This program is very similar to "**e02_Switch_input01**" in principle, except that it sends a more specific human-readable messages to the serial monitor instead of "1"s and "0"s. Again, this program outputs only to [Serial Monitor](https://www.arduino.cc/en/Guide/Environment#serialmonitor) of Arduino. There is no other output (i.e. LEDs are not used). To open Serial Monitor, you need to click the magnifying glass icon at the top-right of Arduino application. ![enter image description here](https://www.arduino.cc/en/uploads/Guide/serial_monitor.png "enter image title here") (Serial Monitor Button) A "**if...then...else**" statement (or conditional statement) determines which message is to be sent (which line of codes to be executed) depending on the state of two switches (see [if...](http://www.arduino.cc/en/Reference/If) in Arduino's reference page). For example, if both switches are pressed ("0" and "0"), Arduino sends "both ON" to the serial monitor. Please note that Arduino ports receive "0" when a switch is pressed. (see [Activ-high and Active-low](http://en.wikipedia.org/wiki/Active-low)) ![enter image description here](http://coadaptable.com/dnb603/DNH603_LEDs+Switches.png "enter image title here")

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:106852" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>