Back to Control a Single Motor
Use our RT-Board. It delivers the necessary power on its analog output.
You can test the analog output together by applying a positive set voltage of about 1V. The necessary flink test program is already included in our image.
$ flinkanalogoutput -s2 -c0 -o35000
Check if the encoder is properly connected with:
$ flinkcounter -s1 -c0 -n20 -t1000
Turning the motor in positive direction must lead to the encoder counting upwards. If not, change the A and B signal.
On the RT-board we do not use an external motor controller and therefore, we cannot really control the motor power with this signal. However, we put the signal onto the MIO10 output which has a led on the board. Check the function with
$ gpioset -c gpiochip0 10=1
$ gpioget -c gpiochip0 14
$ gpioget -c gpiochip0 14
Start the application by choosing the appropriate configuration file:
$ sudo ./simpleMotorControl -c HwConfigFlinkMicrozed.json
Pay attention to the hardware configuration file. It loads two hardware wrapper libraries.