Flattr this  

Categories

Archives

Elsewhere

     

QR Code

QR Code

GLCD Screens and Touchscreens with the Arduino

I’ve been playing with some more GLCDs (Graphical Liquid Crystal Displays) recently, along with a Nintendo DS touchscreen. The parallel KS0108 display I used for my emonGLCD used an awful lot of pins, 16 including the power, which doesn’t leave a lot left over for anything else, so I thought I would try some of the serial displays that are available, one from SparkFun and a nice one from Adafruit that has a RGB backlight, you can see a montage of pictures of this display on the right.

Interfacing with and coding for each of these displays is subtly different as there isn’t a single unified Arduino library but none of them are complicated, it’s basically commands to move to a particular pixel of the display, select a font and print it, or for boxes, lines etc. you need to provide coordinates for the start and end points.

In combination with these screens I’ve also been experimenting with the Nintendo DS Touchscreen which is available on its own from a number of suppliers and makes for a cost effective method of adding touch control to screens of this size. When you only want to detect relatively large areas of the screen, such as for a menu, they are very easy to use.

Continue reading GLCD Screens and Touchscreens with the Arduino

TwitterFacebookRedditDiggStumbleUponDeliciousShare

Arduino GPS Display

I recently salvaged a Navman Jupiter 12 GPS module (a TU35-D410-041) from an old Phantom vehicle tracking device that I got for free and have been experimenting with connecting it to an Arduino Duemilanove and a spare HD44780 compatible 4×20 LCD display that I had lying around.

Once I had found the datasheet for the GPS module online I realised this would be very easy to connect to an Arduino as it has a simple 4800,N,8,1 serial output and supports NMEA-0183 v2.1 messages.

This gives a string containing the GPS data (known as an NMEA sentence) such as:
$GPRMC,190615,A,5323.3339,N,00234.9969,W,0.483,72.4,080711,3.4,W*4D 
Which includes the time, whether the GPS fix is valid or not, latitude, longitude, speed, bearing, date, and magnetic variation. Easy enough to parse into something a bit more human readable.

The GPS module only needs 4 or 5 wires connecting:

Pin 1 (Antenna preamp VDC input): connected to 5V output on Arduino (only required for active antennas)
Pin 4 (3.3-5VDC): Connected to 5V output on Arduino
Pin 18 (GND): Connected to ground on Arduino
Pin 11 (Serial Out): Connected to Pin 0 (RX) on Arduino
Pin 7 (Protocol Select): Connected to ground on Arduino (forces NMEA output)

The datasheet says pin 5 (master reset) should be connected via a 47K resistor to Vcc (grounding it causes a reset) but I found it works fine without this connected.

The LCD is a 4 line 20 character display I bought from Milford Instruments many years ago for a long forgotten and never completed project, it is compatible with the Hitachi HD44780 which makes interfacing it with the Arduino in 4-bit mode very easy using the LiquidCrystal library. This is the same display I used to make a Twitter display last year.

Continue reading Arduino GPS Display

TwitterFacebookRedditDiggStumbleUponDeliciousShare

The TiVo AltEPG Project

In early 2000 TiVo launched their revolutionary Linux based PVR in the UK in partnership with Sky TV and it soon picked up a loyal fanbase. Unfortunately due to a lack of marketing it never took off as it should have and TiVo pulled out of the UK in January 2003 and Sky later went on to develop their own PVR with Sky+ but it was a poor substitute for a TiVo. The UK TiVo, manufactured by Thomson was originally launched at £300 plus a monthly or lifetime subscription, I picked mine up in November 2002 for £99 as Curry’s were clearing the remaining stock out and went for the £199 lifetime subscription which turned out to be a good move saving me over £800 in the 8.5 years I’ve had it.

Late last year Virgin Media announced they would be partnering with TiVo for their new PVR, nice to have new TiVo hardware in the UK after all these years but not everyone wants or can get Virgin cable. Still, we had our old series 1 boxes still didn’t we… but not for much longer if TiVo had their way, in a spectacular show of disregard for their loyal fanbase they made the unfortunate decision to cut off all existing monthly and lifetime subscribers, rewarding them for their loyalty by effectively leaving them with a useless box.

The King is dead. Long live the King.

Step forward the AltEPG project. A team of people from the tivoland forum decided this wasn’t going to be the end of our beloved series 1 TiVo so they got together to set up their own EPG service, gathering data from free sources around the net and compiling it into a compatible format. Getting modified TiVo boxes to connect to the new service would be easy but what about all those unmodified boxes out there that could only dial up to the preconfigured TiVo number? Well fortunately the TiVo software allows the entry of a dial prefix, eg. a number the box might have to dial to get an outside line, this prefix will take enough digits to allow a full phone number to be entered, the TiVo then dials the prefix and connects to the new number with the original number being dialled afterwards but ignored by the phone system. A nice trick. With only one line available during testing it was hard to get connected but since then several individuals who run their own companies have stepped forward to provide lines for use with the AltEPG project with one recent number having 60 lines meaning you should no longer struggle to get a connection.

To connect your unmodified TiVo to AltEPG follow these steps.
Continue reading The TiVo AltEPG Project

TwitterFacebookRedditDiggStumbleUponDeliciousShare

FIGnition: Build your own 8-bit computer

Build a computer from components in an afternoon? How could I resist?

Using only 3 chips and only 46 components in total, the FIGnition is a brand new 8-bit computer designed by Julian Skidmore that you can build yourself. It runs a variant of FIG-Forth and is based around the Atmel AVR microcontroller (an AtMega168), along with 8Kb of RAM and 384 Kb of flash storage and is controlled from an 8 key onboard keypad with video output by way of a PAL composite video output.

Despite its simple construction and minimal components the FIGnition is a fully functional computer, you can write programs on it in Forth using the onboard keypad and save them to its Flash chip; access the AVR’s hardware registers, video RAM, system clock and you can even define your own graphics characters. Thanks to the ability to upgrade the firmware over USB you can look forward to new features and performance improvements in the future and the entire hardware design, PCB layouts, firmware and documentation will all be release under an open source licence very soon.

FIGnition features:

  • A Boot-up time of <1s!
  • 8Kb of RAM, enough for around 2000 lines of Forth code.
  • At least 384Kb of Storage. You can edit your programs and store them for later use, building up your own libraries of code.
  • User-defined graphics! – FIGnition is designed to be used practically (within its hardware limitations), it’s not a crippled machine designed to let you print “Hello World.” FIGnition allows you to write a variety of games using your own graphic designs.
  • Upgradeable firmware – simply download the latest firmware from the Fignition website and upload it on your FIGnition via USB and avrdude.
  • A fantastic 4 spare I/O ports for you to attach your own electronics! Control your own power station eh?
  • FIGnition is already 4x faster than the definitive Forth computer, the Jupiter-Ace (which routinely sells on eBay for hundreds of pounds) and seriously faster when running Forth than any early 80s home computer. It’s fast enough to run some classic games and it’s not even optimised yet!
  • Programmable in-situ using an efficient 8-key keypad!

For more information see the FIGnition website and the FIGnition Google Group. FIGnition was also featured on the BBC News website last month.

FIGnition kits are currently available on eBay for £19.95 inc P&P but don’t hang around, the first batch sold out very quickly. The kit includes the PCB and all the components and is very easy to build using the online instructions, it took me just over an hour to finish the soldering and it worked first time. It’s always very satisfying to build something yourself and see it working and the FIGnition would be a great introduction to electronics for kids, I hope it is a great success and look forward to more interesting developments from Julian.

TwitterFacebookRedditDiggStumbleUponDeliciousShare

IOIO Input/Output board for Android

I’ve just received one of these wonderful little I/O boards for Android. The IOIO connects to an Android phone or tablet via USB allowing it to act on external inputs and control external devices, no modification of the Android device is required and no firmware programming is necessary, just ordinary Android application authoring with a very simple API for controlling the pins on the board. Optionally it can also provide power to charge the phone or even run some external devices such as small servos.

By allowing you to use all the computing power and connectivity of an Android device along with its built in sensors and devices such as the display, camera, GPS, Bluetooth, WiFi, gyroscope, accelerometer etc. for interfacing with external peripherals the IOIO opens up a whole world of possibilities. I don’t have any specific use in mind for mine at the moment, I’ll just be experimenting for now but there is obviously huge potential there.

IOIO Main Features:

  • 48 I/O pins – all of which can function as digital inputs and outputs
  • Up to 16 analogue inputs (10-bit)
  • Up to 9 PWM outputs
  • Up to 4 UART channels
  • Up to 3 SPI channels
  • Up to 3 TWI (I²C-compatible) channels
  • On-board switch-mode regulator providing up to 1.5A of 5V supply.
  • Can charge the Android device as well as power a couple of small motors
  • Bootloader on the board pulls firmware off phone, enabling OTA firmware upgrades and application-specific firmware.
  • Pulse-width measurement, capacitance sensing and more (will be pushed with first OTA firmware upgrade)

The Android Open Accessory Development Kit (ADK) recently announced at Google I/O has some similarities but for the hobbyist the IOIO has some major benefits compared to the ADK as it currently stands. The IOIO is a lot cheaper for starters (50USD v 400USD) and is easier to use since you only will need to write code for your app, no embedded programming in C++ is needed and whereas the ADK requires Android 2.3.4 or higher the IOIO will work on 1.5 or above so recycling old handsets for use in a project is possible. It is hoped that the ADK protocol can be added to the IOIO in future.

The IOIO is open source (both hardware and software) and was developed by Ytai. It is available to buy online from SparkFun here.

There is an online user guide available, a discussion group and a great beginners guide from SparkFun here.

TwitterFacebookRedditDiggStumbleUponDeliciousShare

Installing Android 2.3 Gingerbread on the HTC Desire

As a follow up to my Android 2.2 guide from July here is how to install Android 2.3 Gingerbread on the GSM HTC Desire using AdamG’s Oxygen V2.0 Gingerbread ROM.

This is a clean ROM built from the Android Open Source Project aka AOSP so doesn’t have HTC Sense. If you like the Sense UI you might want to check out LauncherPro in the Android Market which offers a lot of similar features. Note that video recording doesn’t work at the moment but this will be resolved once the Nexus One gets its OTA update which should be in the next few weeks.

I’ll assume your phone is already rooted, if not follow step 1 from the 2.2 Froyo guide here first.

As always you do this at your own risk and note that technically you will void any warranty you may have.

Download the following files (don’t unzip them):

Updated Radio ROM from here (11.3 MB)
Oxygen Gingerbread ROM from here (59 MB)

Installing Gingerbread: Continue reading Installing Android 2.3 Gingerbread on the HTC Desire

TwitterFacebookRedditDiggStumbleUponDeliciousShare

Sniper SelfTrack App for Android

One of the driving forces behind my switch from the iPhone to Android was the ease and openness of the development platform and that development didn’t require a Mac. It didn’t take me long to get stuck into the SDK and I am pleased to say that my first Android app has been published onto the Android Market today. “Sniper SelfTrack” is an application to control and handle responses from the Sniper SelfTrack GPS vehicle tracking device.

The SelfTrack app allows the user to easily control all the functions of the Sniper SelfTrack tracking system from the main screen and will display user friendly messages on receipt of a message from the tracker and shows the vehicles position using the Google Maps API. Context sensitive help is available by pressing and holding each button and the user can select the sound played on receipt of an alert as well as if they want haptic feedback (vibrate on button presses) and whether to load the basic map only or the full aerial photograph view (slower on a mobile connection).

Features:

  • Show current location of vehicle with map only or aerial view
  • User friendly display of messages from the tracker
  • Customisable alert sounds
  • Listen in to the vehicle
  • Turn AutoTrack on/off
  • Turn immobiliser on/off
  • Turn Tow Alert on/off
  • Turn Alarm Alert on/off
  • Turn Overspeed Alert on/off
  • Change Overspeed setting
  • Get a status report from the tracker including battery voltage, GPS status, GSM signal

You can find the application by searching for Sniper SelfTrack in the Android Market app or by clicking here on your phone . You can also find it on AppBrain here. Obviously it is only going to be of any use if you have one of the Sniper trackers in your car.

I’ve really enjoyed getting back into some non web based coding. I’ve never seriously programmed in Java before but it’s sufficiently C like that it didn’t take me long to get to grips with it along with the Android specific things like the BroadcastReceivers, Intents, SmsManager and the Google Maps API. Everything is so well structured and documented that anyone with a rudimentary background in programming shouldn’t have any problem getting started.

An application like this that only works with a specific device is going to have a limited market admittedly so I’m hoping I can come up with something with a wider appeal for my next project – let me know in the comments if you have any ideas for apps you would like to see available on Android.

TwitterFacebookRedditDiggStumbleUponDeliciousShare

Ubuntu 10.10 for the O2 Joggler

I’ve been trying a new Ubuntu 10.10 (Maverick) image out on my O2 Joggler this week and it is a big improvement over the 9.04 images I’ve been using previously and everything works out of the box without any fiddling.

The image includes all the software normally shipped with the base Ubuntu distribution with the addition of the Chromium browser and Florence on-screen keyboard (see screenshot) which is a huge improvement to the CellWriter keyboard I had been using before. It also includes fixes to the brightness applet so it is usable from the touchscreen and fully working sound through external jack and speakers although this is currently only switchable after a reboot.

Use of the new btrfs filesystem with compression enabled means the install only takes 1.1GB of space as opposed to 2.5GB without compression and it includes EMGD drivers v1.5 and working Compiz and OpenGL however anyone running XBMC should note that it currently doesn’t work with the EMGD driver, nor does the new Ubuntu Unity desktop intended for netbooks.

Download the Ubuntu Maverick 10.10 image for the O2 Joggler.

Linux Mint
Images for Linux Mint 9 and 10 RC are also available from the same site.

TwitterFacebookRedditDiggStumbleUponDeliciousShare

Google Apps Accounts and the Android Market

Android & Puppy
Creative Commons License Photo credit: jyri

Anyone with a Google Apps account (aka Google Apps for Your Domain or GAFYD) will be familiar with the discrepancies regarding certain Google services and their availability to Apps users. Google Reader for example requires a normal Google Account, an Apps account won’t do. The way round this is to create a separate Google Account using your Apps email address but this leaves you with two separate accounts with no integration and duplication of some services such as Google Docs. All in all it is a mess.

I came across a doozy of a problem this week though. I recently switched from an iPhone to the HTC Desire which of course runs the Google backed Android OS. Android is pretty tightly integrated with Google, offering automatic email, calendar and contacts syncing among other features and very good it is too.

All went swimmingly until after a week I came across an app I wanted that wasn’t free so I clicked on “buy” in the Android market only to be presented with a selection of strange, yet somehow familiar credit cards to use to make the purchase. This threw me for a minute until I realised they were cards that belong to the company I work for and were assigned to a Google Checkout account associated with my work gmail account. An account I had added to my Desire after adding my personal Google Apps account. Nowhere did the Android Market indicate that it had “chosen” this account.

So how do I switch to my personal apps account? This turned out to be a bit problematic. Actually it’s worse than that, it isn’t possible. A Google Apps account can’t purchase from the Android Market even if you have created a Google Account using the same email address and it is a known, long term problem. I found a workaround here, but it wouldn’t work for me as I’d already added my work gmail account to my phone and that was taking precedence. So, the obvious solution is to delete my work gmail account from my phone yes? No! Android won’t let me delete that account unless I do a factory reset (and lose all data on the phone) because it is “required by some apps”.

In the end I took the easy way out and added my credit card to the Google Checkout account associated with my work gmail account which now leaves me with the risk of accidentally paying for a work purchase with my personal card or purchasing an app using a work card.

I know Google have recently made noises that they are working on sorting this nonsense out but it needs sorting like yesterday!

TwitterFacebookRedditDiggStumbleUponDeliciousShare

Installing Android 2.2 Froyo on a HTC Desire

After over 18 months as a very happy iPhone 3G user I decided it was time to make the switch to Android with the wonderful HTC Desire. As a long term Linux user Android would seem to be my natural place and with the Desire the hardware seems to have pretty much caught up with the Apple world so there was no excuse. Having this great new phone without running the latest and greatest release of Android seemed silly though and not wanting to wait for HTC and O2 to pull their fingers out and release an official update the only answer was to root it and install an unofficial ROM. I was pleasantly surprised how easy this was.

So here is a guide to how I installed Android 2.2 with HTC Sense on my HTC Desire using unrevoked3 and AdamG’s “Official” Froyo HTC Sense ROM (version 1.0c).

Obviously I take no responsibility if you follow this and anything goes wrong but it worked for me on my Desire with HBOOT 80. Rooting using the new unrevoked3 is a breeze and a Goldcard is NOT required and as long as you are careful to make a Nandroid backup of your original setup before flashing a replacement ROM then you can’t really go wrong.

Note that by doing this you will void any warranty you may have.

Requirements:

Linux PC (Ubuntu 10.04 in my case)
HTC Desire
USB Cable
Titanium Backup from the Android Market
Unrevoked3 from here (16.1 MB)
Updated Radio ROM from here (11.3 MB)
Froyo Sense ROM from here (134.4 MB)
About 30 minutes

Continue reading Installing Android 2.2 Froyo on a HTC Desire

TwitterFacebookRedditDiggStumbleUponDeliciousShare