Hide thumbs Also See for RoboPi:

Advertisement

Quick Links

RoboPi v1.00
User Manual v0.60
Copyright 2014 William Henning
Using RoboPi
Copyright 2014 William Henning
RoboPi User Manual v0.60
Photo 1: Fully assembled RoboPi v1.00
The most up to date documentation will always be available at:
http://www.mikronauts.com/raspberry-pi/robopi/
http://Mikronauts.com
1
2014-01-27

Advertisement

Table of Contents
loading

Summary of Contents for Raspberry Pi RoboPi

  • Page 1 RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning Using RoboPi Copyright 2014 William Henning RoboPi User Manual v0.60 Photo 1: Fully assembled RoboPi v1.00 The most up to date documentation will always be available at: http://www.mikronauts.com/raspberry-pi/robopi/ http://Mikronauts.com 2014-01-27...
  • Page 2: Table Of Contents

    P8-P15: SERVO 9 – SERVO 16......................5 P16-P23: SENSOR 1 – SENSOR 8......................5 P24-P27: SPI port for MCP3008/MCP3208..................5 ADC1-ADC8: 0-5V Analog inputs.......................5 Programming RoboPi with RoboPiLib......................6 Using the Raspberry Pi serial port with RoboPi..................6 RoboPiLib Constants..........................7 RoboPiLib Functions..........................7 Programming RoboPi with RoboPiObj......................8 RoboPiObj Constants..........................8 RoboPiObj Methods..........................8...
  • Page 3: Introduction

    Copyright 2014 William Henning Introduction RoboPi is the most advanced robot controller add-on board for the Raspberry Pi available at this time. RoboPi adds an eight-core 32-bit microcontroller running at 100Mhz to the Raspberry Pi in order to off-load hard real time I/O and allow more precise timing than Linux running on the Pi allows.
  • Page 4: Robopi Printed Circuit Board

    The “PROPPLUG” connection is for stand-alone RoboPi operation (where RoboPi is NOT stacked on top of a Raspberry Pi. Pins 1-4 are the same as PropPlug (Pin 1 is GND), Pin 5 adds 3.3V for SerPlug. Plugging in a PropPlug while RoboPi is stacked on the Raspberry Pi may damage your Raspberry Pi and/or RoboPi.
  • Page 5: Robopi I/O Pin Definitions

    Copyright 2014 William Henning RoboPi I/O Pin Definitions Before you can write programs for your RoboPi based robot, you have to learn what resources are available for you to connect to sensors, motors and other devices or boards. P0-P7: SERVO 1 – SERVO 8 10 pin EXP1 connector connected directly to processor pins, 3v3 I/O only •...
  • Page 6: Programming Robopi With Robopilib

    Using the Raspberry Pi serial port with RoboPi The Raspberry Pi has 3.3V serial RX and TX signals available on its 26 pin header. Normally this port is configured to display boot messages, after which it becomes a serial console.
  • Page 7: Robopilib Constants

    (0..2500) RoboPiLib Functions void RoboPiInit(char *device, int bps) use RoboPiInit(“/dev/ttyAMA0”,115200) void RoboPiExit() close the serial connection with RoboPi readMode(int pin) returns INPUT/OUTPUT/SERVO/PWM void pinMode(int pin, int mode) set pin to one of INPUT/OUTPUT/SERVO/PWM digitalRead(int pin)
  • Page 8: Programming Robopi With Robopiobj

    RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning Programming RoboPi with RoboPiObj RoboPiObj Constants INPUT pin mode for a digital input OUTPUT pin mode for a digital output pin mode for a PWM output (0..255) SERVO pin mode for a servo output (0..2500)
  • Page 9: How To Use Digital Inputs

    RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning How to use Digital Inputs Reading Bumper Switches Probably the simplest digital input possible is a switch. <insert schematic of two bumper switches, 10k pullup to 5v, shorts to ground when closed>...
  • Page 10: How To Use Digital Outputs

    RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning How to use Digital Outputs The simplest way of demonstrating a digital output is to use it to light an LED. Using LED's to show which bumper is pressed <insert schematic of two LED's connected to EXP pins through 470R resistors>...
  • Page 11: How To Use Servos

    RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning How to use Servos #include “stdio.h” #include “RoboPiLib.h” #define LEFT_SERVO #define RIGHT_SERVO 9 #define SERVO_MIN // may vary between different servos #define SERVO_MAX 2500 // may vary between different servos int main(int argc, char *argv[]) { int pos;...
  • Page 12: How To Use Pwm To Control Gear Motors

    RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning How to use PWM to control Gear Motors Standard motor drivers normally are controlled by two or three digital signals per motor. EN/A/B Three Wire Driver The popular L293D and L298 motor drivers are often configured for EN/A/B three wire control.
  • Page 13: En/Dir/Pwm Three Wire Driver

    RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning EN/DIR/PWM Three Wire Driver Some motor drivers will have an EN signal, but use extra logic to to use one pin as motor direction, and another as a PWM input to control the motor speed.
  • Page 14: Reading Analog Distance Sensors

    RoboPi v1.00 User Manual v0.60 Copyright 2014 William Henning Reading Analog Distance Sensors The Sharp GP2Y0A02YK0F is an excellent infrared distance sensor that uses a 5V supply and typically draws only 33mA and can present a new reading every 50ms.
  • Page 15: Reading Digital Ultrasonic Range Sensors

    Reading Digital Ultrasonic Range Sensors The initial release of the RoboPi firmware does not support ultrasonic range sensors. We are currently working on an addition to the RoboPi API that will allow using any of the following three sensors interchangeably.
  • Page 16: Stand-Alone Operation

    GND terminal of the external motor power screw terminal • If you will never mount your RoboPi on a Raspbery Pi, you could mount a two pin screw terminal on pins 2 (5V) & 6 (GND) for supplying 5V. Use a PropPlug to program your stand-alone RoboPi.
  • Page 17: Appendix A: Software

    For Raspberry Pi support, including Raspbian, please see the Raspberry Pi forums at: http://www.raspberrypi.org/forum/ For Parallax Propeller support, see the Parallax forum at: http://forums.parallax.com/forumdisplay.php/65-Propeller-1-Multicore-Microcontroller For RoboPi support, please visit the RoboPi thread in the Propeller forum at: http://forums.parallax.com/showthread.php/153275-Propeller-add-on-for-Raspberry-Pi-RoboPi..-the- most-advanced-robot-controller-for-Pi http://Mikronauts.com...
  • Page 18: Appendix D: Roboprop Software Compatibility

    • use 24LC512 EEPROM • use MCP3208 • While there is no motor driver on RoboPi, if you connect a two channel motor controller as follows it will be RoboProp compatible: Tie EN1-2 and EN3-4 high • P8 to IN1 •...
  • Page 19: Appendix E: Frequently Asked Questions

    Q: Can we make our own RoboPi printed circuit boards? A: I am afraid not. While RoboPi is an open platform in that it is fully documented, with source code available for its libraries and demo applications, RoboPi is a commercial product, and may not be copied.

Table of Contents