-
Notifications
You must be signed in to change notification settings - Fork 4
IoTs
dbahreini edited this page Jan 7, 2017
·
7 revisions
- Lasergun control:
This component sits on the servo driver from the RIOT library, the following functions are available:
- int pHAL_init(void) - this needs to be called in the beginning of every session
- void set_h(int angle) and void set_v(int angle) can be used to set specific angles [-90°, 90°]
- void step_{l|r|u|d}(void) - steps one single step defined by the step size (adjustable)
- void stepn_{l|r|u|d}(void) - step n steps, each defined by the step size (adjustable)
- void laser_on(void), void laser_off(void) and void laser_toggle(void) - controll of the laser diode (transistor on GPIO port)
- allign_cntr(void) - will set both y- and x-axis servo to 0°, void allign_{h|v}_cntr(void) will do this for vertical and horizontal axis
Note: there is a dedicated main.c for testing the separate functions manually (pHAL folder), simply flash the demo onto the xPro board, make sure to call the 'init' function before each session.
Note2: upon replacing the servo with a different model, make sure to go over the pwm logic and check the range, as the values may differ!
- Target control: TODO: further info on this component