Why I’m Excited About the New Arduino
Most 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!
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 Pins | LLC Pins |
|---|---|
| 4 | LV |
| 7 | GND (low voltage side) |
| 8 | TX1 |
| 9 | RX1 |
Now connect up the high voltage side to what ever you want. I’m going to assume its a Arduino.
| LLC Pins | Arduino Pins |
|---|---|
| HV | 5V |
| GND (HV side) | GND |
| TX1 | 0 RX |
| RX1 | 1 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, ³, Ù, +, Õ, Õ, , ,
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.
