An Electric Scooter Community on a Mission to Stamp out Transportation Mediocrity.

Store the power! Electric scooter battery and charging discussions go here.
By Yosupra
#56778
Hello ^

I added the code to unlock battery and monitoring
Before you have to add the library
https://github.com/DookieSheets/OKAI-Ba ... s/main.zip


#include <SoftwareSerial.h>
#include "RuipuBattery.h"

SoftwareSerial mySerial(10, 11); // RX (green wire), TX (blue wire) AND GND
RuipuBattery myBattery(&mySerial);

unsigned long timer = 0;
bool haveReadData = false;

void setup()
{
Serial.begin(9600); // Initialize serial for printing results
mySerial.begin(9600); // Initialize serial for BMS communications
}

void loop()
{
// Non-blocking timer
if (millis() - timer > 500)
{
timer = millis();

myBattery.unlock(); // Send the unlock command
haveReadData = false; // Reset the read flag
}

if (myBattery.read() && !haveReadData)
{
haveReadData = true; // Set the read flag

// Serial plotter friendly outputs
Serial.print(" % Charge:");
Serial.print(myBattery.soc()); //Battery state of charge (0% - 100%)
Serial.print(", ");
Serial.print("Voltage:");
Serial.print(myBattery.voltage()); //Battery voltage as a float
Serial.print(", ");
Serial.print("Current:");
Serial.print(myBattery.current()); //Battery current as a float
Serial.print(", ");


Serial.print("Lowest cell volt:");
Serial.print(myBattery.low());
Serial.print(", ");
Serial.print("Highest cell volt:");
Serial.print(myBattery.high());
Serial.print(", ");
Serial.print("Max T:");
Serial.print(myBattery.maxTemp());
Serial.print(", ");
Serial.print("Min T:");
Serial.print(myBattery.minTemp());
Serial.print(", ");
Serial.println();
}
}
By Yosupra
#56856
Hi all

after using, DO NOT CONNECT THE GREEN WIRE


it's seems a conflict with oled serial transmition.

I don't know why.

But use only blue and black wire.

That's it

As this was a rental version whos overstock was […]

Any one got any info on beryl bikes I seen a few[…]

LH/ TF-100 Style Display.

Hi I recently converted a Bird Zero to a personal […]

How do you operate dash without button? I have[…]