Step 5Spray can receiver
Otherwise, I just use an arduino board, with the radio receiver plugged into the pin 2. This makes it easy to get the data into a computer via the USB -> serial chip on the arduino board. If I was going to make a custom circuit I'd probably use an FTDI USB -> serial UART evaluation board.
You also NEED an aerial attached to the receiver board. I used a 12cm long peice of wire. This is half what is recommended on this excellent info page.
Load the graffitiCanReader2.pde sketch into the arduino. With the can powered up, you should see the status LEDs on the can and the receiver board flashing quickly. Everytime the can LED flashes, a data packet is sent. Everytime the receiver board LED flashes, a valid data packet is received. If you're not seeing this then there is something up with the radio link. Something to try is connecting the TX of the can to the RX of the receiver with a piece of wire. If this doesn't work then you probably have a mismatch in the baud rate of virtualwire (see the code).
Assuming you've got lots of flashing going on on the receiver board, you should be able to monitor this on your usb serial port. If you monitor the serial port (usually /dev/ttyUSB0) at 57600 you should see data spewing out like
Got: FF 02
Got: FF 03
.
.
.
The first number is pressure, and the second is distance.
Now you can run processing and use this information to make pretty pictures!
Load the attached processing sketch (canRadioReader.pde) . Start the program and check the output of the program. You should be getting a frequency (that tells you how many updates per second the receiver is getting - you definately want this to be at least 10Hz). Also you'll get a distance and nozzle measurement. Test the can by moving the nozzle potentiometer and by moving a peice of card in front of the distance sensor.
If it's all working, then move on to the next step - getting the computer ready to talk to the wiimote!
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|














































