m365_dashboard icon indicating copy to clipboard operation
m365_dashboard copied to clipboard

Can not get data (tried on Micro and Leonard)

Open MaeseppTarvo opened this issue 3 years ago • 6 comments

Hey guys! Can someone lead me somewhere...

I am using exatcly the same components with same connection as mentioned everywhere: 1N4148 Diode, 0.25w 120ohm Resistor.

For me It seems that all the data is moving but the software do not know what to do with it(Arduino). I tried to change the #define XIAOMI_PORT Serial with/to #include <SoftwareSerial.h> SoftwareSerial XIAOMI_PORT(2, 3); beacuse someone suggested it awhile ago, but it gives me an error(I think I am able to fix it but I am not sure if it is worth trying because I really have tried every single thing I could find):

'XIAOMI_PORT' was not declared in this scope

With multimeter I tested against ground that data exists and the TX output value was about 3.001v.

I also went through the Russian forum https://electro.club/forum/displey_dlya_syaokata but they use LCD instead of OLED thus the code differs so much that I basically have to rewrite it which I have no problem with if I know that it will work 😄

Any help is much much appreciated

MaeseppTarvo avatar May 03 '21 18:05 MaeseppTarvo

Are you using the original M365? What's your DRV version?

augisbud avatar May 03 '21 19:05 augisbud

@augisbud Yes, I am using original M365 the EU version with custom firmware. DRV is 155, BMS 126 and BLE 090. Thank you for your very quick response 🙂

Edit: Also I forgot to mention that I am using the Pro version of the dashboard but if I understand correctly then the only value that should not work is speed but other values should be fine.

MaeseppTarvo avatar May 03 '21 19:05 MaeseppTarvo

I'm not sure where you should start, maybe try their code with the lcd, just change the lcd printing to Serial. I can't really guarantee it will work. I have acquired the M365 Pro, I believe I still have all the hardware and I will try to hook everything up to test since I see this is still being used by people.

augisbud avatar May 03 '21 19:05 augisbud

@augisbud It is good to know that you have the ability to test it, it would be awesome to know if you as a project author would be able to get correct values.

Also wanted to mention that to try with minimal code I took this repo but everything is actually same with yours. So changing #define XIAOMI_PORT Serial to #define XIAOMI_PORT Serial1 gave me some numbers and communication started :) So this is the main thing that makes difference. I honestly do not know why it workes in a first place according to this SO thread. Also had to change UCSR0B &= ~_BV(RXEN0); to UCSR0B &= ~_BV(RXEN0); because otherwise you get an undefined/undeclared errors. Unfortunately I have no idea what difference it makes or why those changes needs to be done?

However now I am confident that yours also works. Gonna try it out soon.

Edit: Managed to burn my OLED while testing, waiting for new one 😄

Edit2: I managed to get this @fogbox's project to work on Arduino Nano with Pro dashboard. All I had to do was to use SoftwareSerial instead of just Serial on my nano, also I had to use digital pins(on your choice) to avoid conflicts with regular USB output. Currently on this project I am struggling to get past the m365 bootlogo. If I do the same fix as on the foxbox's project then my the display only shows the m365 bootlogo(if not bus then no bus). But for fogbox's project I have the following fix to get his project to work:

#include <SoftwareSerial.h>
SoftwareSerial XIAOMI_PORT(11, 12);

Instead of just:

#define XIAOMI_PORT Serial

MaeseppTarvo avatar May 04 '21 06:05 MaeseppTarvo

Im sorry for my low level English... I made possible to read all values on pro 2, 1s, essential and 3 including speed value. everything works fine now! visit my GitHub page, here's soon I will release the version v0.B

Dubstaaa avatar Nov 15 '21 14:11 Dubstaaa

Im glad to share with you my project, fully compatible with multiple scooter versions. Neat dash, test release by Bruno. Available on https://github.com/Dubstaaa/NeatDash-

Dubstaaa avatar Nov 25 '21 01:11 Dubstaaa