Wednesday 21 February 2018

U3A robot - get the motors running

This is a record explaining the build on the robot RaspberryPi.

For now we're using the adafruit DC motor hat
  1. Fresh SD card image with Raspbian stretch lite
  2. Add wpa-supplicant file and ssh file to card
  3. Boot up pi and log in via ssh
  4. expand filesystem, change password, and change machne name (raspi-config)
  5. enable i2c (raspi-config)
  6. mkdir github, cd github
  7. sudo apt-get install git python3-dev python3-pip
  8. sudo apt-get install nfs-kernel-server  # if you want to remotely access files on this pi
  9. install the adafruit python library and setup
  10. make sure you are in the Adafruit examples library:
    cd ~/github/Adafruit-Motor-HAT-Python-Library/examples
Here's the motor HAT plugged into an Rpi Zero, the power is taken from the RPi's 5V supply (these are only little motors) and motors 3 & 4 are hooked up on my baby robot chassis. The example program DCTest.py now happily drives one of the motors.

No comments:

Post a Comment