==== int powerPin = 5; byte messageA[] = {0xA6, 0x12, 0x02, 0x10, 0x14, 0xCF}; byte messageB[] = {0xA6, 0x12, 0x02, 0x11, 0x14, 0x0B}; byte messageC[] = {0xA6, 0x12, 0x02, 0x89, 0x01, 0x1C}; ==== byte messageD[] = {0xA6, 0x12, 0x02, 0x85, 0x24, 0x4D}; // CHANGE LOOP TO MODIFY AND TEST ==== === byte messageC[] = {0xA6, 0x12, 0x02, 0XF5, 0xE4, 0x31}; // LIGHT ON & ESC ON & KPH & MAX SPEED === How did you figure out the 0xA6, 0x12, 0x02, 0x85, 0x24, 0x4D command? Really how did you discover the 0x24 portion. I tried a lot of different numbers in the fifth location with no luck? === #include int powerPin = 5; byte messageA[] = {0xA6, 0x12, 0x02, 0x10, 0x14, 0xCF}; // MAKES HEADLIGHT BLINK ONCE byte messageB[] = {0xA6, 0x12, 0x02, 0XE1, 0x14, 0x92}; // LIGHT OFF & ESC ON & MPH & SLOW byte messageC[] = {0xA6, 0x12, 0x02, 0XE3, 0x14, 0x03}; // LIGHT Flash & ESC ON & MPH & SLOW byte messageD[] = {0xA6, 0x12, 0x02, 0XE5, 0x14, 0xA9}; // LIGHT ON & ESC ON & MPH & SLOW byte messageE[] = {0xA6, 0x12, 0x02, 0XE1, 0xE4, 0xE6}; // LIGHT OFF & ESC ON & MPH & FAST byte messageF[] = {0xA6, 0x12, 0x02, 0XE3, 0xE4, 0x77}; // LIGHT Flash & ESC ON & MPH & Fast byte messageG[] = {0xA6, 0x12, 0x02, 0XE5, 0xE4, 0xDD}; // LIGHT ON & ESC ON & MPH & FAST byte messageH[] = {0xA6, 0x12, 0x02, 0XF1, 0x14, 0x7E}; // LIGHT OFF & ESC ON & KPH & SLOW byte messageI[] = {0xA6, 0x12, 0x02, 0XF3, 0x14, 0xEF}; // LIGHT Flash & ESC ON & KPH & SLOW byte messageJ[] = {0xA6, 0x12, 0x02, 0XF5, 0x14, 0x45}; // LIGHT ON & ESC ON & KPH & SLOW byte messageK[] = {0xA6, 0x12, 0x02, 0XF1, 0xE4, 0x0A}; // LIGHT OFF & ESC ON & KPH & FAST byte messageL[] = {0xA6, 0x12, 0x02, 0XF3, 0xE4, 0x9B}; // LIGHT Flash & ESC ON & KPH & Fast byte messageM[] = {0xA6, 0x12, 0x02, 0XF5, 0xE4, 0x31}; // LIGHT ON & ESC ON & KPH & FAST void setup() { // initialize Serial1: Serial.begin(9600); pinMode(powerPin, OUTPUT); digitalWrite(powerPin, HIGH); Serial.write(messageA, sizeof(messageA)); delay(500); } void loop() { delay(500); // Pick what ever driving profile you want and remove the "//" to make that part of the code active //Serial.write(messageB, sizeof(messageB)); //Serial.write(messageC, sizeof(messageC)); //Serial.write(messageD, sizeof(messageD)); //Serial.write(messageE, sizeof(messageE)); //Serial.write(messageF, sizeof(messageF)); //Serial.write(messageG, sizeof(messageG)); //Serial.write(messageH, sizeof(messageH)); //Serial.write(messageI, sizeof(messageI)); //Serial.write(messageJ, sizeof(messageJ)); //Serial.write(messageK, sizeof(messageK)); //Serial.write(messageL, sizeof(messageL)); //Serial.write(messageM, sizeof(messageM)); } === Found in hex dump: "0xa6,0x12,0x2,0x95,0x1,0xbd" "0xa6,0x12,0x2,0x91,0x1,0x86" The reason I mentioned 3-6 occurences is that one of the matches contains coming four sequences in one straight sequence. 0xa6,0x12,0x2,0x90,0x1,0x42,0xa6,0x12,0x2,0x89,0x1,0x1c,0xa6,0x12,0x2,0x8d,0x1,0x27,0xa6,0x12,0x2,0xf2,0x1,0x89 === conclusoes: Lights: ON -- A6 12 02 8D 01 27 OFF -- A6 12 02 89 01 1C Sound: CONFIRMCAO ?? A6 12 02 90 01 42 R2D2 -- A6 12 02 89 01 1C ESC: ?? A6 12 02 F2 01 89 ?? A6 12 02 A9 01 DD ?? A6 11 01 80 01 42 === Ok, so I got my ES-200G running yesterday. I reach 37km/h on freewheel, haven't tested with load yet since my scoot is in a thousand pieces on my workbench. These are the codes I used: {0xA6, 0x12, 0x02, 0x10, 0x14, 0xCF} - boot the scooter, lights on, km/h, sent once at startup {0xA6, 0x12, 0x02, 0XF5, 0xE4, 0x31} - this is sent every 500ms === #include FastCRC8 CRC8; bool firstdigit = 0; //Still unknown function bool seconddigit = 0; //Still unknown function bool fastAcceleration = 1; //1 for on, 0 for off bool KPH = 1; //1 for KPH, 0 for MPH bool fifthdigit = 0; //Still unknown function bool Light = 1; //1 for on, 0 for off bool LightBlink = 0; //1 for on, 0 for off bool ESCOn = 1; //1 for on, 0 for off int SpeedLimit = 255; //Beetwen 0 and 255 int forth = 0; byte buf[6] = {0xA6, 0x12, 0x02}; void setup() { Serial.begin(9600); calculateforth(); buf[3] = forth; buf[4] = SpeedLimit; buf[5] = CRC8.maxim(buf, 5); } void loop() { Serial.write(buf, sizeof(buf)); delay(500); } void calculateforth() { if (firstdigit == 1){ forth = forth + 128; } if (seconddigit == 1){ forth = forth + 64; } if (fastAcceleration == 1){ forth = forth + 32; } if (KPH == 1){ forth = forth + 16; } if (fifthdigit == 1){ forth = forth + 8; } if (Light == 1){ forth = forth + 4; } if (LightBlink == 1){ forth = forth + 2; } if (ESCOn == 1){ forth++; } } === or take several diodes in throughput direction in series, works also. (500-700mV per regular silicon diode) There will be no big current and therefore no big in rush at all. The biggest option would be when using a ESP32 for example but even that chips doesn't draw more than 200mA @ 3,3V. The LM2596 has a converting efficiency around 94% plus it takes approximately 5-8mA to power itself so if you lower the input voltage about 10V we're talking about 17-32 volt to the regulator what is within its operating range. 200mA @ 3,3V= 660mW, 660mW divided by 0.94~=702.1mW, for the highest current we take 17V as lowest case so 702.1mW divided by 17V = 4,13mA, 4,13ma plus 8mA selfpower is 12,13mA, 10V diodes loss times 12,13mA = 121,3mW loss in heat on the diode when powering a ESP32 in full load giving approximately 88% safety factor when using a 10V 1W type. Cheers === // RemoteXY select connection mode and include library #define REMOTEXY_MODE__ESP32CORE_BLE #include // RemoteXY connection settings #define REMOTEXY_BLUETOOTH_NAME "Your Scooter" #define REMOTEXY_ACCESS_PASSWORD "password" // RemoteXY configurate #pragma pack(push, 1) uint8_t RemoteXY_CONF[] = { 255,4,0,0,0,155,0,8,8,1, 2,0,6,16,22,11,4,26,31,31, 79,78,0,79,70,70,0,129,0,8, 8,18,6,16,80,111,119,101,114,0, 2,0,36,18,18,8,1,26,31,31, 79,78,0,79,70,70,0,129,0,39, 10,12,6,16,70,97,115,116,0,3, 3,13,48,9,25,3,26,129,0,14, 38,15,6,16,76,105,103,104,116,0, 129,0,27,49,8,6,16,79,110,0, 129,0,27,58,9,6,16,79,102,102, 0,129,0,27,66,24,6,16,66,108, 105,110,107,105,110,103,0,2,0,7, 89,14,7,14,26,31,31,79,78,0, 79,70,70,0,129,0,24,90,28,5, 16,79,84,65,32,85,112,100,97,116, 101,0 }; // this structure defines all the variables of your control interface struct { // input variable uint8_t switch_1; // =1 if switch ON and =0 if OFF uint8_t speed_switch; // =1 if switch ON and =0 if OFF uint8_t select_1; // =0 if select position A, =1 if position B, =2 if position C, ... uint8_t ota_update; // =1 if switch ON and =0 if OFF // other variable uint8_t connect_flag; // =1 if wire connected, else =0 } RemoteXY; #pragma pack(pop) /** httpUpdate.ino Created on: 27.11.2015 */ #include #include #include #include #include #include const char* ssid = "SSID"; const char* password = "PASSWORD"; byte slow[] = {0xA6, 0x12, 0x02, 0x35, 0x14, 0xF1}; // Speed Limit to 20 km/h byte fast[] = {0xA6, 0x12, 0x02, 0x35, 0xFF, 0x38}; // Maximum Speed byte off[] = {0xA6, 0x12, 0x02, 0x00, 0xFF, 0xEA}; byte fast_stealth[] = {0xA6, 0x12, 0x02, 0x31, 0xFF, 0x03}; byte fast_blinking[] = {0xA6, 0x12, 0x02, 0x33, 0xFF, 0x92}; byte slow_stealth[] = {0xA6, 0x12, 0x02, 0x31, 0x14, 0xCA}; byte slow_blinking[] = {0xA6, 0x12, 0x02, 0x33, 0x14, 0x5B}; int run_once = 0; void setup() { Serial.begin(9600); RemoteXY_Init (); } void loop() { ArduinoOTA.handle(); if((RemoteXY.ota_update == 1) && (run_once == 0)) { Serial.println("Booting"); WiFi.mode(WIFI_STA); WiFi.begin(ssid, password); while (WiFi.waitForConnectResult() != WL_CONNECTED) { Serial.println("Connection Failed! Rebooting..."); delay(5000); ESP.restart(); } // Port defaults to 8266 // ArduinoOTA.setPort(8266); // Hostname defaults to esp8266-[ChipID] ArduinoOTA.setHostname("Your Scooter"); // No authentication by default ArduinoOTA.setPassword((const char *)"password"); ArduinoOTA.onStart([]() { Serial.println("Start"); }); ArduinoOTA.onEnd([]() { Serial.println("\nEnd"); }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { Serial.printf("Progress: %u%%\r", (progress / (total / 100))); }); ArduinoOTA.onError([](ota_error_t error) { Serial.printf("Error[%u]: ", error); if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed"); else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed"); else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed"); else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed"); else if (error == OTA_END_ERROR) Serial.println("End Failed"); }); ArduinoOTA.begin(); Serial.println("Ready"); Serial.print("IP address: "); Serial.println(WiFi.localIP()); run_once = 1; } if((RemoteXY.ota_update == 0) && (run_once == 0)) { RemoteXY_Handler (); if((RemoteXY.switch_1 == 1) && (RemoteXY.speed_switch == 0) && (RemoteXY.select_1 == 0)) { Serial.write(slow, sizeof(slow)); } else if((RemoteXY.switch_1 == 1) && (RemoteXY.speed_switch == 0) && (RemoteXY.select_1 == 1)) { Serial.write(slow_stealth, sizeof(slow_stealth)); } else if((RemoteXY.switch_1 == 1) && (RemoteXY.speed_switch == 0) && (RemoteXY.select_1 == 2)) { Serial.write(slow_blinking, sizeof(slow_blinking)); } else if((RemoteXY.switch_1 == 1) && (RemoteXY.speed_switch == 1) && (RemoteXY.select_1 == 0)) { Serial.write(fast, sizeof(fast)); } else if((RemoteXY.switch_1 == 1) && (RemoteXY.speed_switch == 1) && (RemoteXY.select_1 == 1)) { Serial.write(fast_stealth, sizeof(fast_stealth)); } else if((RemoteXY.switch_1 == 1) && (RemoteXY.speed_switch == 1) && (RemoteXY.select_1 == 2)) { Serial.write(fast_blinking, sizeof(fast_blinking)); } else { Serial.write(off, sizeof(off)); } delay(200); } } === /* -- VOI Controller -- This source code of graphical user interface has been generated automatically by RemoteXY editor. To compile this code using RemoteXY library 2.4.3 or later version download by link http://remotexy.com/en/library/ To connect using RemoteXY mobile app by link http://remotexy.com/en/download/ - for ANDROID 4.5.1 or later version; - for iOS 1.4.1 or later version; This source code is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. */ ////////////////////////////////////////////// // RemoteXY include library // ////////////////////////////////////////////// // RemoteXY select connection mode and include library #define REMOTEXY_MODE__ESP32CORE_BLE #include #include // RemoteXY connection settings #define REMOTEXY_BLUETOOTH_NAME "VOI Controller V3" //#define REMOTEXY_ACCESS_PASSWORD "password" //dont work for me -> why? // RemoteXY configurate #pragma pack(push, 1) uint8_t RemoteXY_CONF[] = { 255,4,0,0,0,151,0,10,52,1, 2,1,12,22,39,7,52,8,31,31, 80,111,119,101,114,0,83,104,117,116, 32,100,111,119,110,0,2,1,12,34, 39,7,52,8,31,31,70,97,115,116, 32,115,112,101,101,100,0,83,108,111, 119,32,83,112,101,101,100,0,129,0, 7,4,49,6,16,86,79,73,32,67, 111,110,116,114,111,108,108,101,114,32, 86,51,0,2,1,12,46,39,7,52, 8,31,31,76,105,103,104,116,115,32, 111,110,0,76,105,103,104,116,115,32, 111,102,102,0,2,1,12,58,39,7, 52,8,31,31,80,111,119,101,114,32, 86,79,73,0,83,104,117,116,32,100, 111,119,110,32,86,79,73,0 }; // this structure defines all the variables and events of your control interface struct { // input variables uint8_t switch_power; // =1 if switch ON and =0 if OFF uint8_t switch_fastspeed; // =1 if switch ON and =0 if OFF uint8_t switch_light; // =1 if switch ON and =0 if OFF uint8_t switch_powervoi; // =1 if switch ON and =0 if OFF // other variable uint8_t connect_flag; // =1 if wire connected, else =0 } RemoteXY; #pragma pack(pop) //////////////////////////////////////////// // Scooter Command include // /////////////////////////////////////////// byte slowvoi[] = {0xA6, 0x12, 0x02, 0x65, 0x14, 0x86}; // Speed Limit to 20 km/h (tested on voi by mayaku) byte slow1[] = {0xA6, 0x12, 0x02, 0XF1, 0x14, 0x7E}; // LIGHT OFF & ESC ON & KPH & SLOW (tested by Wileok) byte slow2[] = {0xA6, 0x12, 0x02, 0XF5, 0x14, 0x45}; // LIGHT ON & ESC ON & KPH & SLOW (tested by Wileok) byte fastvoi[] = {0xA6, 0x12, 0x02, 0x35, 0xFF, 0x38}; // Maximum Speed (tested on voi by mayaku) byte fast1[] = {0xA6, 0x12, 0x02, 0XF1, 0xE4, 0x0A}; // LIGHT OFF & ESC ON & KPH & FAST (tested by Wileok) byte fast2[] = {0xA6, 0x12, 0x02, 0XF5, 0xE4, 0x31}; // LIGHT ON & ESC ON & KPH & FAST (tested by Wileok) byte off[] = {0xA6, 0x12, 0x02, 0x00, 0xFF, 0xEA}; //Off (tested on voi by mayaku) void setup() { RemoteXY_Init (); Serial.begin(9600); } void loop() { RemoteXY_Handler (); if((RemoteXY.switch_power == 1) && (RemoteXY.switch_fastspeed == 0) && (RemoteXY.switch_light == 0)) //light off + slow { Serial.write(slow1, sizeof(slow1)); } else if((RemoteXY.switch_power == 1) && (RemoteXY.switch_fastspeed) == 0 && (RemoteXY.switch_light == 1)) //light on + slow { Serial.write(slow2, sizeof(slow2)); } else if((RemoteXY.switch_power == 1) && (RemoteXY.switch_fastspeed) == 1 && (RemoteXY.switch_light == 0)) //light off + fast { Serial.write(fast1, sizeof(fast1)); } else if((RemoteXY.switch_power == 1) && (RemoteXY.switch_fastspeed) == 1 && (RemoteXY.switch_light == 1)) //light on + fast { Serial.write(fast2, sizeof(fast2)); } else if((RemoteXY.switch_power == 1) && (RemoteXY.switch_fastspeed) == 0 && (RemoteXY.switch_powervoi == 1)) //voi slow + light??? { Serial.write(slowvoi, sizeof(slowvoi)); } else if((RemoteXY.switch_power == 1) && (RemoteXY.switch_fastspeed) == 1 && (RemoteXY.switch_powervoi == 1)) //voi fast + light??? { Serial.write(fastvoi, sizeof(fastvoi)); } else { Serial.write(off, sizeof(off)); } delay(200); } === Max speed: #include int powerPin = 5; byte messageA[] = {0xA6, 0x12, 0x02, 0x10, 0x14, 0xCF}; byte messageB[] = {0xA6, 0x12, 0x02, 0x11, 0x14, 0x0B}; byte messageC[] = {0xA6, 0x12, 0x02, 0x35, 0xFF, 0x38}; void setup() { // initialize Serial: Serial.begin(9600); pinMode(powerPin, OUTPUT); digitalWrite(powerPin, HIGH); } void loop() { delay(500); Serial.write(messageC, sizeof(messageC)); } === Niebieski - 13 (3v3) Zielony - 17 Głośnik - 26 ==