A New simple Command Line Interface (CLI) to Arduino

Last Updated: April 7th, 2013 by Chris
Filed under: Physical Computing
Tags:

I’ve updated my simple CLI to take advantage of the native String class that is now available in Arduino. This version also uses the serialEvent() loop.

This version also captures backspaces correctly.

Code is after the jump!
Read more »

Arduino and the LiquidCrystal Library

Last Updated: October 20th, 2010 by Chris
Filed under: Physical Computing
Tags:

Synopsis: The Arduino software comes with a built in library for interfacing with Liquid Crystal Displays (LCD). The LiquidCrystal library lets you drive a 4-bit or 8-bit parallel LCD display. This example shows how to wire and program an Arduino and a 16×2 4-bit LCD display (GDM1602K from SparkFun).

Arduino with Adafruit Protoshield and 4Bit LCD from Sparkfun

Arduino with Adafruit Protoshield and 4Bit LCD from Sparkfun

SparkFun carries the cheap (cost, not necessarily quality) GDM1602K 16×2 LCD display (16 characters on 2 lines) with an LED backlight. It has multiple color options (red/black, white/blue, etc.) and runs at 5V (they also have 3.3V versions under a different model number). You need 6 pins on the Arduino to write to the display using 4-bit mode.

Read more »

A simple Command Line Interface (CLI) to Arduino

Last Updated: April 7th, 2013 by Chris
Filed under: Physical Computing
Tags:

Note: a newer version of this sketch is available here.

Synopsis: Example code for creating a CLI that interacts with an Arduino-based microcontroller. Useful for playing with pins, turning them on or off, etc., in real-time, using a terminal program.

This example demonstrates how to create a CLI for an Arduino-based microcontroller. Connect to the Arduino with a terminal application (PuTTY is a good one) to send the commands (the serial monitor included with Arduino is not a good choice for this). The LED on pin 13 turns HIGH and LOW in response to the commands.

Read more »