-
Notifications
You must be signed in to change notification settings - Fork 0
serial communication
There are two main ways to get a serial communication link with the freebird, usb communication and bluetooth communication. Both are effectively serial connections, but no DB-9 or USB-serial adapters are involved.
Internally, all output is sent to both streams regardless of whether they are connected. Input is read from USB if it is active, otherwise from bluetooth. "Active" is determined by the Serial.dtr() function, which is true when a program on the USB host has the serial port open (so if connected by USB, but no application on the host machine has the serial port open, then input is taken from bluetooth).
There are two operating modes - command mode and sample mode. In command mode, a "freebird>" prompt is printed, and simple one-line commands can be entered (including help). The sample command will put it into sample mode, and data collection will start.
In sample mode, depending on configuration (sample_monitor, log_to_serial), there may or may not be periodic output to the serial streams. Sending either Esc or ! will exit sample mode and return to command mode. Any other input will just generate a help message and it will remain in sample mode.