Library for the m3pi robot. This works with a Pololu 3pi robot with the Serial Slave firmware, and exposes and API. This is a fork of cstyles m3pi library.

Dependencies:   btbee

Dependents:   configure_btbee m3pi_btTest Test_SlowDown TurnAround ... more

Fork of m3pi by Chris Styles

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Sun Nov 07 10:49:56 2010 +0000
Parent:
4:54c673c71fc0
Child:
6:62ee1486ecb9
Commit message:
Added code to access the leds

Changed in this revision

m3pi.cpp Show annotated file Show diff for this revision Revisions of this file
m3pi.h Show annotated file Show diff for this revision Revisions of this file
--- a/m3pi.cpp	Sun Nov 07 09:57:11 2010 +0000
+++ b/m3pi.cpp	Sun Nov 07 10:49:56 2010 +0000
@@ -141,6 +141,12 @@
     return(volt);
 }
 
+
+void m3pi::leds(int val) {
+    _leds = val;
+}
+
+
 void m3pi::locate(int x, int y) {
     _ser.putc(DO_LCD_GOTO_XY);
     _ser.putc(x);
--- a/m3pi.h	Sun Nov 07 09:57:11 2010 +0000
+++ b/m3pi.h	Sun Nov 07 10:49:56 2010 +0000
@@ -181,6 +181,13 @@
 
     void PID_stop();
 
+    /** Write to the 8 LEDs
+     *
+     * @param leds An 8 bit value to put on the LEDs
+     */
+    void leds(int val);
+
+
 
     /** Locate the cursor on the 8x2 LCD
      *