Sunday, June 21, 2009

RTFM Works

Last gasp accomplishment for the day - Friday. The inhouse software guru spoke - it's just RTFM. Use Zterm on the Mac to connect to the radio. Before that, open up the manual for Roving Networks' radio that Sparkfun is using. I keep claiming to want to be in RF, how come I never did that? Hmmm..

Anyhow, in this case, the Mac never did pair with the modem - needed default passkey, not no passkey. So, Igoe should really have said to RTFM.

What I have noticed with Zterm is this - you can power up the modem and use Zterm to talk to the modem in command mode - as long as TX/RX are not connected to the AVR. If they are, no hope.

Then, if you have connected TX/RX to the AVR and are running the monski pong sensor reader program, you can't get the sensor values - no matter how many /r's you send - which is exactly what the Processing sketch does. Why? If I run the Processing monski_pong_handshake sketch, stuff works fine. And then, once the sketch is up and running, I can interrupt it and go into Zterm and continue reading sensor values using Zterm. What's going on??

Whoops, and just like that, after my friend returns, stuff behaves. I can go into CMD mode arbitrarily, and even read sensor data through Zterm. The trick seems to be to wait a few seconds after powering up the Arduino setup. After that, the Mac has paired with the device and made the serial port available. Of course, once the Mac has seen the device, the serial port is always available. But, if you try connecting to it 5 seconds after you power up the bluetooth modem, you're out of luck.

Friday, June 19, 2009

Wireless Monski Pong

Alright Mr. Igoe, this is the first one that doesn't work.

When I power up the setup, the LED near the RTS pin blinks (keeps) about 2x a second.

If the MAC has already paired with the device once, then, if you run the program in processing, the LED near the CTS pin goes solid on.

Then, if you stop the program, (it does draw the screen BTW, but no action), the LED near CTS goes off, and the one near RTS starts blinking at 1 Hz.

Very hard to debug this one on the MAC - how to you know what's showing up on the serial port?

A general question about the Arduino board - are the RX/TX pins on the header connected to the same ones that go to the serial-USB adapter chip?

So Much for Mac's Users Friendliness

I still remember a show on TV 20 years ago touting the Mac's user friendliness with a PC example - "abort,retry, fail?". Here's what I got from the Mac Mini today when I tried to run Arduino :

uncaught exception in main method:
java.lang.UnsatisfiedLinkError: /Useres/xx/arduino-0015/Arduio
15.app/Contents/Resources/java/librxtxSerial.jnilib: no suitable image
found. Did find:
/Users/xx/arduino-0015/Arduino15.app/Contents/Resources/java/librxtxSerial.jnilib:
no matching architecture in universal wrapper

Leaves me helpless.

Sunday, June 14, 2009

Mission A.d : Push Button, Send LED

Accomplishes a Hello World version of Igoe's CatCam program. I can push a button on my Arduino board connected to the Mac and get my PC to send a mail to my gmail. Will post the code soon.

With the help of a software guru of course :)

Basically, following the lead from Tom Igoe :

App running on the Arduino is very simple and just services a pushbuttom press and a very simple handshake with the PC over the serial port, which also serves in the debounce (PC implements a 2 second delay. Yuck!)

PC runs a very simple program (in Processing code) to monitor the serial port and look for the secret byte. When it gets it, it fetches a PHP page from the webserver.

Webserver, services that request by sending a mail using the simple port 25 protocal at mail.google that doesn't require authentication.

Mail will be in your spam folder in your gmail because it looks like an obvious forgery.

Saturday, June 13, 2009

VDIG Mirror

The whole setup - Arduino + processing is quite unreliable - no offense to the nice people who've put it together. It lacks the "heavyweight" quality.

Anyhow, for those seeking VDIG - which lets you generate quicktime output from you webcam, here's a mirror:

http://www.eden.net.nz/7/20071008/

Courtesy of Tim Molteno. Hero!

One glaring error by Tom Igoe :

Pg 298 - he's put "myCam" before width in his call to Capture. How????????

The Best Apache PHP Setup Guide in the World

Here :

http://www.reaper-x.com/2007/09/24/installing-and-setting-up-apache-22-series-with-php-5-on-windows/

But, this is a mistake to install just Apache. Later you'll be installing PHP, etc. What you want to install is XAMPP. Check that out!

Thursday, June 4, 2009

Arduino Igoe Monski Pong Prequel

Code for the book Making Things Talk is available online :

http://www.makershed.com/ProductDetails.asp?ProductCode=0596510519

Now, code for the example on Pg 59 is in the file called sensor_reader.

Set Realterm to ASCII to see a presentable display. I used just resistors (no flex) and moved the probe (analog Pin 0 or 1) around VDD and GND to see that max code is 1023 and min is 0. Tells you it's a 10 bit ADC - neat. The last character appears weird it must be said.

With a 1k to 5V and 10k to GND divider, I see codes ranging from 931 to 929 - 2 LSB's of p2p noise. About 10 mV of noise there p2p. That's within the ADC bandwidth. And what is that? Need to check the datasheet there. Gives an idea of the KT/C noise and the active device noise of the ADC? p2p noise is about 6x the rms noise?