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?

Arduino Serial Success

The big tip - screw what Igoe says - don't even look at Putty. Putty was busy with I don't know what when I clicked "Open" - not even a peep.

Go straight for Realterm - probably the best serial comm tool ever written.

Goes without saying - you can't have Realterm looking at your port and use the same port to write to the arduino simultaneously. You'll have to close the port in Realterm first - just press the button.

Wednesday, June 3, 2009

Arduino Interrupt Handling

This stuff worked very cleanly in MSP430. Problem is that people are doing a lot more basic stuff with Arduino at the moment so interrupts don't seem to have caught on just yet.

Anyhow, here's what I was trying to do :

Push the button and get the uC to play the Melody. Didn't work, so then I say just blink the LED. That also doesn't work.

This much I see :

(stuff you have to know is that every program in Arduino has a "setup()" and a "loop()")

I light up the pin 13 LED within loop.
Then, I set the ISR to clear the LED, delay and the light it up again.

Doesn't work - all I see is it clears the LED. Come on, this is really simple.

Then, Lefty tells me that you can't use delay within your ISR.

WTH!!

The goal, BTW, is to get through Igoe's book. Great guy - saw him at Maker Faire. Seems to have done everything I want to do. Now, while the economy's got me down is the time.

Anyhow, 11:35 at night, nailed the interrupt thing - can play Melody at the press of a buton. Now, to try out one serial example from Igoe's book and call it a day.

Arduino Here I Come

Okay, MSP430 sucks, Atmel rules. Yesterday was day one. BTW, Atmel and Arduino rule the Maker Faire (no one mentions Atmel of course). I asked on Dallas guy at the MF if he's considered MSP430 and he said no. No way.

Anyhow, we put Arduino on a Compaq running XP yesterday and the performance was pretty crappy. You click the Tool menu and wait about half a minute.

At some point, we're going to get some smart CS people from Eastern Europe to fix this. Italy doesn't seem to cut it yet.