Showing posts with label Bluetooth. Show all posts
Showing posts with label Bluetooth. Show all posts

Wednesday, 11 February 2015

The Iron Handshake

After a brief reprieve from the world of circuits (and their bending) I decided to begin work on the codebase for the S1 sensor. The first forays have been into bus communication, with a simple templated foundation in the works. Often the pattern of bus operations is fixed, with variation in the data layout and signals. The library, called Iron, exposes only the essential components, hiding the details (read: gory) of bus management from the user.

For the S1 project the main role of the bus will be the transfer of image buffers. The library scans all serial ports, signalling to any devices that satisfy a signature. A device matching the protocol is connected to, enabling the start of bus operations.

EN_DEFINE_BUS_PROTOCOL( IR, 16, 0xB0, 0x7B, 0xA6 )
std::vector< Device > devs = Bus< IR, CPU >::listDevices( All );
Bus< IR, CPU >::connect( devs[0], baudRate );
Bus< IR, MCU >::write( image);

The video below shows a simple handshake between a PC application with an Arduino using the Bluetooth Serial Port Protocol. The LED blinks once to indicate a successful handshake. The next step is to send some image data from the Arduino, maybe using sensor values... or I bin it ;)



Wednesday, 4 February 2015

Teeth, Blue

While waiting for some outstanding camera components I decided to push ahead on another front: communication. I'm intending to interface with the S1 via mobile phone, leveraging it's fast processor for image processing. After some searching I decided to go with the HC-05 Bluetooth tranceiver, a cheap and available break-out board.

At first the pinout looked to require six wires, however after some experimenting only three will be required: VCC, GND & TX. The main hurdle for the sensor will be throughput, with 8 lines of image data needing to be sent over the wire. There are projects that have pushed the MCU as far as 2Mbit/s, which is close to the rates I'll need to support stereo image sensors at high resolution.

The next step will be a minimal mobile application to display the transmitted data, a simple test pattern at first. Qt should come in handy here, allowing a single app that will serve as the hub for many sensors. Onward and upward!