Skip to content

eacdy/picarx-cpp

 
 

Repository files navigation

PICAR-CPP

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.

SMBUS and I2C

For clarification of smbus concepts, check the following:

C source code of smbus and initialization code come from

PWM: Pulse Width Modulation

Check wikipedia or the following:

Timer Registers

Check 2.2 of the following for clarification of prescaler, arr, period, frequency, etc:

The main takeaway is the following:

GPIO Pin Access

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.

Joystick

Install deps:

sudo apt-get install joystick

For usage, check:

About

picar-x rewritten in cpp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 66.8%
  • C 28.1%
  • CMake 5.1%