This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:make_treat_dispenser [2020/09/28 16:10] vizycam |
wiki:make_treat_dispenser [2022/03/08 10:29] vizycam [Testing] |
||
---|---|---|---|
Line 2: | Line 2: | ||
- | {{wiki:treat.mp4|800x10|loop,autoplay}} | + | {{wiki:treat.mp4|680x10|loop,autoplay}} |
- | You can make a treat dispenser for your pet out of some fairly basic ingredients, the main ingredients being cardboard and a solenoid. Here's what you will need: | + | You can make a treat dispenser for your pet out of some fairly basic ingredients, the main ingredients being cardboard and a solenoid. It's pretty fun, and after you're done you can say "I made a robot to feed my precious <insert pet's name>, what did you do today?" |
+ | |||
+ | |||
+ | Here's what you will need: | ||
* Some corrugated cardboard -- it can be used/recycled | * Some corrugated cardboard -- it can be used/recycled | ||
Line 16: | Line 19: | ||
- | We'll start by making a box. We're making a gravity-fed treat dispenser, so we need a fair amount of height to keep things moving along and not getting clogged. Our box is 7"x7" on the base and 8" high. | + | ===== Making the box ===== |
+ | |||
+ | |||
+ | We'll start by making a box. We're making a gravity-fed treat dispenser, so we need a fair amount of height to keep things moving along and not get clogged. Our box is 7"x7" on the base and 8" high. | ||
- | Cut out five 8"x7" rectangles. We'll use four of the rectangles for the sides of the box and save one for later. | + | Cut out five 8"x7" rectangles. We'll use four of the rectangles for the sides of the box. Save the extra for later. |
Line 31: | Line 37: | ||
- | [{{wiki:p1000602_result.jpg}}] | + | [{{wiki:p1000601_result.jpg}}] |
Line 37: | Line 43: | ||
- | [{{wiki:p1000601_result.jpg}}] | + | [{{wiki:p1000602_result.jpg}}] |
Line 47: | Line 53: | ||
[{{wiki:p1000613_result.jpg}}] | [{{wiki:p1000613_result.jpg}}] | ||
+ | |||
+ | |||
+ | ===== Making the funnel/value assembly ===== | ||
Line 79: | Line 88: | ||
- | [{{wiki:p1000629_result.jpg}}] | + | [{{wiki:p1000628_result.jpg}}] |
- | [{{wiki:p1000630_result.jpg}}] | + | [{{wiki:p1000629_result.jpg}}] |
Line 106: | Line 115: | ||
- | [{{wiki:p1000639_result.jpg}}] | + | [{{wiki:p1000638_result.jpg}}] |
Line 143: | Line 152: | ||
[{{wiki:p1000653_result.jpg}}] | [{{wiki:p1000653_result.jpg}}] | ||
+ | |||
+ | |||
+ | ===== Final assembly ===== | ||
Line 160: | Line 172: | ||
- | Then attach the extension cord to pins 2 and 4 on Vizy's terminal block. | + | Then attach the extension cord to pins 2 (12V) and 4 (B0) on Vizy's terminal block. |
Line 166: | Line 178: | ||
- | Test the treat dispenser with the [[wiki:wiki:pet_companion|Pet Companion application]], or with some simple Python. Just type into a Python instance (you can bring up a Python instance by pointing your browser to ''http://vizy.local/python'' | + | And don't forget to plug the terminal block into Vizy. |
+ | |||
+ | |||
+ | ===== Testing ===== | ||
+ | |||
+ | Test the treat dispenser with the [[wiki:pet_companion|Pet Companion application]] by clicking on ''Dispense treat''. | ||
+ | |||
+ | |||
+ | 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 by selecting **Python** in the [[wiki:vizy_editor#the-settings-menu|Settings Menu]].) | ||
<Code:python> | <Code:python> | ||
- | import vizy | + | import vizy.vizypowerboard as vpb |
- | power = vizy.VizyPowerBoard() | + | power = vpb.VizyPowerBoard() |
- | power.vcc12(1) | + | power.vcc12(True) |
- | power.io_set_mode(vizy.IO_MODE_HIGH_CURRENT) | + | power.io_set_mode(0, vpb.IO_MODE_HIGH_CURRENT) |
</Code> | </Code> | ||
- | You can then turn trigger the solenoid with: | + | You can then trigger the solenoid (open shutter) with: |
<Code:python> | <Code:python> | ||
- | power.io_write_bits(1) | + | power.io_set_bit(0) |
</Code> | </Code> | ||
- | then turn off with: | + | and turn off (close shutter) with: |
<Code:python> | <Code:python> | ||
- | power.io_write_bits(0) | + | power.io_reset_bit(0) |
</Code> | </Code> | ||
Line 192: | Line 212: | ||
+ | {{wiki:treat.mp4|800x10|loop,autoplay}} | ||