Skip to content
martinheusmann edited this page Jan 8, 2017 · 7 revisions

IoT side features

  • 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: This component extends the tests/driver_isl9125 application from the RIOT library for interrupts. Use isl29125_init(&dev, TEST_ISL29125_I2C, TEST_ISL29125_IRQ_PIN, ISL29125_MODE_R, ISL29125_RANGE_10K, ISL29125_RESOLUTION_16, ISL29125_INTERRUPT_STATUS_RED, ISL29125_INTERRUPT_PERSIST_1, ISL29125_INTERRUPT_CONV_DIS, lower_threshold, higher_threshold) for initializing the isl29125. TODO: More will be added soon....

Something else

Clone this wiki locally