Cat Slow Feeder
http://www.thingiverse.com/thing:27854 Auger-based Cat Feeder
Thurber Feeder 5000
Motors & Gears
* linked from comments on the TF5000 video https://www.pololu.com/product/1200
* http://forum.arduino.cc/index.php?topic=50104.0 -> http://www.sdp-si.com/eStore/CoverPg/Gears.htm
Pulleys & Belts
* http://forums.parallax.com/discussion/157419/the-thurber-feeder-5000 -> https://sdp-si.com/eStore/CenterDistanceDesigner
How to calculate belt length: http://www.fingertechrobotics.com/how-to_pulley_belt.php
I'm polling a proximity sensor and spinning a servo if something gets near. Once that happens, I don't want to do it again for 20 minutes. Suggestions?
start a task that just sleeps, and check whether it's alive? stick a timestamp somewhere? (This is on a Raspberry Pi, no external database.)
wsmoak, I'd write a gen server that does the polling, use Process.send_after
When something isn't detected to be near, schedule it for a short amount of time
When something is near, schedule it for 20 minutes
wsmoak [10:19 AM]
I'm currently polling a VCNL4010 for a proximity reading. It has the ability to interrupt when it gets a reading over a threshhold. I can see how to program the device to do that... but how do I "hear" it and convert the interrupt into a message in my Elixir app?
Datasheet is here: https://www.adafruit.com/images/product-files/466/vcnl4010.pdf
di4na [10:43 AM]
well you can listen that GPIO and send a message to the process that need to react when you receive it ?(edited)
fhunleth [10:45 AM]
@wsmoak: Try connecting the INT pin to a GPIO on the Raspberry Pi. Gpio.set_int/2 in elixir_ale can be used to tell elixir_ale to monitor the pin and send a message when it changes state. The button example in the elixir_ale's README.md has a short example.
wsmoak [11:19 AM]
thanks. will have to solder another pin in the servo hat, since it covers up all the pins on the rpi2 and passes them through.
also "The interrupt pin is an open drain output. The needed pull-up resistor may be connected to the same supply voltage as the application controller and the pull-up resistors at SDA/SCL. Proposed value R2 should be >1 kΩ , e.g. 10 kΩ to 100 kΩ. Proposed value for R3 and R4, e.g. 2.2 kΩ to 4.7 kΩ, depend also on the I2C bus speed. "
is it safe to just connect the pins or is that saying I need a resistor? The other pins SDA, SCL are connected directly.
fhunleth [11:26 AM]
Good catch on the open drain output. You'll need a pull up resister. The reason why you didn't need them on the I2C bus is since the Raspberry PI already has them.
The way open drain works is similar to a button. In this case, the INT triggering is like the button pressing and ground going through the wire to the RPi's GPIO. When the INT isn't triggered, the button is not being pressed, so it's like the RPI's GPIO is disconnected. That's not good, so you pull it up to 3.3V with a 10k resister, for example.