GET AWAY FROM THE TV!
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- blindedscience
- Posts: 10
- Joined: Tue May 18, 2021 5:31 pm
GET AWAY FROM THE TV!
The problem I'm trying to solve: My kids play video games. When they play they step closer and closer to the TV until they're only a foot or two away. This will scream at them to back up.
I decided to use both the ultrasonic distance sensor and the PIR. The reasoning was that the ultrasonic sensor probably works great if they're right in front of the TV, but if they're off to the side, the PIR would be better. Likewise, the PIR isn't as strong once they stop moving, otherwise I'd use it by itself.
The end result was a device that refused entry to the seating area of my living room! The PIR is too sensitive, so I think I need to explore other versions that include hardware sensitivity tuning, but this was a great introductory project! Great enough that I purchased the other Adaboxes still available.
Anyways, attached is a photo of the finished device. I mounted this to the front of the entertainment center with poster tape. Also attached is my code, in case someone wants to publicly shame me for not knowing python well enough. :)
- dastels
- Posts: 15667
- Joined: Tue Oct 20, 2015 3:22 pm
Re: GET AWAY FROM THE TV!
What I've done in the past in this sort of situation is use the PIR to have it start paying attention to the proximity sensor.
Another possibility is to have multiple proximity sensors. With this one you are limited to two (if you triggered them with the same output signal). If you wanted more you could switch to an I2C proximity sensor. There are some STEMMA-QT ones. You'd just need to have them have enought address to accomodate the number of sensor you want.
Dave
Another possibility is to have multiple proximity sensors. With this one you are limited to two (if you triggered them with the same output signal). If you wanted more you could switch to an I2C proximity sensor. There are some STEMMA-QT ones. You'd just need to have them have enought address to accomodate the number of sensor you want.
Dave
- blindedscience
- Posts: 10
- Joined: Tue May 18, 2021 5:31 pm
Re: GET AWAY FROM THE TV!
I've only posted here twice so far and BOTH times the responses were awesome.dastels wrote:What I've done in the past in this sort of situation is use the PIR to have it start paying attention to the proximity sensor.
Another possibility is to have multiple proximity sensors. With this one you are limited to two (if you triggered them with the same output signal). If you wanted more you could switch to an I2C proximity sensor. There are some STEMMA-QT ones. You'd just need to have them have enought address to accomodate the number of sensor you want.
Dave
During my research phase I found a Youtube video showing a robot that used three of these sensors. I thought that might be a good approach, but looking at my funhouse, I didn't see how I could attach more than one. It didn't even occur to me that a single trigger signal might be used to prompt two different echos. Then again, that probably just shows that I really am starting from the ground here.
I *really* enjoyed the "here's some random stuff in a box, and some example builds, go create something" element of the Adabox.
- dastels
- Posts: 15667
- Joined: Tue Oct 20, 2015 3:22 pm
Re: GET AWAY FROM THE TV!
The Funhouse is a sweet little board, too. I'm well into making a smart-home room node with it. 2300 lines of CircuitPython and growing.
[edit] ok.. about 1000 lines of python if I ignore comments.
Dave
[edit] ok.. about 1000 lines of python if I ignore comments.
Dave
Please be positive and constructive with your questions and comments.