May 15, 2015

One of my favorite shields

 For $4.00 shipped to your door you really can't go wrong with this arduino shield. The unused arduino pins are broken out via pads. I decided to solder on male header pins. The buttons are all tied to analog 0 via a 5 way voltage divider. The reset button is in a not so ideal place but you will get used to it. Below is the code i used to get it up and running. For $4.00 you get 5 buttons and a backlit LCD.

I did read somewhere that you should not pull pin 10 high or you will cause a huge strain on the regulator and possibly blow the atmel chip. I believe this is due to the LCD backlight being on that pin but don't quote me on it.























 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// include the library code:
#include <LiquidCrystal.h>

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

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.setCursor(0,0);
  lcd.print("LCD Key Shield");
  lcd.setCursor(0,1);
  lcd.print("Press Key:");
}

void loop() {
  int x;
  x = analogRead (0);
  lcd.setCursor(10,1);
  if (x < 60) {
    lcd.print ("Right ");
  }
  else if (x < 200) {
    lcd.print ("Up    ");
  }
  else if (x < 400){
    lcd.print ("Down  ");
  }
  else if (x < 600){
    lcd.print ("Left  ");
  }
  else if (x < 800){
    lcd.print ("Select");
  }
}

Reading Resistors With OpenCV



According to the reviews on the play market it sill needs some fine tuning but it is still very useful.

May 10, 2015

Pocket Voltage anyone....

I like this product on Kickstarter.... You are can draw 1.5 amps MAX which should be just fine for tinkering. I don't know if Daniel will meet his goal of $10,000. I don't know how well those dip switches will hold up and how convenient it will be to make  a voltage change.

Pocket Voltage Supply