I began learning Python a little over a year ago with no specific goal in mind. The versatility of Python and the community that supports the language was not lost on me and I immediately wanted to know what I could control. I had a wheelchair base with no working electronics other than the motors, that I converted to be radio controlled using a Sabertooth 2x32 motor controller and a Flysky FS_iA10B Receiver.
I recently connected a Raspberry Pi W 2 running Raspbian OS and wrote a custom python script, using a Sabertooth Python library allowing for control through keyboard presses, sensors, cameras. My current goal with this project is to learn more about OpenCV, IR sensors, Ultrasound sensors, etc. to have obstacle avoidance capabilities. It can be easily switched from RF mode to Python mode. When connected to the same network, I can remote into Raspbian to edit, and run code, quickly from my laptop or tablet.
I moved forward with testing Infrared sensors as a way to avoid obstacles. This worked well with some issues.
I 3D modeled some caps for the corners of the robot base. I designed them to hold two IR sensors perpendicular to each other. This allowed for two pointing forward, one left, and one right. I will expand this configuration to the back as well, with a total of 8 sensors, 2 in each direction.
I learned a lot about obstacle avoidance and IR sensors but I think this is a small step to making this thing very good at avoiding objects. I want to add more sensors, angle them downwards a bit to detect items at a lower height. I could also integrate a servo to "sweep" an area with the IR sensors or add ultrasonic sensors. I've also found some better IR Sensors that I could also use on AliExpress, I may try these out.
Some other options I've been looking into would be LiDAR modules to map out a larger area and have more capabilities or a camera with Open CV for gesture control and obstacle avoidance. I do have some gyroscope's I purchased for another project that I can try to get working with this device. Would be fun to have control using a glove. I will update again when I've made some progress!
This past December I ended up catching Covid and needed to quarantine. With this extra time, I added Bluetooth control to the "robot" using a PS4 into the current code. It was pretty fun getting everything working.
I also took this time to rewire the batteries and add a power meter to the machine. I also have an emergency stop switch I want to add but I overdid it while sick and was exhausted after rewiring everything, so I'll be adding the E-Stop switch next time.
Bluetooth control works very well, much better than the keyboard control I was messing with. There are many options in the Python library I used that I want to explore and play around with to add some cool features.