Getting started

You are just a few steps away from coding your robot

Adafruit i2c detect Image source : Adafruit.com

Step 3 Configuring Adafruit 16-Channel PWM/Servo HAT

Step 4 Setting up GitHub

  • In the terminal, enter the following commands :
    • sudo apt-get install git (install git client for terminal)
    • cd (go to home folder)
    • mkdir RasPiBot_GitHub (create a folder)
    • cd RasPiBot_GitHub (go into RasPiBot_GitHub directory)
    • git clone https://github.com/RasPiBot/RasPiBot.git (download Library from GitHub)
    • cd RasPiBot(move to the code directory)
    • python RasPiBot.py(your robot should move is neck)
RasPiBot constantes

Step 5 It's time to have fun! CODING!!!!

  • sudo nano RasPiBot.py (press down arrow until you reach end of file)

Demo code is really simple. We instanciate a robot with :
robot = RasPiBot()

Then we call a rotation method on the NECK.
robot.Rotate(RasPiBot.NECK,10)

We wait 2 seconds.
time.sleep(2)

Then we rotate the head back.
robot.Rotate(RasPiBot.NECK,-10)

It's enough to have fun! You can now play with any motors and code any movements you need. More tutorials are coming in the next few days like "Object Programming", "Inheritance" and "Controlling your robot with a web application".