<< return to Vizycam.com

User Tools

Site Tools


wiki:make_treat_dispenser

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:make_treat_dispenser [2020/09/28 16:50]
vizycam
wiki:make_treat_dispenser [2022/03/08 12:01] (current)
vizycam
Line 13: Line 13:
  * Sharp X-acto knife  * Sharp X-acto knife
  * White glue  * White glue
- * 12V solenoid (like [[https://​www.amazon.com/​Tulead-Solenoid-Electronic-Actuator-Electromagnet/​dp/​B07VC5JKYG|this one]])+ * 12V solenoid (like [[https://​www.amazon.com/​Tulead-Solenoid-Electronic-Actuator-Electromagnet/​dp/​B07VC5JKYG|this one]].  If you use a different solenoid, make sure that it doesn'​t consume more than 1.75A @ 12V!)
  * A jar  * A jar
  * Some patch wire  * Some patch wire
Line 172: Line 172:
  
  
-Then attach the extension cord to pins and on Vizy's terminal block.  ​+Then attach the extension cord to pins 1 (ground) ​and 2 (12V) on Vizy's terminal block.  ​(We recommend these pins because the solenoid'​s operating current may exceed Vizy's maximum I/O current of 1000mA, whereas the 12V signal can switch up to 4A. You can verify that the solenoid you're using consumes less than 1000mA with an ammeter and then you can use one of the I/O signals to switch the solenoid if you wish.  If you're using a larger solenoid that consumes more than than 1.75A @ 12V, it will likely cause Vizy's 12V power supply to brown-out and reset Vizy.)
  
  
-[{{wiki:p1000667_result.jpg}}]+[{{wiki:image_771.jpg?640}}]
  
  
Line 186: Line 186:
  
  
-Or you can punch in some simple lines of Python. ​ Just type into a Python instance (you can bring up a Python instance by pointing your browser to ''​http://​vizy.local/​python''​.)+Or you can type in some simple lines of Python. ​ Just type into a Python instance (you can bring up a Python instance by pointing your browser to ''​http://​vizy.local/​python'' ​or by selecting **Python** in the [[wiki:​vizy_editor#​the-settings-menu|Settings Menu]].)
  
 <​Code:​python>​ <​Code:​python>​
-import ​vizy +from Vizy import ​VizyPowerBoard 
-power = vizy.VizyPowerBoard(+power = VizyPowerBoard()
-power.vcc12(1) +
-power.io_set_mode(vizy.IO_MODE_HIGH_CURRENT)+
 </​Code>​ </​Code>​
  
-You can then trigger the solenoid with:+You can then trigger the solenoid ​(open shutter) ​with:
 <​Code:​python>​ <​Code:​python>​
-power.io_write_bits(1)+power.vcc12(True)
 </​Code>​ </​Code>​
  
-and turn off with:+and turn off (close shutter) ​with:
  
 <​Code:​python>​ <​Code:​python>​
-power.io_write_bits(0)+power.vcc12(False)
 </​Code>​ </​Code>​
  
wiki/make_treat_dispenser.1601329837.txt.gz · Last modified: 2020/09/28 16:50 by vizycam