Ultimate VESC Controller with OLED

Nice update, have you been working on any firmware recently?

No need to. All the RG stuff is ready to go

1 Like

Finally got all of my shit out of the warehouse! Time to get high on some solder fumes!!! Will work on the remote soon. PS: iPads have potatoes for cameras, fuck you apple.

3 Likes

How is it going?

Haven’t set up all my gear at my house yet. Probably this weekend. Got so much stuff with school no more ESK8 time :frowning:

3 Likes

No news = good news ?

On holiday currently. No news = no news

1 Like

Well, Enjoy your off time !

1 Like

Lol depending on cost I may buy one in a month or two if there are any left

1 Like

SPI has a higher refreshrate^^ and does not consume any Analog pins^^

I asked @RollingGecko to implement the support for LIION Batterys for the Nunchuck. Atm i try to help him out^^ (he is trying to implement). I added to the OLED some features for example that u see the drawing watts /Max watts , and that u see the voltage of the remote Lipo.

After 6 months I’m finally working on this again! From my understanding there are a few other remotes that seem to be finished since this one but I’ll continue to work on this. @RollingGecko there seems to be two issues with the latest version, my display will not work any more and I am getting no response from the joystick. I have also put my VESC settings in the pictures below. Should I be using NRF or UART? I’m guessing I should’ve used UART because it goes through an Arduino first?

Glad to be back on the forum too guys. Should be really active during these 6 weeks of holidays!

9 Likes

You need to use UART to communicate between vesc and arduino. The library for fw 3.x is currently not working correctly. Id suggest you downgrade your vesc firmware to an old version. Then it should work just fine.

@RollingGecko made a thread about it: http://www.electric-skateboard.builders/t/tester-needed-for-vescuartcontrol-with-new-interface/38476

Currently VescUartControl is working but ArduBoardControl has some hiccups, maybe you can find a fix! I’m trying to work on this when i finish my own remote project and expand ArduControl a bit.

Alright, I’m using UART now on a baud rate of 115200 as recommended on that German site that RollingGecko put on his GitHub.

First problem was that all the char variables needed to be changed to const char. That solved about 6 DrawScreen errors for me.

I’m using @Ackmaniac latest firmware. 2.54 or something? Is that a problem?

So I’ve worked a bit on the TX, RX, and VESC UART Sample code. Had a few DrawScreen warnings/errors on the TX code which were fixed by changing all the char to const char as mentioned above.

In the RX code I’m still receiving this error in the Arduino IDE:

/Users/myusername/Desktop/ArduBoardControler-master/ArduBoardControler_Rx/ArduBoardControler_Rx.ino: In function ‘void loop()’: /Users/myusername/Desktop/ArduBoardControler-master/ArduBoardControler_Rx/ArduBoardControler_Rx.ino:100:77: warning: large integer implicitly truncated to unsigned type [-Woverflow] radio.writeAckPayload(pipe, &VescMeasuredValues, sizeof(VescMeasuredValues));

I believe this is because we are truncating a type that doesn’t have enough bytes or storage or something to a lower type? Could this also muck up the values?

The third error which I fixed for VESC UART Sample was the vescuart.cpp script in the VESC UART Control library which set a value to NULL and was ignored by replacing NULL with a 0.

I’m no programmer (this is just me with a bit of google work) so I don’t think these are big changes and may even be the wrong changes but they certainly have eliminated some errors.

Now onto working with the example in the VESC UART Control library. I’m having issues with communicating with the VESC. Both baud rates are on 115200 and I’m using the serial monitor but I’m getting a failed to read data error.

Here’s the code for the VESC UART Sample:

// the setup function runs once when you press reset or power the board // To use VescUartControl stand alone you need to define a config.h file, that should contain the Serial or you have to comment the line // #include Config.h out in VescUart.h

//Include libraries copied from VESC #include “VescUart.h” #include “datatypes.h”

#define DEBUG unsigned long count;

void setup() {

//Setup UART port Serial1.begin(115200); #ifdef DEBUG //SEtup debug port Serial.begin(115200); #endif }

struct bldcMeasure measuredValues;

// the loop function runs over and over again until power down or reset void loop() { //int len=0; //len = ReceiveUartMessage(message); //if (len > 0) //{ // len = PackSendPayload(message, len); // len = 0; //}

if (VescUartGetValue(measuredValues)) { Serial.print("Loop: "); Serial.println(count++); SerialPrint(measuredValues); } else { Serial.println(“Failed to get data!”); }

}

So I tried uncommenting #include “Config.h” out in VescUart.h and then I get an error saying unable to find Config.h. Tried again this time but did a path directly to Config.h and still got errors.

In the VESC UART Sample script it tells me that Serial1.begin is undefined. Then I tried to include Config.h in the VESC UART Sample script and still got an undefined error.

@RollingGecko what do you think the problem could be here?

@Der6FingerJo I believe you had success with this on a later firmware of VESC. Maybe I’m using the wrong VESC UART library?

There are 2 versions of VescUartControl right now, one for older firmwares and one for 3.xx firmware. You can find the new one as a branch on GitHub. I had success using the new one (called Vesc 6) on an Arduino Mega with 3.xx firmware without modifying anything in the example sketch.

I’m using an Arduino Nano. That may be where the problem lies. So for my 2.54 firmware VESC should I be using 0.1.5 or Master @RollingGecko ?

I’m happy to help solve the nano problems if you can direct me to the next step from here.

@RollingGecko how’s it all going? Have there been some bug fixes?

1 Like