树莓派小车电机测试

December 6, 2017

安装GPIO库

cd  ~

sudo  apt-get  updata
sudo apt-get install build-essential python-pip python-dev python-smbus git
git clone https://github.com/adafruit/Adafruit_Python_GPIO.git
cd Adafruit_Python_GPIO
sudo python setup.py install

cd  ../

sudo rm -fr Adafruit_Python_GPIO

下载测试程序

mkdir   osoyoo-robot/motor-test

cd  osoyoo-robot/motor-test

wget http://osoyoo.com/driver/osoyoo_PCA9685.py

wget http://osoyoo.com/driver/motor-test.py

运行测试程序

python    motor-test.py

运行motor-test.py后小车会按照下面顺序运动:

前进–>后退–>左转–>右转–>停止

按照这样的顺序不断循环

Leave a Reply

WordPress spam blocked by CleanTalk.
Previous Post
«
Bombax Theme designed by itx