Posts tagged ·

shield

·...

16×2 LCD and button shield

Comments Off

I recently picked up this 16×2 character LCD and button shield from DealExtreme. It is similar to the Hitachi based shields and displays sold elsewhere, but with a slightly different pin-out. It still fits right onto the Uno or Duemilanove. For only $6 it’s almost a must in any project toolkit. What’s more, it’s compatible with the LiquidCrystal Arduino library, and very easy to get started with. Just note the modified pin connections, and you’re set to go.

The sketch below will display “hello world”, a counter, and the value of the button presses on the screen. Furthermore, you can use the up and down button to adjust the back-light brightness. Just an example; I’m sure there are unlimited uses for this screen.

Please note, the button values was what I read from my shield, through the analog pin. Although it seems very consistent, other shields might give different readings. It’s probably a good idea to shift off the two least significant bits to allow for some leeway.

// Code under GPL; please see full file for details.

#include <LiquidCrystal.h>

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

void setup() {
  pinMode(10, OUTPUT);  // for backlight adjustment
  
  lcd.begin(16, 2);

  lcd.print("Hello World!");
}

int button_value;

int light = 100;

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis()/1000);
  
  button_value = analogRead(A0);
  
  if (button_value == 132)
    light = min(light + 1, 255);
    
  if (button_value == 306)
    light = max(light - 1, 0);
  
  analogWrite(10, light);  

  String tmp = " ";
  tmp += light;
  tmp += " ";
  tmp += button_value;
  tmp += "   ";  // erase previous digits

  lcd.setCursor(4, 1);  
  lcd.print(tmp);
}

Comments Off

Arduino adapter shield for the RPi

Comments Off

The H recently wrote about the AlaMode board which lets you use Arudino compatible shields with the Raspberry Pi. The board connects to the GPIO headers of the RPi, and exposes the familiar pin-set of the Arudino Uno on top. The AlaMode board also contains a real time clock, which it can provide as an add-on to the RPi which as none.

In fact, from the picture, it looks like the board is a full fledged Arudino itself, with an Atmel 328P chip on top. It should mean that you can program it on-board, directly from the RPi.

The board is selling for $45, but is out-of-stock at SeeedStudio.

Comments Off

Panorama Robots

2 comments

It somehow seems inevitable; if you are into photography and electronics, you want to build a panorama robot. Coupled with very good software to stitch and render a panorama image, the results can be breathtaking even with little effort. For the stitching software, I recommend Hugin, the open source panorama stitcher. On a modern OS; just go yum / apt-get install hugin. For a good intro into setting up and shooting the single frames which goes into your panorama, see Robert. Cailliau’s article.

Once you’ve taken a few pictures, maybe five or even ten with a fairly wide angle lens, you realize that you can get even more detail if you use a zoom lens. Maybe 200 or 300mm. However, now you have to take hundreds of pictures to cover the same area in your finished panorama. This is were the robots come in.

The pocket camera on the turn table below is a very cheap solution; about 15 Euros. I have not found a specific product or manufacture name, though. It shows up in searches for “Panorama Drehteller“. Next to it is a more professional solution, the Gigapan Systems Epic 100 Panorama Robot. It can take a DSL, and pan both horizontally and vertically. You need both if you plan on using a 200mm lens.

So if you’re only into photography, and not DIY and soldering, those are maybe some of the solutions you’d go for. However, if you are able to build one yourself, what is stopping you? Nothing, it seems, judging by the number of home made panorama bots. Here is a Lego Mindstorms competition to build a pano bot with the winners from 2008. Here is a Jason Babcock’s second go at a panoramic turntable, using ULN2004A and BX-24 micro-controller.  And here is T. Emrich’s system which looks like a very solid setup, and clever control: His early work resulted in a horizontal rotation only solution. Later on, he built the GigaPanBot or Gigapixel Panorama Robot with complete freedom on both axis, seen in the picture below. Maybe most impressive, is how the whole system fits into his camera bag.

So what if you want to build your own. Well, nothing is stopping you, and there is plenty of parts to pick up to make a simple first system. Babcock’s first attempt was using a stepper motor from an old fax. Or you could buy a new stepper motors for less than 20 Euros.

To help you on your way, there’s the DollyShield, which I spotted on the Arduino Shield List. It includes control of two DC motors, shutter remote for the camera, joystick buttons and a LCD. “It is designed to provide an inexpensive and easy-to-use interface for two-axis motion control integrated with a camera.”

Arduino Shield List

Comments Off

Jon Oxer has launched a site to catalogue all Arudino shields: Arduino Shield List (shieldlist.org). At the time of writing, there are “pin usage details for 166 shields from 70 makers, and counting!”

Comments Off