Thought that I should get down notes about where I am with these.
Car 1 has disappeared.
Car 2 has the software to drive a servo for teh steering, and it is using a Raspberry Pi Zero so needs the Wifi dongle.
Car 3 is the basic go/stop software with 200msec on the steering. It uses the rasberry Pi Zero W.
Car 4 is the one with the big wheels that had a 2.4Ghz receiver that has been replaced by a Raspberry Pi B with Wifi dongle. This now has the software to test PWM for teh drive motor controls. I have this in the folder Robot-7-Flask-PWM.
I think I'll retire the earlier cars and all new developments will be on car 4. I don't know what they will be. I will have to add reverse to it though.
The next thing to do is to put together the videos of all the cars working and post that to Youtube. That might take a while.
9 Sept 2020
Have added reverse to software. I note that in the App.py that forward was pin 12 and backwards pin 16, but to use PWM pin 16 was moved to pin 18. as the Motor.Forward links were only used for the reverse, I was able to change the pin assignments of these. This is obviously the wrong way round for previous cars.
For the reverse I had to add something to set the PWM to zero, then sleep a short time before doing reverse. A few bugs were ironed out during the process.
Looking for RC controller stuff for a Raspberry Pi, I came across the following links:
https://shop.pimoroni.com/products/adafruit-16-channel-pwm-servo-bonnet-for-raspberry-pi?variant=2821150736394¤cy=GBP&utm_source=google&utm_medium=cpc&utm_campaign=google+shopping&gclid=Cj0KCQjw-uH6BRDQARIsAI3I-UdoGbdVU0wVKsOCJAsGiiw9ZMeYTE6X-RtvnUTiUlhKIUjIw-PfI7EaAjgJEALw_wcB
https://uk.farnell.com/adafruit/2327/raspberry-pi-pwm-servo-hat-development/dp/2816274?gclid=Cj0KCQjw-uH6BRDQARIsAI3I-UdGdSobItTuJDYXLEFADLZdeedIvkMqmCsglRsPXdGTTD9QidX7MIgaApHNEALw_wcB&gross_price=true&mckv=s_dc|pcrid|459820056211|plid||kword||match||slid||product|2816274|pgrid|104445616701|ptaid|aud-901284956870:pla-304647303753|&CMP=KNC-GUK-SHOPPING-SMEC-Whoops-Newstructure-31Aug2020
https://github.com/bskari/pi-rc#:~:text=pi%2Drc%20is%20a%20program,a%20rather%20powerful%20radio%20transmitter.
-- used a GPIO pin to transmit at 27MHz or 40 MHz?
-- has a link to a post about how RC works by using a different number of pulses to give the command.
https://www.instructables.com/id/Raspberry-Pi-RC-Control/
https://www.raspberrypi.org/forums/viewtopic.php?t=157159
- Some guy looking for assistance in doing it.
https://projects.raspberrypi.org/en/projects/remote-control-buggy
Uses Blue-dot program on tablet that uses Bluetooth. Good instructions on how to build a basic 4 button controller.
- - - -
Been thinking about this 4 button controller on a Raspberry Pi, and how I could replace the current system that I have. One post suggested MQTT to talk between Pi's and gave a good refence to it at:
http://www.steves-internet-guide.com/introduction-to-mqtt-sparkplug-for-iiot/#more-14899
Here is a good explanation:
https://diyi0t.com/microcontroller-to-raspberry-pi-wifi-mqtt-communication/
and look at others of his to see how to use buttons with a microcontroller.
https://tutorials-raspberrypi.com/raspberry-pi-mqtt-broker-client-wireless-communication/
MQTT Client on Android:
https://play.google.com/store/apps/details?id=net.routix.mqttdash&hl=en_GB
Think about it and try it?
13/9/20 Trying that R-Pi stuff on card#1
Necessary to install pip: sudo apt install python3-pip
No comments:
Post a Comment