> Introduction > Technology > Code > Demos > Additional Documentation
CODE
Pic Basic
The circuit is handling two layers of activity: physical switches to check for presence/absence, and
serial to detect whether or not Bluetooth communication is occuring between all the devices.
The code is setup to first check for physical presence. 3 LEDs represent the phone, keys and wallet.
When all are present, 3 LEDs PWM in a soft glowing pattern to convey a calm emotion.
If any device is absent, the respective LED will blink rapidly to alert you of its removal.
Secondly, the code checks if Bluetooth communication is happening. It looks for data being sent through
the chip's RX pin from the BlueSMiRF modem connected to the jacket's perf board. As long as the 3 BlueSMiRF
modems are engaged in "conversation", another set of LEDs will blink to confirm this.
At any given time, should a device be physically removed from the jacket, you will be immediately alerted
through a blinking pattern. Should the modems stop conversing, another alert will signal that serial data
is waiting to be received.
Click here to view current version (as of 4/17/06)
Python
To form the piconet between the devices, the phone runs the following script.
It calls each BlueSMiRF chip by its unique address and blasts bytes of data to all of them.
Currently, just individual letters are sent out. But in theory, this constant stream of data
is jamming the piconet, creating a layer of noise which shields all the devices within the
piconet from sniffing or snarfing attacks.
We've chosen to work in Python because of its open source availability and mobile device capability.
It's also much easier to learn, in comparison to J2ME.
Click here to view current version (as of 4/17/06)
References
Thanks to Michael Schneider, Raffi Krikorian, Shawn Van Every, Todd Holoubek, and Jeff Gray for
guidance
and feedback.
Also, some links to online resources used:
back to top
|