Why I’m Excited About the New Arduino

Arduino UniMost would expect a newer version to have a faster processor, more memory and stuff like that. Although, there is one thing that makes me particularly excited… the new USB chip. Why?

We replaced the aging FTDI chipset with a custom made usb-serial converter built with an Atmel ATmega8U2 this provides lower latency and <snip> users will be able to reprogram the USB chip to make the board show up as a variety of USB devices (Keyboards, Mice, Joysticks, MIDI etc).

So why is this so exciting? This opens up a whole new world for Arduino developers who can finally make retail quality PC devices using the standard board without having to spend thousands of dollars as they have before.

Expect an explosion of creative devices in the coming months!

Source: http://arduino.cc/blog/2010/09/24/dinner-is-ready/

Disable Mobile Browser Zoom Function

After lots of searching, I struggled to figure out how to disable mobile browsers (i.e. Android/iPhone browsers) zoom function so I thought I would share it since its important for developing games and more advanced mobile sites.
I can confirm that the following works on the Android and iPhone browser. Unfortunately though it does not work on HTC’s custom browser that they have put on most of their Android devices. I have contacted them about this and they informed me that it is impossible. Not happy HTC.


<meta content='True' name='HandheldFriendly' />
<meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' />
<meta name="viewport" content="width=device-width" />

Android 2.1 on a G1

UPDATE: The team has put 2.2 (Froyo) on the G1/HTC Dream as well which gives it a significant performance boost.

Cyanogen and his team have successfully compiled Android 2.1 for the G1/HTC Dream. I installed it this afternoon by following these instructions.

I am very happy with the stability although I have not tested it extensively.

Check out this video of it running.

And apologies for being slack with this blog. I have been very busy with contributing to cellbots.com and now carrotsticks.com.

Domain Change

You may have noticed but I decided to change my blog from garr.me to garrows.com. All links to garr.me will still work too.
The decision comes as I realised that garr.me just looks dodgy and probably scared off some people. So here we have, a completely safe looking http://garrows.com

Bi-Directional Serial Communication on an Android G1

Intro

There has been a few tutorials now on how to get an Android phone to communicate over its serial port although these have always been one directional (phone being the source).

Until now.

Assumptions

I’m going to assume that you have already got the single direction cable working. If not, check out the following tutorials.

http://www.instructables.com/id/Android_G1_Serial_Cable/

http://www.instructables.com/id/Android-G1-Serial-To-Arduino/

Changes

You will need a Logic Level Converter if you don’t already have one. I used this one from SparkFun which allows 2 way conversion for up to 2 serial ports.

Pin 4 of the extUSB connector (which has been marked as not connected in previous tutorials) is the logic high voltage of 2.8volts. We need this for our logic level converter so solder an extra wire onto it. What we want is

ExtUSB PinsLLC Pins
4LV
7GND (low voltage side)
8TX1
9RX1

Now connect up the high voltage side to what ever you want. I’m going to assume its a Arduino.

LLC PinsArduino Pins
HV5V
GND (HV side)GND
TX10 RX
RX11 TX

Testing

To test that I can actually receive serial on the Android, I wrote some code on the Arduino that transmits hello every second and some python script on the Android that prints anything it reads to screen.

Arduino

void setup()
{
Serial.begin(9600);
}
void loop() {
Serial.println("hello");
delay(1000);
}

And what you have all been waiting for….
Android

import os
print "Ready\n"
process = os.popen('cat /dev/ttyMSM2')
while process:
print process.readline()
print "Exiting\n"

Problems

If you are using the default CyanogenMod ROM, you will probably find that when you send something from the Arduino to the Android, it will invoke some sort of kernel serial debugging routine which spits out some data back to the Arduino. This is particually a problem if you get your Arduino to print something to serial for every byte that it recieves as this will create a massive flow of data.

Currently the cellbot.com team and I are working on disabling the serial debugging routine and will post back here when we get a fix.

The following is output after sending certain inputs to the Android. First line is the input, second line is the output bytes, third line is the bytes converted to ASCII.


sent 'GARR\n'
120, 141, 239, 255, 71, 249, 255, 205, 205
x, ì, ´, , G, ¨, , -, -,

sent 'GARR\n'
120, 141, 255, 255, 71, 249, 255, 205, 255
x, ì, , , G, ¨, , -, ,

sent 'GARR\n'
120, 141, 239, 255, 71, 249, 255, 205, 255
x, ì, ´, , G, ¨, , -, ,

sent 'BLAH\n'
120, 141, 239, 255, 98, 111, 253, 254, 255
x, ì, ´, , b, o, ², ¦, ,

sent 'BLAH\n'
120, 141, 239, 255, 98, 111, 253, 254, 255
x, ì, ´, , b, o, ², ¦, ,

sent 'BLAH\n'
120, 141, 239, 255, 98, 111, 253, 254, 255
x, ì, ´, , b, o, ², ¦, ,

Sent 'Hulk Angry!!!\n'
120, 141, 255, 255, 72, 117, 108, 107, 254, 235, 201, 229, 197, 255, 255,
x, ì, , , H, u, l, k, ¦, Ù, +, Õ, +, , ,

Sent 'Hulk Angry!!!\n'
120, 141, 239, 255, 72, 117, 108, 107, 254, 235, 201, 229, 229, 255, 255,
x, ì, ´, , H, u, l, k, ¦, Ù, +, Õ, Õ, , ,

Sent 'Hulk Angry!!!\n'
120, 141, 239, 255, 72, 117, 108, 107, 252, 235, 201, 229, 229, 255, 255,
x, ì, ´, , H, u, l, k, ³, Ù, +, Õ, Õ, , ,

Android-Arduino Robot Is Alive!

After the long wait for parts and struggling to find spare time, I have finally managed to give my robot its first test run.

For the test run I used the android script and arduino code from the nice folks over at cellbots.com. It struggles with turning since the code is designed for smaller wheels but works well other wise.

My setup is very simular to cellbot’s Truckbot althogh I have wired up my android have the ability to send and receive serial communications (for sensor reading) and to have another servo to move the angle of the phone but it isn’t using either of those yet.

The next steps are:

1. Merge my arduino code with cellbot’s code to enable 2 way serial communicaiton.

2. Create a android application that mimics the abilities of the script.

3. Expand on the android application to use the sensor readings from the arduino.

4. Make the android application autonomous & intelligent.

5. Take over the world.

ET – Star Wars Mashup

Got a bit bored at lunch today so I mashed this one up.

Apologies for the poor editing skills and the lack of attention to detail.

DSO Nano Unboxing

Finally got my DSO Nano today and thought that there might actually be some people interested in it since a $80 pocket sized, open source, oscilloscope.

Btw, sorry about the dirty fingernails. Was working on my bicycle earlier.

Get it from http://www.seeedstudio.com

Might do a review/tutorial later on.

Telstra Announces Android Phone

UPDATE: Available from April 27 from $60/month or $780 outright.

Telstra has announced that they will be selling their first Android powered phone, the HTC Desire. The announcement was officially made this morning at the Mobile World Congress in Barcelona.

Australians have been eagerly waiting for an Android powered phone on Telstra’s superior NextG network ever since Optus released the HTC Dream and the HTC Desire definitely impresses. Said to be the sister to the Nexus One, it totes a 1GHz Snapdragon processor, 3.7inch AMOLED display, Android version 2.1, Flash 10.1 compatibility, and HTC’s SenseUI.

“It will be priced aggressively, that’s all we can share at this stage. We’ve had lots of interest and excitement around HTC and combined with the Next G network’s speed and coverage, you can’t get a better combination.” – Telstra’s Ross Fielding

Telstra is expecting to release it as of April 2010 and has acquired a 3 month exclusivity deal in Australia.

Related:The State of Android in Australia

Windows Mobile 7 – A Business Failure

A demonstration of the new version of Windows Mobile has appeared on Engadget today and as a Windows Mobile developer, I am unimpressed.

Traditionally, Windows Mobile has been for business applications in PDAs, not consumer phones. For example, Motorola/Symbol have been using their Windows Mobile in their PDA based barcode scanners for years. The MC9090 is a particular type that is very popular with a Stock Tracking application I wrote.

The problem I have as a business applications developer is, it’s already far too complicated for the typical users. They struggle running a program if it’s not in the quick list of the start bar. They don’t want to be swiping squares around the place. They want it to be simple, easy to type on and easy to run their business applications.

Windows Mobile 7 simply destroys it’s established market, to try and take a share of an over inflated market.

Don’t get me wrong, it’s not a bad looking phone for the phone market but it shouldn’t be heading for the phone market. iPhone and Android phones have failed in the business market because they lack in group control and because 90% of business apps are written in .NET because of the rapid development times.

Microsoft, don’t make businesses switch back to Windows CE :’(

Get Adobe Flash playerPlugin by wpburn.com wordpress themes