I'm a programmer, not an electrical engineer. I bought an Arduino to learn how to connect the physical world with the computing one where I know my way around. I hope to post a few howto's when I learn something new.
Most tutorials will explain how to send data from an Arduino (or a connected sensor) to a computer. I want the opposite: send data from my computer to an Arduino Uno bord. Talking with an Arduino over a USB cable is called ‘serial communicaton’ which means you can send one instruction at a time. This may sound slow — and it is — but it's the easiest way to learn how it works.
Connect the Arduino with your computer using a USB cable and open the editor (read the Bare Minimum tutorial if you don't know how). Now load the sketch below and open the Serial Monitor (last button in the Arduino editor toolbar).
Using the input field in the Serial Monitor you can send a 1 to the Arduino board to turn the built-in LED on, anything else will turn it off. The Serial Monitor displays the value the Arduino sent back (the one it got as the input).
This post is open source. Did you spot a mistake? Ideas for improvements? Contribute to this post via Github. Thank you!