User Tools

Site Tools


pypilot_servo

For testing just the motor controller, it can be useful to execute the servo script: pypilot_servo or pypilot/servo.py

This connects to the motor controller and will output the voltage and other measurements to the console when it works. Otherwise it will try to detect a motor controller and with no output indicates the controller is not found.

The software uart device /dev/ttyS0 is unreliable. It is recommended to use the hardware serial port /dev/ttyAMA0 which means you need to disable bluetooth. To see which serial port is available:

pi@openplotter:~ $ ls -l /dev/serial0
lrwxrwxrwx 1 root root 7 Jul 24 07:17 /dev/serial0 -> ttyAMA0

If it points instead to ttyS0, then edit /boot/config.txt and add the line: dtoverlay=pi3-disable-bt and reboot.

pi@openplotter:~ $ pypilot_servo
Servo Server
loading servo calibration /home/pi/.pypilot/servocalibration
WARNING: using default servo calibration!!
connected to gpsd
nmea poll times 0.298720121384 8.20159912109e-05 1.28746032715e-05 8.10623168945e-06 6.60419464111e-05
arduino servo found on [u'/dev/ttyAMA0', 38400]
serialprobe success: /home/pi/.pypilot/servodevice [u'/dev/ttyAMA0', 38400]
voltage: 12.76 current 0.0 ctrl temp 23.26 motor temp False rudder pos False flags SYNC 
voltage: 12.76 current 0.0 ctrl temp 23.25 motor temp False rudder pos False flags SYNC 
voltage: 12.75 current 0.0 ctrl temp 23.28 motor temp False rudder pos False flags SYNC 
voltage: 12.76 current 0.0 ctrl temp 23.28 motor temp False rudder pos False flags SYNC 
voltage: 12.76 current 0.0 ctrl temp 23.28 motor temp False rudder pos False flags SYNC 
voltage: 12.76 current 0.0 ctrl temp 23.28 motor temp False rudder pos False flags SYNC 
pypilot_servo.txt · Last modified: 2019/07/25 14:39 by seandepagnier