Thonners / Helicopter

Scripts to fly a remote-control helicopter, using a Raspberry Pi as the main controller instead of a standard RC receiver unit
GNU General Public License v3.0
0 stars 0 forks source link

Startup/connection initialisation - no power for Gyro #9

Open Thonners opened 4 years ago

Thonners commented 4 years ago

When first initialising the connection to the helicopter from the controller, the battery isn't connected (which is intended - we need to arm the ESC before we connect), but the Gyro, etc. therefore doesn't have the required power to boot up and provide a signal. This causes an error which crashes the connection to the controller.

Restarting the controller instance/connection works (assuming the battery has since been connected), but we should be able to initiate controller connection before powering up with the battery. This may require just running the Gyro, etc. off the Pi's 5V rail (if it'll take it), or moving most of the constructor admin out of the constructor and into an 'init' block which we can call after we've armed the ESC and are ready for the battery