Différences entre versions de « ENG-CANSAT-MISSION1-AUTONOMOUS »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
(Page créée avec « {{ENG-CANSAT-NAV}} == Introduction == Until now, we have worked with the emitter linked to a computer via USB cable. Using the USB cable was very useful to capture the... »)
(Aucune différence)

Version du 2 novembre 2018 à 14:22

Introduction

Until now, we have worked with the emitter linked to a computer via USB cable.

Using the USB cable was very useful to capture the debugging message into the serial console.

As designed in the code, the Feather wait for the serial connexion to start the software.

This means that you cannot make your object flying into the CanSat without packing the computer together with the feather into the can... GLOUPS!!!

Don't panic, we will solve this in a minute ;-)

Removing the "Serial Connexion Wait"

The serial connexion is only useful when you need to track the debugging messages send by the Feather.

As we are going autonomous... we do not need to wait for the serial connexion to be established.

So locate the following lines inside the setup() function of your "mission1-serial-radio-capture.ino" sketch (the emitter code running inside the CanSat).

void setup() {
  Serial.begin(9600);

  // wait until serial console is open, remove if not tethered to computer
  while (!Serial) { delay(1); } 
 
  ...
}

Written by Meurisse D. from MC Hobby - License: CC-SA-BY.