Cheapest / Easiest way to wirelessly communicate with a microcontroller.
wdfreemanjr
Posts: 9
Hello,
I am trying to figure out the easiest and cheapest way to communicate a very small amount of data to a microcontroller.
The scenario would be to communicate a small amount of data to a microcontroller in a remote location, without using a cable, laptop, internet or other microcontroller.
Obviously, I could get a bluetooth module and write an application on the iPhone, but Apple's Bluetooth API is very limited.
So far, I have come up an idea to use a webpage and javascript that will send the data by blinking my iPhone screen on and off based on the data typed into a textbox. I have a photoresistor connected to my Propeller that can be held up against my iPhone to read the blinks using the RCTIME spin object.
Due to the refresh rate of the iPhone screen, I am only able to reliably send about 1.5 characters per second, but hey it works. Theoretically, this will work with any browser enabled smart phone. I still need to add some error checking, etc. I have considered using different shades of gray to increase the transfer speed. Rather than 1 bit at a time, I could possible transmit 4 bits at a time, based on the greyscale color of the screen.
I have also made the web page cacheble, so you don't have to be connected to the internet to use this web application after you have downloaded it once. This allows you to dynamically send data without cables, internet or bluetooth.
I have also considered using sound rather than screen flashes since it could be much faster, but that is a totally different discussion.
It gets pretty tricky since this the communication is only one-way and I wanted to know if anyone else out there has any other ideas or any standards for this type of one-way communcation.
I am trying to figure out the easiest and cheapest way to communicate a very small amount of data to a microcontroller.
The scenario would be to communicate a small amount of data to a microcontroller in a remote location, without using a cable, laptop, internet or other microcontroller.
Obviously, I could get a bluetooth module and write an application on the iPhone, but Apple's Bluetooth API is very limited.
So far, I have come up an idea to use a webpage and javascript that will send the data by blinking my iPhone screen on and off based on the data typed into a textbox. I have a photoresistor connected to my Propeller that can be held up against my iPhone to read the blinks using the RCTIME spin object.
Due to the refresh rate of the iPhone screen, I am only able to reliably send about 1.5 characters per second, but hey it works. Theoretically, this will work with any browser enabled smart phone. I still need to add some error checking, etc. I have considered using different shades of gray to increase the transfer speed. Rather than 1 bit at a time, I could possible transmit 4 bits at a time, based on the greyscale color of the screen.
I have also made the web page cacheble, so you don't have to be connected to the internet to use this web application after you have downloaded it once. This allows you to dynamically send data without cables, internet or bluetooth.
I have also considered using sound rather than screen flashes since it could be much faster, but that is a totally different discussion.
It gets pretty tricky since this the communication is only one-way and I wanted to know if anyone else out there has any other ideas or any standards for this type of one-way communcation.
Comments
How about discussing your constraints first ...
Hanno
1) Screen and flash areas on and off. The flash rate may vary depending on other background processes, so maybe two areas, one is the "clock" and one is the "data".
2) Sound. Yes, that does work. I have created an RS232 data packet in software, saved it as a .wav file and played it back. Only catch on the Android is that you can't play it back from software. You have to save it to the sd card or internal flash, then play that file back. And that wears out the internal memory. Once you have sound you can do that wirelessly - indeed with 'raw RF' modules (the cheap $2 ones), you can feed 1200 baud data in and out of those without any pre or post processing. Just add about 12 ascii U characters at the beginning (this is01010101 in binary and it biases the AC coupling to neutral).
3) Bluetooth?? Mike Green's comment is almost certainly true. Ditto USB - only a few things are supported (USB memory stick, USB keyboard in my case, but not a USB mouse). Maybe if you have a keyboard you could flash the leds on the keyboard?
4) Wifi. But a wifi to serial device is so smart you may as well hack that and do the coding in there?
Your idea with the screen may turn out to be the best solution! One could possibly think about putting 9 photodetectors in a row and one is the clock and the 8 are the data - then you could send out data in bytes. Maybe use a picaxe to do the decoding, or a propeller?
Mr.Green
'
Have you used or tried the MatchPort?(MatchPort'b/g Pro) If so What did you plug the Chip into? (Bread Board-special socket-etc)
'
I can't seem to find a seller for the development board?
If you are holding something on a cable against the screen, what is wrong with simply plugging into the docking connector ?
(and getting either USB or Serial port pins ? )
Or, you could use an Infrared link :
This one works via the Audio connector http://ryzmedia.com/buy