Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Cat Laser Tower for Circuit Python

Pseudo-randomly moves a servo tower (on X and Y axis) and lights up a laser. Re-written into Python in order to support Circuit Python.

Watch the original working : https://www.youtube.com/watch?v=hHIrxL0giJQ

Setup

  • x_servo is attached to pin 12 (and +5V and GND) and moves in the X plane
  • y_servo is attached to pin 11 (and +5V and GND) and moves in the Y plane
  • Laser is attached to pin 13 (and GND)

Download the code.py file, copy it to a board that runs Circuit Python, and reset the board.

How it works :

The program randomly choose a new position for the laser inside a square you can define in the variables. It verifies the new position is different from the old one by at least "minimal_movement". It moves the tower to the new position and stays still for a time between min_freeze and max_freeze (this aims to reproduce the behaviour of an insect landing somewhere for a bit and then flying off, that's the variable you need to increase if your cat is fat...) and starts the process over and over again.

Originally created 30 Sep 2016 by Lucas Berbesson for La Fabrique DIY
Re-written for Circuit Python 30 Dec 2018 by Steven Shearer

About

Circuit Python re-write of Laser-cat, which pseudo-randomly moves a servo tower (on X and Y axis) and lights up a laser

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages