Friday, November 16, 2012

Just too easy

One of the really nice things about Arduino is the way it connects to a PC. You can plug a simple USB cable between a laptop and the Arduino and it powers the board, allows the programs to be downloaded into the board and allows the board and the laptop to exchange info.

If you want an Arduino to control something mobile, then a wire to a laptop is a bit limiting. Plugging in to download a program change is OK, but sending commands or receiving feedback means that limiting cable. Except it doesn't.

I bought a little board with a 5V bluetooth module on it for a few pounds from Ebay. There are four connections, VCC & ground go where you would expect, Tx plugs onto the Rx pin (0) and Rx plugs onto Tx pin (1). You have to power it from the coax (or VIN) to release the transmit and receive pins from the USB connection. The coax works well with a 9V battery. A short sketch to read incoming characters and the on-board LED was switched with commands over bluetooth using the BlueTerm Android app. It worked first time.

I'd like to experiment some more with bluetooth, and I might write an Android app to make the phone end a bit more slick or purpose-made. The freedom from cables is wonderful.

No comments:

Post a Comment