... | @@ -85,7 +85,27 @@ float voltage = HDU_BATSENSE_read(); |
... | @@ -85,7 +85,27 @@ float voltage = HDU_BATSENSE_read(); |
|
|
|
|
|
## Bluetooth debugging (HDU_BLUETOOTH.h)
|
|
## Bluetooth debugging (HDU_BLUETOOTH.h)
|
|
|
|
|
|
This module simplifies the usage of a HC-05 / HC-06 bluetooth module. Currently is is only possible to send messages in blocking mode, as the Rx pin of the used UART1 is shared to the camera interface.
|
|
This module simplifies the usage of a HC-05 / HC-06 bluetooth module. Currently is is only possible to send messages in blocking mode, as the Rx pin of the used UART1 is shared to the clock of the camera interface.
|
|
|
|
|
|
|
|
### Module documentation
|
|
|
|
|
|
|
|
#### void HDU_BLUETOOTH_init(uint32_t baudrate)
|
|
|
|
Initializes the HDU_BLUETOOTH module using Tx of UART1. A Baudrate up to 115200 kBAUD can be selected.
|
|
|
|
This function may only be called once.
|
|
|
|
|
|
|
|
#### void HDU_BLUETOOTH_sendMessage(char *message)
|
|
|
|
sends a string with a maximum length of 40 chars over bluetooth uart.
|
|
|
|
|
|
|
|
#### void HDU_BLUETOOTH_sendDebugMesssage(char *message, float value, char *unit)
|
|
|
|
can be used to debug a variable in the format "message: value unit\n".
|
|
|
|
|
|
|
|
### Example
|
|
|
|
Debug a variable:
|
|
|
|
<code>
|
|
|
|
HDU_BLUETOOTH_init(9600); //9600 BAUD for standard terminal programs
|
|
|
|
float vbat = 7,9;
|
|
|
|
HDU_BLUETOOTH_sendDebugMessage("VBAT", vbat, "V");
|
|
|
|
</code>
|
|
## HMI interaction (HDU_HMI.h)
|
|
## HMI interaction (HDU_HMI.h)
|
|
|
|
|
|
## Camera reading (HDU_LINESCAN.h)
|
|
## Camera reading (HDU_LINESCAN.h)
|
... | | ... | |