You might also want to watch this video that demonstrates a 2D proximity sensor using an LED array. It works without a laser pointer, using the fingertips alone is good enough for it:<p><a href="https://cs.nyu.edu/~jhan/ledtouch/index.html" rel="nofollow">https://cs.nyu.edu/~jhan/ledtouch/index.html</a><p>A few days ago, a user here also commented on how LEDs work both ways and how he used this effect to automatically adjust the brightness of an LED to ambient light. You can find that comment here:<p><a href="https://news.ycombinator.com/item?id=28475474" rel="nofollow">https://news.ycombinator.com/item?id=28475474</a>
I see they did a trick in the code: Because binary literals were added late in C++14, it seems they used some library which defined 256 constants like B00000000 = 0, B00000001 = 1, ..., B11111111 = 255.
Made me think of Eli Yablonovitch, “A great solar cell also needs to be a great LED.” RIP Alta Devices.<p><a href="https://www.youtube.com/watch?v=u_K1URyarE0" rel="nofollow">https://www.youtube.com/watch?v=u_K1URyarE0</a>