This shows you the differences between two versions of the page.
— |
pypilot_arduino_motor [2022/03/02 08:38] (current) seandepagnier created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | The motor controller sketch is located in pypilot/arduino/motor of the [[https://github.com/pypilot/pypilot|pypilot git]] repository. | ||
+ | |||
+ | This sketch can run on pypilot motor controllers, arduino nano and other similar boards. | ||
+ | |||
+ | To upgrade the sensors, the recommended system is openplotter, or another linux system with arduino support installed. | ||
+ | |||
+ | First it is essential to ensure no other processes are accessing the serial port. For example | ||
+ | <code> | ||
+ | sudo service pypilot stop | ||
+ | sudo service gpsd stop | ||
+ | </code> | ||
+ | |||
+ | Other processes such as signalk-node-server or even opencpn (or others) may be configured to access the serial port, so ensure they are not running. | ||
+ | |||
+ | To install the software needed to compile and load the sketch: | ||
+ | <code> | ||
+ | $ sudo apt install arduino | ||
+ | $ git clone --depth=1 https://github.com/pypilot/pypilot | ||
+ | $ cd pypilot/arduino/motor | ||
+ | $ make upload | ||
+ | </code> | ||
+ | |||
+ | For pypilot official motor controllers, and cases running over /dev/ttyAMA0 there is no reset ability for upload, so it is essential to apply power to the controller at the precise moment avrdude runs. | ||
+ | |||
+ | If there is a failure, copy the avrdude command displayed on the console from "make upload" and paste it. Apply power to the motor controller at the same moment as executing the command. | ||
+ | |||
+ | If there is a failure, repeat the "make upload" command several times. It may be necessary to modify the Makefile and adjust the DEVICE or BAUDRATE. Some boards use a BAUDRATE of 115200, others will use 57600. | ||