Before you ask why I want to run BLDC Tool on a Raspberry Pi, why not?
There would be so many things you can achieve if you had realtime access to your VESC. you could program things to work in a certain way. besides, you could do a lot more by adding motion, heat sensors etc.
I tried compiling the BLDC Tool on a raspberry pi 2 running on Raspbian Jesse, with no luck. I think thats because I was unable to make Qt work on the Pi.
Before I give more details regarding what went wrong when I tried compiling the BLDC Tool on the pi, I just wanted to see if anyone had any luck with this.
I owe you lunch! After eight hours of fiddling around trying to compile the qt app on the raspi, this was the only thing that made it work. Thanks, man! I will make a short how-to guide about this soon.
Would you be able to source some sort of screen to go with itā¦ like some kind of touch screen or maybe a clamshell device with a screen and keyboard?
@longhairedboy I already tried doing that on a 3.5 inch GPIO touchscreen. But since qt apps dont scale like that, it was impossible to see the whole window without maybe panning around the screen. Instead I was thinking of creating an iphone hotspot and connecting to the raspi via VNC. Nevertheless, this is what it looked like
Adding another vesc to make use of the dual hub motors.
Editing the Ackmaniac BLDC Tool to work on smaller resolution screens WITHOUT panning. (cant show how it looks like on the screen since I had to delete the LCD Drivers for emptying space for all the qt packages)
BLDC Tool needs a locally hosted service API so it can run headless. Compiling QT for a million screens is stupid when you could load it up as a service and just plop a JS app on top of it. Any JS app. For any situation, such as these dumb tiny screens.
not very familiar with javascript. I will look what needs to be done tomorrow. it would be awesome if someone housed an LCD screen on their setup, for benchmarking with different VESC builds, motors, etc.
You could effectively do that with a data logger and then build something to parse and display the data in a usable , friendly, and possibly exciting fashion. Plenty of charts and graphs and the ability to compare them as overlays and whatever. There are apps for phones that do some of this but i would like to see a nice desktop app with big screen support for really showing all those datas and their bits. At some point iām going to do this because thatās actually something i can do. Ripping logs is a skillset i happen to have. Also replaying the log as recorded media through some kind of dashboard would be amazing.
Well done on porting to Pi, Iād love to try this too.
Any progress on writing the āHow to?ā
Iāve got a need to change contorl parameters on the fly whilst runningā¦ and recording data would be great too.
Iām using a bike hub motor in regen (For a flying wind turbineā¦ Daisy windswept-and-interesting.co.uk)
Taking a Pi out in the field is going to be better than taking my pc outā¦
For my first test all I want to be able to do is
Monitor unloaded ERPM, then set an ERPM level and send it as a UART control equivalent of the VESCtool (in Windows) button for setting ERPM speeds. Iād also like to be able to send the equivalent stop command to avoid any regen.
Iām hoping to eventually use live wind data or line angle data to set rotor speeds.
Any bonus functionality like displaying voltageā¦ rocks!
thanks
I first started with the standard raspbian jesse OS. You need to update and upgrade your OS to make sure everything is working fine. So begin with entering these:
sudo apt-get update
sudo apt-get upgrade
Depending on your internet connection, this might take a while. After this, you are going to get the dependencies to compile bldc-tool on your raspberry pi:
sudo apt-get install qt-sdk
Always good practice to restart after this.
make sure you have the correct bldc-tool for your specific firmware. I used the @Ackmaniacās bldc-tool for my setup, since it supports v2.54
After this, change your working directory on the terminal to the folder where bldc-tool files are.
cd /(PATH TO YOUR BLDC-TOOL FILES)
Now we have to add some parameters into the vesc_tool.pro file. Open that with nano:
nano vesc_tool.pro
add this line to the end of the file. press ctrl+c and then type Y to save your changes:
CONFIG += C++11
afterwards, run these two lines to clear your working space:
make clean
qmake
You will have to wait for a while, it took me around 5-7 minutes to compile everything together. At the end you should have a new file called BLDC_Tool . Run this line in the BLDC_Tool directory to run the program:
./BLDC_Tool
I might be wrong about the file name but it should be a file with no extension. Let me know if you run into any problems. It would be a nice idea to create a mobile hotspot and make the raspberry connect to it, and then create a VLC Connection to the raspberry to control the operation of the BLDC Tool
You might have to
sudo chmod +x BLDC_Tool
first, then
./BLDC_Tool
because I 100% definitely know what Iām talking about, mmhmm, definitely, absolutely no copy-paste at allā¦
EDIT: For future reference, b264 posted a those instructions but then deleted his post because he remembered he wasnāt going to be helpful any more, so I copy-pasted them from the edit history
Thanks for this awesome post!
It looks like it canāt run the make line and compile.
It gets me here: make: *** No rule to make target ācleanā. Stop.