M
Marze6989
- Dabei seit
- 04.06.2020
- Beiträge
- 54
- Reaktionspunkte
- 23
.
So I made another code for the NCM Moscow Plus 29 inch. I don't know for sure if it runs into the other. I only did it so that my thumb throttle has 6 km / h without tuning and has full power with tuning. Since levels 1-6 without light, the tuning is deactivated and thumb throttle 6 kmh and with light all levels tuned with better response and the thumb throttle with full power.
I have the Moscow plus 29 inches. It runs absolutely perfectly there.
Code:/* New version of the C7 display communication The display sends 12 bytes, the controller replies with 10 bytes, the display sends another 9 bytes ATTENTION: there is no more speed display when outputting to a serial monitor! Check sum is calculated from b1 - b7 and is divided into high and low bytes * / #include <SoftwareSerial.h> #define BAUD_RATE 9600 SoftwareSerial swSer1 (12, 13, false, 256); // Software serial 1 on GPIO12 and 13 SoftwareSerial swSer2 (14, 15, false, 256); // Software serial 2 on GPIO14 and 15 byte rb = 0; byte rb2 = 0; byte sb = 0; boolean tune = false; boolean SerialOutput = false; // if true, the data is sent to the serial monitor boolean SerialOutput2 = false; // if true, the data is sent to the serial monitor void setup () { Serial.begin (BAUD_RATE); swSer1.begin (BAUD_RATE); swSer2.begin (BAUD_RATE); } void loop () { if (swSer1.available ()) // if there is new serial data { rb = swSer1.read (); // save receive byte in rb if (rb == (0xC1)) // if speed step 1 is activated { sb = 0xC1; // change sendbyte to speed step 1 tune = true; // "Tuning" is active } else if (rb == (0xC2)) // if speed step 2 is activated { sb = 0xC2; // change sendbyte to speed step 2 tune = true; // "Tuning" is active } else if (rb == (0xC3)) // if speed step 3 is activated { sb = 0xC3; // change sendbyte to speed step 3 tune = true; // "Tuning" is active } else if (rb == (0xC4)) // if speed step 4 is activated { sb = 0xC4; // change sendbyte to speed step 4 tune = true; // "Tuning" is active } else if (rb == (0xC5)) // if speed step 5 is activated { sb = 0xC5; // change sendbyte to speed step 5 tune = true; // "Tuning" is active } else if (rb == (0xC6)) // if speed step 6 is activated { sb = 0xC6; // change sendbyte to speed step 6 tune = true; // "Tuning" is active } else if ((rb == (0x06)) && (tune == true)) // change all speed steps activated { sb = 0x00; // change sendbyte to all speed levels tune = true; // "Tuning" is active } else if ((rb == (0x1A)) && (tune == true)) // if tuning is active and the byte for the maximum speed comes { sb = 0x2D; // adjust the max.speed 2D = 45 km / h } else if ((rb == (0x12)) && (tune = true)) // if tuning is active and the low byte for the checksum comes { sb = 0x1F; // Adjust checksum } else if ((rb == (0x13)) && (tune = true)) // if tuning is active and the low byte for the checksum comes { sb = 0x20; // Adjust checksum } else if ((rb == (0x14)) && (tune = true)) // if tuning is active and the low byte for the checksum comes { sb = 0x21; // Adjust checksum } else if ((rb == (0x15)) && (tune = true)) // if tuning is active and the low byte for the checksum comes { sb = 0x22; // Adjust checksum } else if ((rb == (0x16)) && (tune = true)) // if tuning is active and the low byte for the checksum comes { sb = 0x23; // Adjust checksum } else if ((rb == (0x17)) && (tune = true)) // if tuning is active and the low byte for the checksum comes { sb = 0x24; // Adjust checksum } else if (rb == (0x0D)) // when we are at the end of the data set, reset "tuning" { tune = false; } else // otherwise pass the bytes through { sb = rb; } swSer1.write (sb); // send a byte to the controller if (SerialOutput == true) { Serial.print ("received:"); Serial.print (rb, HEX); Serial.print ("new:"); Serial.println (sb, HEX); } } }
Das Funktionier nur mit einem Daumengas, die Schiebehilfe bleibt immer 6 Km/h.Ich habe versucht, diesen überarbeiteten Code auf meinem NCM Moskau mit L7-Display zu verwenden, der es der "Walk" -Funktion ermöglichen soll, das Fahrrad mit maximaler Geschwindigkeit zu fahren, wenn das Display leuchtet.
Die zusätzlichen Zeilen, die dem früheren Code hinzugefügt wurden, bewirken weiterhin, dass die unterstützte Höchstgeschwindigkeit etwa 36 km / h erreicht. Leider ist die durch Drücken der Taste "Gehen" erreichte Geschwindigkeit immer noch auf 6 km / h beschränkt
Hi
Forgive the response in English, but I hope / think you'll be pleased with the result ...
I too had problems with the software serial and modified two of the early lines to remove the fourth argument. The attached file should work provided you either have 29 "wheels or set the controller display to think you have 29" wheels. It may also work with the smaller wheels. It also allows a throttle (if fitted) to drive the the unassisted speed of the bike to around 35kph. Let me know if it works.
All credit to Earlier Contributors to this thread particularly Vspadrva and Marze
J
Excellent newsWorks great, Thank you
Nimm den Code von Matze aus dem post 180.Habe den Code von Jokskot vom Eintrag #190 mit einem esp8266 getestet, beim NCM Milano +, C7 Display, 28" leider ohne Erfolg. Klappt gar nicht. Davor den Code von Marze6989 da funktionierte es bei Stufe 2/Licht kurzzeitig mit falschen Km angaben im Display, sowie Daumengas und nach einigen Min. Totalausfall. Daraus schließe ich das die Verdrahtung generell richtig ist. Werde das Projekt jetzt aufgeben.
Meine Frage wenn ich nur das Daumengas, ohne den esp anschließe, funktioniert das dann bis Endgeschwindigkeit oder nur bis 6 km?
Gruß Lionz
Halli hallo....Nimm den Code von Matze aus dem post 180.
Der muss funktionieren.
Wo willst du das Daumengas anschließen???
Hast du eine Anschluß an deinem Display oder willst du es einfach in das Kabel löten??
Hallo Markustoe,Diese Funktionen wurden schon vor einiger Zeit abgeschaltet, OTon NCM, automatisiert....