This is an attempt to do some funny stuff with sunfounder's picar-x smart video car kit. Some ideas include:
- Rewrite controllers of motors and servos in cpp and move the car successfully with code.
- Connect the car with a wireless joystick and turn it into a remote-control car.
- Refactor controllers and sensor drivers into nodes inside a DCPS system like opendds (ROS is enough but why not DDS)
- A web-based UI to control the car and display sensor outputs.
- Perception stuff (human face detection/edge detection/freespace detection) with the sensors, especially the camera.
- Hook the raspberry pi with an edge TPU or other acceleration hardware to achive usable performance.
- A simple planner that helps the car to achive self-driving in limited environment.
For clarification of smbus concepts, check the following:
- https://www.totalphase.com/blog/2020/09/overview-of-smbus-functions/
- https://raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
C source code of smbus and initialization code come from
Check wikipedia or the following:
Check 2.2 of the following for clarification of prescaler, arr, period, frequency, etc:
The main takeaway is the following:
GPIO Pin access is completed with the wiringPi library. Its default pin numbering is different from that of Raspberry Pi. For details see here.
Pin numbering, pin mode and pin value can be checked with command gpio readall
.
Install deps:
sudo apt-get install joystick
For usage, check: