In mid-2010 I got interested in Ardunios and finally bought one. These are just my notes about using it in various applications and some notes about particular shields.


R3 Cube LCD/Keyboard Display

I picked up the LCD and Keyboard Shield from his eBay store and it arrived less than two weeks later from Hong Kong with some nice stamps on it for my kids’ collections.

This board does use the standard LiquidDisplay library, but not the standard pins:

  • R/S is Arduino pin 8
  • DB4 is Arduino pin 4
  • DB5 is Arduino pin 5
  • DB6 is Arduino pin 6
  • DB7 is Arduino pin 7
  • E is Arduino pin 9

So the instantiation looks like:

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);


The LiquidDisplay library works fine with it.

The keyboard is a bit unusual in that it uses Analog 0 with different values indicating different buttons are pressed. So, to get a value:

buttons = analogRead(0);

// 1023 = no switch pressed
// 723 = SELECT
// 481 = LEFT
// 308 = DOWN
// 130 = UP
// 0 = RIGHT


Or. here is a silly sketch to use it:

#include

// initialize the library with the numbers of the interface pins
//LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup()
{
// set up the LCD's number of rows and columns:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print(“Your msg here”);
}

void loop()
{
int button;

// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):

lcd.setCursor(0, 1);

// analog port 0 is the switch input
//
// 1023 = no switch pressed
// 723 = SELECT
// 481 = LEFT
// 308 = DOWN
// 130 = UP
// 0 = RIGHT

button = analogRead(0);

switch(button)
{
case 0:
lcd.print("RIGHT ");
break;

case 130:
lcd.print("UP ");
break;

case 308:
lcd.print("DOWN ");
break;

case 481:
lcd.print("LEFT ");
break;

case 723:
lcd.print("SELECT");
break;

case 1023:
lcd.print(" ");
break;

default:
lcd.print(button);
}

delay(100);
}



SparkFun Electronics El Escudo

If you can figure out how to make this thing work, please let me know. The schematic shows the gate being triggered by a DC voltage that appears to have no connection with the AC being switched, so I don’t see how it can ever work, but apparently some people have gotten it working. We were pretty excited to get the Arduino control all the electro luminescent wires we have, but haven’t gotten diddly from it yet.