Hello All,
I am working on a simple input/output and circuit express project with a group of 7th graders. They are tasked with designing a prototype to solve a problem.
I have minimal coding/wiring/electrical experience- and I ran into a student question today that I wasn't sure the answer to.
The student wants to create a device that responds (with LED and Sound) when you are within a 3 point shot range in basketball. This would equate to 6.7-7.24 meters. Anything below or beyond that # we would want to have red LEDs, within that range the LEDs would be green (we can program that).
However, I'm wondering if I can use the onboard IR (TX and RX) https://learn.adafruit.com/infrared-ir- ... uit-python to be the input for sensing distance. Place 1 CPX under the hoop and the other as the receiver.
Any tips/tricks for getting this to code correctly? This is beyond my skill level. Thanks so much!
Adafruit Circuit Express- IR Distance?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- T_Mo
- Posts: 1682
- Joined: Thu Mar 15, 2018 7:10 pm
Re: Adafruit Circuit Express- IR Distance?
(Community member - not Adafruit staff)
I believe he built-in IR sensors in the circuit express don't have any range measurement capability. It looks like only an On/Off pulse-based communication method.
Even if it could measure distance, it would not be very reliable since the optical parts on the Circuit Express aren't intended for long-range use, and aiming the two boards at each other would be critical.
So you'd probably have to add something else for distance measurement.
For example, this will handle up to 5 meters.
https://www.adafruit.com/product/984
Note that the ultrasound signals will reflect off of any solid object, so it won't be really accurate at measuring the location of an object inside a building that has walls or other people walking around.
Maybe it could be done in miniature, with players simulated by paper cups, and move them around inside a cardboard box painted to look like a basketball court? Then you'd have a more controlled environment for a "concept demonstration".
Back to full-size:
There are also laser-based (LIDAR) range measurement modules, but they're expensive and/or out-of-stock.
I believe he built-in IR sensors in the circuit express don't have any range measurement capability. It looks like only an On/Off pulse-based communication method.
Even if it could measure distance, it would not be very reliable since the optical parts on the Circuit Express aren't intended for long-range use, and aiming the two boards at each other would be critical.
So you'd probably have to add something else for distance measurement.
For example, this will handle up to 5 meters.
https://www.adafruit.com/product/984
Note that the ultrasound signals will reflect off of any solid object, so it won't be really accurate at measuring the location of an object inside a building that has walls or other people walking around.
Maybe it could be done in miniature, with players simulated by paper cups, and move them around inside a cardboard box painted to look like a basketball court? Then you'd have a more controlled environment for a "concept demonstration".
Back to full-size:
There are also laser-based (LIDAR) range measurement modules, but they're expensive and/or out-of-stock.
Please be positive and constructive with your questions and comments.