m365_dashboard
m365_dashboard copied to clipboard
Change mode
Any way to change mode from arduino? (eco, dynamic, sport) ? Thank u!
Hello, not sure, since I haven't touched this in a log time. If you are familiar with coding projects like these I would suggest the best place to start would be
struct __attribute__ ((packed)) {
uint8_t state; //0-stall, 1-drive, 2-eco stall, 3-eco drive
uint8_t ledBatt; //battery status 0 - min, 7(or 8...) - max
uint8_t headLamp; //0-off, 0x64-on
uint8_t beepAction;
} S21C00HZ64;
then you would need to find the correct command
enum {CMD_CRUISE_ON, CMD_CRUISE_OFF, CMD_LED_ON, CMD_LED_OFF, CMD_WEAK, CMD_MEDIUM, CMD_STRONG};
struct __attribute__((packed)) CMD{
uint8_t len;
uint8_t addr;
uint8_t rlen;
uint8_t param;
int16_t value;
}_cmd;
however from what I recall we didn't find the opportunity to toggle the headlight from an arduino.
Although the controller provides information about it's current mode I'm not sure if you will be able to change it. If you have any luck feel free to submit a PR.
P.S I'm referring to the headlight because it's a similar principle. If you want to go the easy route just tap into the existing button on board :D