Posts: 42
Threads: 6
Likes Received:
5 in 5 posts
Likes Received:
5 in 5 posts
Reputation:
5
Joined: Jan 2021
Country:
Hi Rob, I had the version 6.5 of Robo-tank and controller v1.I Had à Power outage and my rpi restarted.But it no longer works correctly, no more probe, no more command Dc pump control, the icon plugged stay red.i Wanted to reinstall rpi iOS and install v6.6,but now we can’t find buster on rpi imager. They deleted it. If you can Help me that would be nice
Posts: 3,220
Threads: 90
Likes Received:
162 in 119 posts
Likes Received:
162 in 119 posts
Reputation:
183
Joined: Sep 2015
Country:
Hi Tutuss21, sorry for such a long delay, I was away and lost access to my home computer.
This isn't good, I wondering what happened there. I just updated my pi imager and yeah I see it's been removed as it's too old I guess. The reason it's not working is the app needs to be compiled for the OS version, here's how you do it.
In the Pi SSH terminal type the following commands.
sudo systemctl stop robotank.service
cd /var/www/html/cpp
g++ -o robotank robotank.cpp `mysql_config --cflags --libs` -lwiringPi -lpthread -lquickmail -lcurl -lwebsockets
sudo ./robotank
After the 4th command the program should startup, you should see a lot of data print to the terminal, if that happens you can press CTRL + C to exit the app and then run the following to command to start the service again so it runs in the background. Note if you keep the program running from starting it manually with the 4th command the program will stop running if you close the terminal window so make sure to use the service instead.
sudo systemctl start robotank.service
Hope this sorts it out.
Posts: 42
Threads: 6
Likes Received:
5 in 5 posts
Likes Received:
5 in 5 posts
Reputation:
5
Joined: Jan 2021
Country:
Hi, this procedure works with bullseyes or more ?
Posts: 3,220
Threads: 90
Likes Received:
162 in 119 posts
Likes Received:
162 in 119 posts
Reputation:
183
Joined: Sep 2015
Country:
It should work for any variant of the OS. There's a couple libraries I'm using that is causing this problem, they need to be compiled for the OS version being used, I think I'm ready to remove one of the libraries and then will work on the other one so the program runs on any OS version without needing to be compiled.
Posts: 42
Threads: 6
Likes Received:
5 in 5 posts
Likes Received:
5 in 5 posts
Reputation:
5
Joined: Jan 2021
Country:
Hi, ok I will closely follow the updates
Posts: 3,220
Threads: 90
Likes Received:
162 in 119 posts
Likes Received:
162 in 119 posts
Reputation:
183
Joined: Sep 2015
Country:
Hmmm, it does seem related to I2C, do you get addresses 40, 63 and 70 when you run the following command in the SSH terminal?
sudo i2cdetect -y 1
If you login into the database and go to the "i2cDevices" table set the "enabled" field to 0 for each record, then restart the app to see if it runs. Then enable address 99 (onboard pH) and reboot to see if it runs, then enable address 64 (pca9685) and see if it still runs after reboot. If you send a picture of the "i2cDevices" table as the problem could be something there.
Posts: 3,220
Threads: 90
Likes Received:
162 in 119 posts
Likes Received:
162 in 119 posts
Reputation:
183
Joined: Sep 2015
Country:
Oh looks like you have a version 1 controller? The pH address has changed from 99 to 32 but seems to be working so should be ok. If the pH ever stops working let me know and I'll send you an external pH circuit. Based on the first picture for some reason the pca9685 wasn't enabled, that would explain why a DC port crashed the program. In the database change "enabled" to 1 for the 2nd and 3rd record, the 1st record should stay 0. Then reboot the controller and it should be ok.
Posts: 3,220
Threads: 90
Likes Received:
162 in 119 posts
Likes Received:
162 in 119 posts
Reputation:
183
Joined: Sep 2015
Country:
Ah sorry that happened, not sure what went wrong but it looks like it messed up the custom name and portTypeID. Might be better to fix in the database. The "portName" column is correct so you can use it to adjust the records that aren't correct.
If you click on the "pinsType" table on left side you'll see all the types, the 1st column "portTypeID" is the number you want to enter in the "pinsAvailable" table in "pinTypeID" field. An AC outlet is 1, DC port is 2, a sensor can be 6, 7, 8 or 9. After you get it back on track you can change the sensor type in the UI.
Hope I'm making sense.
Posts: 42
Threads: 6
Likes Received:
5 in 5 posts
Likes Received:
5 in 5 posts
Reputation:
5
Joined: Jan 2021
Country:
Hi Rob ! Thanks for your advice. I put it back in order database. It seems to work. I will test v6.6. Thanks a lot for your help
Posts: 3,220
Threads: 90
Likes Received:
162 in 119 posts
Likes Received:
162 in 119 posts
Reputation:
183
Joined: Sep 2015
Country:
Hi Tutuss21, glad to hear that and sticking with it, was playing in the code the other night so more to come.