Log stream format - Gadget-factory/wheelemetrics GitHub Wiki
The BT serial comm modules can all work at 115200 bds => 11520 bytes/s => 57 bytes max/line with 200 hz logging => 115 bytes max /line with 100 hz logging
Commands (followed by LF+CR)
- ? : list all commands
- log : log data 1s (log stops at new command)
- loghi : log data 100hz or 200hz (log stops at new command)
- wh : sends back total 0.1 Wh, rolloever 16 bits (stored in eeprom)
- odo: total revolution, rollover 16 bits (stored in eeprom)
- max : max voltage & max current (stored in eeprom)
- min : min voltage & min current for braking values (stored in eeprom)
- reset : reset max & min values
commands can be in lower case of UPPER case
Do we need '!' at the start of each command ? You decide. I have no preference
data log, high speed, each ascii line (LF CR terminated)
123,-456,78,90,123,456,-7890,1
- 123 => 12.3 V
- -456 => -45.6 A
- 78 => 78°C sensor 1 (mosfets)
- 90 => 90°C sensor 2 (battery)
- 123 => 12.3°
- 456 => 4.56 rps (revolutions per second)
- -7890 => -7890 WS (energy in watts.seconds , '-' => braking)
- 1 => buzzer = ON (0=> buzzer = Off)
data log, low speed, at 1hz sampling rates
same above. uC sampling rate remains at 100hz, mean values are calculated before being sent out)