You could make a 3D printed dock that holds the two Arduboys with the LEDs aligned and masks out any stray light. Would look like a toaster (but only cooking the lower 1cm of the Arduboys!).
Would a cable made of optic fiber would work?
I suggested that in the post that provided the inspiration.
I bought a length of cheap optical fibre from Ebay and tried to use it to get the two Arduboys to communicate but was unable to get it to work reliably. Perhaps because it was cheap it was diminishing the strength of the LED too much.
I understand the led blinking
but what is acting as a light-receiving sensor?
as far as I know, there are no such as the element in standard arduboy
by the way I’m experimenting in storing the game code at mifare 4/8k cards and reading them the same way as cartridges.
it works ) hope to implement this in Little Game Engine for ESPboy next week.
If you program the LED pin as input then it will effectively be a light sensor like in @MLXXXp’s sketch:
So in my demo it rapidly switches between input and output to communicate with another Arduboy.
Just a speculation but would the Green LED be more suseptable to input from the Green light or am I just not understanding the physics here
I tried the green and blue LEDS as light sensors (with white light), neither was anywhere near as sensitive as red.
I think you’re thinking of humans.
Humans can detect more shades of green than any other colour,
but that’s because of the balance of rods and cones in the human eye (or something like that),
it’s not a general property of light.
(Fun fact: chickens can actually see more colours than humans.)
I would speculate that would be down to the lower forward voltage / band gap for red LEDs. IR LEDs have even lower Vf so if you are ever in a strange situation of having your choice of LEDs but no photodiodes, perhaps they’re the ones to pick. Harder to debug though!
Not to bump off topic too far but has anyone tried using the speaker as a mic for audio/ultrasonic data transfer?
I had a look at this before but unfortunately the speaker pins cannot be used for analog input.
Piezo produces high voltage spikes if there’s high impedance, so wondering if it would be possible to use it as digital. Even On-Off-Keying perhaps.
In my test when I tried using the speaker pins with digital input if I knocked the Arduboy on the desk then it detected a change in voltage.
So you have a way to password lock your Arduboy and unlock with a secret knock/tap sequence. I suppose it’s not too much of a stretch to say you have “fingerprint unlock” available on Arduboy!
Whats the effective bit rate?
In the demo it is 50 bits per second: an interrupt runs at 200hz but it takes 4 cycles to switch between input/output.
It starts to get unstable when increasing the update rate but it might be possible to get better results if you had something block out the ambient light like an optical fibre cable and a custom housing around the LED.
It also just occurred to me that if the green and blue LEDs are also capable of detecting light changes then you might be able to use them to have additional channels. E.g. maybe one Arduboy uses red for send and green for receive and the other uses red receive and green send.
Or maybe use them all for a more reliable connection? Id assume the more light, the more to detect
I think when I was experimenting, I found green and blue were far less sensitive than red. For digital communication purposes, they may not be useful at all.
5 posts were split to a new topic: Adding infrared communication