Do you think it's feasible to use a strobe (as in flashing) light to communicate with Arduino using serial data sent via the RX pin? Obviously there'd be some kind of hardware plugged into it. A photo resistor or something.
More exactly, could one use the camera flash (or even just rapid screen colour changes) of a smartphone to communicate wirelessly with the Arduino? And I don't mean program it I mean send serial data like you would with the RX/TX pins. I realise it'd be one way only - RX - which possibly would complicate things as I imagine they do "handshaking" or whatever it's called.
I know bluetooth or even WiFi shields could achieve this but a) I want a minimum of hardware and b) it would need to present data at the RX pin just as a physical wire would as I want to apply this to an existing sketch/firmware that can't be modified but expects to see data at the RX pin.
Do you think it's feasible to use a strobe (as in flashing) light to communicate with Arduino
Yes.
using serial data sent via the RX pin?
Why? just use an input pin.
Well sure in theory either although the existing program running on the Arduino is listening to the RX pin but it's the wireless bit that's important. I don't want the smartphone and Arduino physically connected. Why? To avoid multiple types of connectors.
Note there are people sensitive to flashing lights (it can trigger epilepsy seizures in some people, and for me, tends to make migraines worse if I'm in migraine mode), so I would hope if you feel you need to do this, you would do in such a fashion to minimize the number of pulses (at least that can be distinguished by people). Better to spend a little bit more, and just add either an IR transmitter/receiver or one of the radio devices.
Also note, in bright conditions, things like flash will not trigger your sensor, since the background light will drown it out. IR remote controls have a similar problem.
Yes that had occurred to me. IR is great at the Arduino end (minimal components) but not so good at the smartphone end. The iPhone at least doesn't have an IR transmitter and I suspect most other current smartphones don't either. I'm guessing decoding Bluetooth at the Arduino end is non-trivial in terms of either software or hardware?
gonzogeek:
Yes that had occurred to me. IR is great at the Arduino end (minimal components) but not so good at the smartphone end. The iPhone at least doesn't have an IR transmitter and I suspect most other current smartphones don't either. I'm guessing decoding Bluetooth at the Arduino end is non-trivial in terms of either software or hardware?
If you had an Android phone instead of of an iphone, it would be fairly simple to add bluetooth support. I have both an external bluetooth transceiver (mainly for my Teensy 3.0) and a bluetooth shield that I got from Radio Shack (for the Arduino). You just hook it up as a serial device, and write/read bytes.
However, from what I've read, for Apple phones, you need to use a blessed bluetooth device, and those are a bit pricier to get, or you have to jail break your phone. Since I don't have an Apple phone, I've never bothered looking up the details.
gonzogeek:
Yes that had occurred to me. IR is great at the Arduino end (minimal components) but not so good at the smartphone end. The iPhone at least doesn't have an IR transmitter and I suspect most other current smartphones don't either. I'm guessing decoding Bluetooth at the Arduino end is non-trivial in terms of either software or hardware?
If you had an Android phone instead of of an iphone, it would be fairly simple to add bluetooth support. I have both an external bluetooth transceiver (mainly for my Teensy 3.0) and a bluetooth shield that I got from Radio Shack (for the Arduino). You just hook it up as a serial device, and write/read bytes.
However, from what I've read, for Apple phones, you need to use a blessed bluetooth device, and those are a bit pricier to get, or you have to jail break your phone. Since I don't have an Apple phone, I've never bothered looking up the details.
I'd like to be able to support multiple phones hence the thought that the one thing they probably all have in common is a camera flash or at least a screen that can flash on and off.
You no longer need to jailbreak the iPhone to Dev for Bluetooth but iirc you do need to register as an MFI developer (peripherals) as well as an iOS developer.
gonzogeek:
I'd like to be able to support multiple phones hence the thought that the one thing they probably all have in common is a camera flash or at least a screen that can flash on and off.
You no longer need to jailbreak the iPhone to Dev for Bluetooth but iirc you do need to register as an MFI developer (peripherals) as well as an iOS developer.
I dunno, camera flash is fairly new, and you can still buy camera's without flash. Bluetooth (2.0) is more common, assuming you paid the fees to become an official developer on Apple (but those fees are problematical for the majority of users here that are weekend warriors with limited budgets).
It likely is there is no one solution that will work with every phone.
Even using the 3.5mm headphone jack is problematical, in that a few phones don't have the standard connector, and I've seen other projects (triggertrap) that had to design special dongles to be able to use it, and there were various timing problems on Android systems.
gonzogeek:
IR is great at the Arduino end (minimal components) but not so good at the smartphone end. The iPhone at least doesn't have an IR transmitter and I suspect most other current smartphones don't either.
The light doesn't need to be infrared to be picked up by an IR receiver. If you can manipulate the camera flash or even make the the screen blink white (at close range) it will work. It's the intensity of the light over ambient that matters.