Wednesday 4 November 2020

Thoughts on RC Boat using Raspberry Pi and MQTT

 First off, I don't have a boat. 

Then I have done servo steering on RC-car-2  even if it is by Flask and web interface. And the servo was a step move and return after a short time.

Things that I need to know about are  how to do incremental movements of a servo AND of the throttle at the same time using MQTT. There is an app called Linear MQTT that I should look at. 

I also need to know how to pass a value across from the Publisher to the Subscriber and act on it in the incremental mode, rather  than having a different subroutine for every value. 

If I was to use a publisher other than one on my Android tablet, It couldn't use a Raspberry Pi, because that does not have an incremental input, whereas the Arduino Uno has an analog input. 

15/Feb/2021  I have been building a boat by hot-glue sticking  panels of plastic left over from my cutting up a 'square' gutter.  It floats.  I have a motor from an old RC car. It is a PEAK Motor and looks like the standard Brushed  27T motor described at rcscrapyard.net. I don't know yet whether it will run driven by PWM or not. That's a test for tomorrow. 

I have a HW-95 driver board. I have used my 3D printer to print a propeller and also a case for a 18650 Battery (ex Laptop Battery pack). 

I have a servo to use for the rudder.  Car-2 was servo steered and it looks like it used MicroSD Memory card #4.  I shall have to use that to test. It might not need much modification for the servo movement. I can take that over as Car-2 has been disposed of. 

Using the software for RC_Car-11-MQTT I have discovered that this small motor will run at varying speeds  using PWM. 

Next Iteration is to use this same software to have PWM Steering as well as motor control I think. 

And while I am about it, change the Wemos software to transmit PWM Percentages, so that I can use the Pot on the controller to adjust the steering.