├── Documentation ├── html │ ├── bc_s.png │ ├── bdwn.png │ ├── nav_f.png │ ├── nav_g.png │ ├── nav_h.png │ ├── open.png │ ├── tab_a.png │ ├── tab_b.png │ ├── tab_h.png │ ├── tab_s.png │ ├── closed.png │ ├── doxygen.png │ ├── ftv2cl.png │ ├── ftv2doc.png │ ├── ftv2link.png │ ├── ftv2mo.png │ ├── ftv2node.png │ ├── ftv2ns.png │ ├── sync_off.png │ ├── sync_on.png │ ├── ftv2blank.png │ ├── ftv2mnode.png │ ├── ftv2pnode.png │ ├── ftv2lastnode.png │ ├── ftv2mlastnode.png │ ├── ftv2plastnode.png │ ├── ftv2splitbar.png │ ├── ftv2vertline.png │ ├── search │ │ ├── close.png │ │ ├── mag_sel.png │ │ ├── search_l.png │ │ ├── search_m.png │ │ ├── search_r.png │ │ ├── all_78.js │ │ ├── all_79.js │ │ ├── all_7a.js │ │ ├── all_62.js │ │ ├── all_64.js │ │ ├── all_70.js │ │ ├── variables_78.js │ │ ├── variables_79.js │ │ ├── variables_7a.js │ │ ├── functions_62.js │ │ ├── functions_64.js │ │ ├── functions_70.js │ │ ├── all_65.js │ │ ├── functions_65.js │ │ ├── all_63.js │ │ ├── classes_72.js │ │ ├── functions_63.js │ │ ├── all_6c.js │ │ ├── functions_6c.js │ │ ├── all_73.js │ │ ├── functions_73.js │ │ ├── nomatches.html │ │ ├── functions_72.js │ │ ├── all_62.html │ │ ├── all_63.html │ │ ├── all_64.html │ │ ├── all_65.html │ │ ├── all_6c.html │ │ ├── all_70.html │ │ ├── all_72.html │ │ ├── all_73.html │ │ ├── all_78.html │ │ ├── all_79.html │ │ ├── all_7a.html │ │ ├── classes_72.html │ │ ├── functions_62.html │ │ ├── functions_63.html │ │ ├── functions_64.html │ │ ├── functions_65.html │ │ ├── functions_6c.html │ │ ├── functions_70.html │ │ ├── functions_72.html │ │ ├── functions_73.html │ │ ├── variables_78.html │ │ ├── variables_79.html │ │ ├── variables_7a.html │ │ ├── all_72.js │ │ └── search.css │ ├── ftv2folderopen.png │ ├── ftv2folderclosed.png │ ├── files.js │ ├── dir_5caca0cdf36469e9d889ba659d3b7318.js │ ├── dir_a991eec27578c865874ede3d8ec657c2.js │ ├── annotated.js │ ├── class_red_bot_sensor.js │ ├── class_red_bot_accel.js │ ├── class_red_bot_motor.js │ ├── tabs.css │ ├── navtreeindex0.js │ ├── navtree.css │ ├── resize.js │ ├── dynsections.js │ ├── index.html │ ├── dir_a991eec27578c865874ede3d8ec657c2.html │ ├── functions_vars.html │ ├── classes.html │ ├── annotated.html │ ├── files.html │ ├── dir_5caca0cdf36469e9d889ba659d3b7318.html │ ├── class_red_bot_sensor-members.html │ └── class_red_bot_accel-members.html └── latex │ ├── dir_a991eec27578c865874ede3d8ec657c2.tex │ ├── annotated.tex │ ├── Makefile │ ├── dir_5caca0cdf36469e9d889ba659d3b7318.tex │ ├── refman.tex │ └── class_red_bot_sensor.tex ├── Libraries ├── Arduino │ ├── library.properties │ ├── library.json │ ├── src │ │ ├── RedBotRadio.cpp │ │ ├── RedBotButton.cpp │ │ ├── RedBotSensor.cpp │ │ ├── RedBotEncoder.cpp │ │ ├── RedBotBumper.cpp │ │ └── RedBotSoftwareSerial.h │ ├── .gitattributes │ ├── examples │ │ ├── Exp2_DriveForward │ │ │ └── Exp2_DriveForward.ino │ │ ├── Exp6_1_LineFollowing_IRSensors │ │ │ └── Exp6_1_LineFollowing_IRSensors.ino │ │ ├── Exp1_BasicTest │ │ │ └── Exp1_BasicTest.ino │ │ ├── Exp4_1_MakingSounds │ │ │ └── Exp4_1_MakingSounds.ino │ │ ├── Exp7_1_RotaryEncoder │ │ │ └── Exp7_1_RotaryEncoder.ino │ │ ├── Exp9_SerialDrive │ │ │ └── Exp9_SerialDrive.ino │ │ ├── Exp3_Turning │ │ │ └── Exp3_Turning.ino │ │ ├── Exp7_2_DriveDistance │ │ │ └── Exp7_2_DriveDistance.ino │ │ ├── Exp8_1_AccelerometerRead │ │ │ └── Exp8_1_AccelerometerRead.ino │ │ ├── Exp5_Bumpers │ │ │ └── Exp5_Bumpers.ino │ │ ├── Exp6_2_LineFollowing_IRSensors │ │ │ └── Exp6_2_LineFollowing_IRSensors.ino │ │ ├── Exp8_2_WindUp │ │ │ └── Exp8_2_WindUp.ino │ │ ├── Exp4_2_Music │ │ │ ├── Exp4_2_Music.ino │ │ │ └── notes.h │ │ └── Exp7_3_DriveStraightDistance │ │ │ └── Exp7_3_DriveStraightDistance.ino │ ├── keywords.txt │ ├── README.md │ ├── LICENSE.md │ └── .gitignore └── README.md ├── .gitattributes ├── Hardware └── eagle.epf ├── LICENSE.md ├── README.md └── .gitignore /Documentation/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/bc_s.png -------------------------------------------------------------------------------- /Documentation/html/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/bdwn.png -------------------------------------------------------------------------------- /Documentation/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/nav_f.png -------------------------------------------------------------------------------- /Documentation/html/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/nav_g.png -------------------------------------------------------------------------------- /Documentation/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/nav_h.png -------------------------------------------------------------------------------- /Documentation/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/open.png -------------------------------------------------------------------------------- /Documentation/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/tab_a.png -------------------------------------------------------------------------------- /Documentation/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/tab_b.png -------------------------------------------------------------------------------- /Documentation/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/tab_h.png -------------------------------------------------------------------------------- /Documentation/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/tab_s.png -------------------------------------------------------------------------------- /Documentation/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/closed.png -------------------------------------------------------------------------------- /Documentation/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/doxygen.png -------------------------------------------------------------------------------- /Documentation/html/ftv2cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2cl.png -------------------------------------------------------------------------------- /Documentation/html/ftv2doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2doc.png -------------------------------------------------------------------------------- /Documentation/html/ftv2link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2link.png -------------------------------------------------------------------------------- /Documentation/html/ftv2mo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2mo.png -------------------------------------------------------------------------------- /Documentation/html/ftv2node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2node.png -------------------------------------------------------------------------------- /Documentation/html/ftv2ns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2ns.png -------------------------------------------------------------------------------- /Documentation/html/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/sync_off.png -------------------------------------------------------------------------------- /Documentation/html/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/sync_on.png -------------------------------------------------------------------------------- /Documentation/html/ftv2blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2blank.png -------------------------------------------------------------------------------- /Documentation/html/ftv2mnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2mnode.png -------------------------------------------------------------------------------- /Documentation/html/ftv2pnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2pnode.png -------------------------------------------------------------------------------- /Documentation/html/ftv2lastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2lastnode.png -------------------------------------------------------------------------------- /Documentation/html/ftv2mlastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2mlastnode.png -------------------------------------------------------------------------------- /Documentation/html/ftv2plastnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2plastnode.png -------------------------------------------------------------------------------- /Documentation/html/ftv2splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2splitbar.png -------------------------------------------------------------------------------- /Documentation/html/ftv2vertline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2vertline.png -------------------------------------------------------------------------------- /Documentation/html/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/search/close.png -------------------------------------------------------------------------------- /Documentation/html/ftv2folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2folderopen.png -------------------------------------------------------------------------------- /Documentation/html/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/search/mag_sel.png -------------------------------------------------------------------------------- /Documentation/html/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/search/search_l.png -------------------------------------------------------------------------------- /Documentation/html/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/search/search_m.png -------------------------------------------------------------------------------- /Documentation/html/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/search/search_r.png -------------------------------------------------------------------------------- /Documentation/html/ftv2folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sparkfun/RedBot/HEAD/Documentation/html/ftv2folderclosed.png -------------------------------------------------------------------------------- /Documentation/html/files.js: -------------------------------------------------------------------------------- 1 | var files = 2 | [ 3 | [ "Arduino", "dir_a991eec27578c865874ede3d8ec657c2.html", "dir_a991eec27578c865874ede3d8ec657c2" ] 4 | ]; -------------------------------------------------------------------------------- /Documentation/html/search/all_78.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['x',['x',['../class_red_bot_accel.html#a190369eae35db9db9d406dab70ec90ad',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/all_79.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['y',['y',['../class_red_bot_accel.html#a1a4efe3197febc4632b8fc48237bb440',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/all_7a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['z',['z',['../class_red_bot_accel.html#a8678bd23d5f1913950b5c97b9487a9da',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/dir_5caca0cdf36469e9d889ba659d3b7318.js: -------------------------------------------------------------------------------- 1 | var dir_5caca0cdf36469e9d889ba659d3b7318 = 2 | [ 3 | [ "RedBot.h", "_red_bot_8h_source.html", null ] 4 | ]; -------------------------------------------------------------------------------- /Documentation/html/search/all_62.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['brake',['brake',['../class_red_bot_motor.html#a64540ac32e023eff2c93fd60f0537562',1,'RedBotMotor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/all_64.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['drive',['drive',['../class_red_bot_motor.html#a92a78cd6ecaf47cb50b1c8059375c261',1,'RedBotMotor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/all_70.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pivot',['pivot',['../class_red_bot_motor.html#a61a73a2dd543697bc966bbb0de47a81d',1,'RedBotMotor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/variables_78.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['x',['x',['../class_red_bot_accel.html#a190369eae35db9db9d406dab70ec90ad',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/variables_79.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['y',['y',['../class_red_bot_accel.html#a1a4efe3197febc4632b8fc48237bb440',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/variables_7a.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['z',['z',['../class_red_bot_accel.html#a8678bd23d5f1913950b5c97b9487a9da',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_62.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['brake',['brake',['../class_red_bot_motor.html#a64540ac32e023eff2c93fd60f0537562',1,'RedBotMotor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_64.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['drive',['drive',['../class_red_bot_motor.html#a92a78cd6ecaf47cb50b1c8059375c261',1,'RedBotMotor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_70.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['pivot',['pivot',['../class_red_bot_motor.html#a61a73a2dd543697bc966bbb0de47a81d',1,'RedBotMotor']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/all_65.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['enablebump',['enableBump',['../class_red_bot_accel.html#a861b1e8f2cd9e35c3b2caee54d43d2d1',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_65.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['enablebump',['enableBump',['../class_red_bot_accel.html#a861b1e8f2cd9e35c3b2caee54d43d2d1',1,'RedBotAccel']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /Documentation/html/dir_a991eec27578c865874ede3d8ec657c2.js: -------------------------------------------------------------------------------- 1 | var dir_a991eec27578c865874ede3d8ec657c2 = 2 | [ 3 | [ "RedBot", "dir_5caca0cdf36469e9d889ba659d3b7318.html", "dir_5caca0cdf36469e9d889ba659d3b7318" ] 4 | ]; -------------------------------------------------------------------------------- /Documentation/html/annotated.js: -------------------------------------------------------------------------------- 1 | var annotated = 2 | [ 3 | [ "RedBotAccel", "class_red_bot_accel.html", "class_red_bot_accel" ], 4 | [ "RedBotMotor", "class_red_bot_motor.html", "class_red_bot_motor" ], 5 | [ "RedBotSensor", "class_red_bot_sensor.html", "class_red_bot_sensor" ] 6 | ]; -------------------------------------------------------------------------------- /Documentation/html/search/all_63.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['check',['check',['../class_red_bot_sensor.html#a585a98bb820d20917bb71dfc004cc310',1,'RedBotSensor']]], 4 | ['checkbump',['checkBump',['../class_red_bot_accel.html#a88e803ce82865fa875e17e85f9e56801',1,'RedBotAccel']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /Documentation/html/search/classes_72.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['redbotaccel',['RedBotAccel',['../class_red_bot_accel.html',1,'']]], 4 | ['redbotmotor',['RedBotMotor',['../class_red_bot_motor.html',1,'']]], 5 | ['redbotsensor',['RedBotSensor',['../class_red_bot_sensor.html',1,'']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_63.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['check',['check',['../class_red_bot_sensor.html#a585a98bb820d20917bb71dfc004cc310',1,'RedBotSensor']]], 4 | ['checkbump',['checkBump',['../class_red_bot_accel.html#a88e803ce82865fa875e17e85f9e56801',1,'RedBotAccel']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /Documentation/html/search/all_6c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['leftbrake',['leftBrake',['../class_red_bot_motor.html#a1fbd19b1b3ef733664397c183bb910ea',1,'RedBotMotor']]], 4 | ['leftdrive',['leftDrive',['../class_red_bot_motor.html#aeef7a9abd94a74ea87860163ecad6764',1,'RedBotMotor']]], 5 | ['leftstop',['leftStop',['../class_red_bot_motor.html#ac757e02db079bc5a57774b4c7bbc3737',1,'RedBotMotor']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_6c.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['leftbrake',['leftBrake',['../class_red_bot_motor.html#a1fbd19b1b3ef733664397c183bb910ea',1,'RedBotMotor']]], 4 | ['leftdrive',['leftDrive',['../class_red_bot_motor.html#aeef7a9abd94a74ea87860163ecad6764',1,'RedBotMotor']]], 5 | ['leftstop',['leftStop',['../class_red_bot_motor.html#ac757e02db079bc5a57774b4c7bbc3737',1,'RedBotMotor']]] 6 | ]; 7 | -------------------------------------------------------------------------------- /Documentation/latex/dir_a991eec27578c865874ede3d8ec657c2.tex: -------------------------------------------------------------------------------- 1 | \hypertarget{dir_a991eec27578c865874ede3d8ec657c2}{\section{Arduino Directory Reference} 2 | \label{dir_a991eec27578c865874ede3d8ec657c2}\index{Arduino Directory Reference@{Arduino Directory Reference}} 3 | } 4 | \subsection*{Directories} 5 | \begin{DoxyCompactItemize} 6 | \item 7 | directory \hyperlink{dir_5caca0cdf36469e9d889ba659d3b7318}{Red\-Bot} 8 | \end{DoxyCompactItemize} 9 | -------------------------------------------------------------------------------- /Libraries/Arduino/library.properties: -------------------------------------------------------------------------------- 1 | name=SparkFun RedBot Library 2 | version=2.1.0 3 | author=SparkFun Electronics 4 | maintainer=SparkFun Electronics 5 | sentence=Provides control to the SparkFun RedBot. 6 | paragraph=Includes examples for accelerometer, whisker bumpers, line followers, wheel encoders, and driving control. 7 | category=Device Control 8 | url=https://github.com/sparkfun/SparkFun_Redbot_Arduino_Library 9 | architectures=* -------------------------------------------------------------------------------- /Libraries/Arduino/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RedBot", 3 | "keywords": "robot, motor, driver", 4 | "description": "The RedBot is a motor driver and Arduino combination with various headers and connections, eliminating the need to stack multiple shields", 5 | "repository": 6 | { 7 | "type": "git", 8 | "url": "https://github.com/sparkfun/SparkFun_RedBot_Arduino_Library.git" 9 | }, 10 | "version": "2.1.0", 11 | "frameworks": "arduino", 12 | "platforms": "atmelavr" 13 | } -------------------------------------------------------------------------------- /Documentation/latex/annotated.tex: -------------------------------------------------------------------------------- 1 | \section{Class List} 2 | Here are the classes, structs, unions and interfaces with brief descriptions\-:\begin{DoxyCompactList} 3 | \item\contentsline{section}{\hyperlink{class_red_bot_accel}{Red\-Bot\-Accel} }{\pageref{class_red_bot_accel}}{} 4 | \item\contentsline{section}{\hyperlink{class_red_bot_motor}{Red\-Bot\-Motor} }{\pageref{class_red_bot_motor}}{} 5 | \item\contentsline{section}{\hyperlink{class_red_bot_sensor}{Red\-Bot\-Sensor} }{\pageref{class_red_bot_sensor}}{} 6 | \end{DoxyCompactList} 7 | -------------------------------------------------------------------------------- /Documentation/html/class_red_bot_sensor.js: -------------------------------------------------------------------------------- 1 | var class_red_bot_sensor = 2 | [ 3 | [ "RedBotSensor", "class_red_bot_sensor.html#a2ebbbab14a59c03dde759f693c59ce26", null ], 4 | [ "check", "class_red_bot_sensor.html#a585a98bb820d20917bb71dfc004cc310", null ], 5 | [ "read", "class_red_bot_sensor.html#abd97ded86ad9de7e28ad0295a51d5c20", null ], 6 | [ "setBGLevel", "class_red_bot_sensor.html#aa3e2c32c59f8ac1f9866069602a16eba", null ], 7 | [ "setDetectLevel", "class_red_bot_sensor.html#a9bbf93b3c4282562e14f605a07f47c64", null ] 8 | ]; -------------------------------------------------------------------------------- /Documentation/html/search/all_73.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['setbglevel',['setBGLevel',['../class_red_bot_sensor.html#aa3e2c32c59f8ac1f9866069602a16eba',1,'RedBotSensor']]], 4 | ['setbumpthresh',['setBumpThresh',['../class_red_bot_accel.html#ace6875bab4125392c24c4fecc0313c32',1,'RedBotAccel']]], 5 | ['setdetectlevel',['setDetectLevel',['../class_red_bot_sensor.html#a9bbf93b3c4282562e14f605a07f47c64',1,'RedBotSensor']]], 6 | ['stop',['stop',['../class_red_bot_motor.html#a2e55b7f88c4c081928370fe711ca61ef',1,'RedBotMotor']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_73.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['setbglevel',['setBGLevel',['../class_red_bot_sensor.html#aa3e2c32c59f8ac1f9866069602a16eba',1,'RedBotSensor']]], 4 | ['setbumpthresh',['setBumpThresh',['../class_red_bot_accel.html#ace6875bab4125392c24c4fecc0313c32',1,'RedBotAccel']]], 5 | ['setdetectlevel',['setDetectLevel',['../class_red_bot_sensor.html#a9bbf93b3c4282562e14f605a07f47c64',1,'RedBotSensor']]], 6 | ['stop',['stop',['../class_red_bot_motor.html#a2e55b7f88c4c081928370fe711ca61ef',1,'RedBotMotor']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /Documentation/html/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/RedBotRadio.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | CPP header for various RedBot radio modes. 3 | 4 | Not yet implemented: coming soon! 5 | 6 | This code is beerware; if you use it, please buy me (or any other 7 | SparkFun employee) a cold beverage next time you run into one of 8 | us at the local. 9 | 10 | 21 Jan 2014- Mike Hord, SparkFun Electronics 11 | 12 | Code developed in Arduino 1.0.5, on an SparkFun Redbot v12. 13 | ****************************************************************/ -------------------------------------------------------------------------------- /Libraries/README.md: -------------------------------------------------------------------------------- 1 | SparkFun RedBot Libraries 2 | ================================= 3 | 4 | Libraries for use in different environments. 5 | 6 | 7 | Directory Contents 8 | ------------------- 9 | * **/Arduino** - [Arduino IDE](http://www.arduino.cc/en/Main/Software) libraries 10 | 11 | 12 | Update Library Instructions: 13 | ---------------------------- 14 | To get the most up-to-date version of the library, you must run the following git subtree commands. 15 | 16 | `$git subtree pull -P Libraries/ --squash master` 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /Libraries/Arduino/.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /Documentation/latex/Makefile: -------------------------------------------------------------------------------- 1 | all: refman.pdf 2 | 3 | pdf: refman.pdf 4 | 5 | refman.pdf: clean refman.tex 6 | pdflatex refman 7 | makeindex refman.idx 8 | pdflatex refman 9 | latex_count=5 ; \ 10 | while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\ 11 | do \ 12 | echo "Rerunning latex...." ;\ 13 | pdflatex refman ;\ 14 | latex_count=`expr $$latex_count - 1` ;\ 15 | done 16 | makeindex refman.idx 17 | pdflatex refman 18 | 19 | 20 | clean: 21 | rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf 22 | -------------------------------------------------------------------------------- /Documentation/latex/dir_5caca0cdf36469e9d889ba659d3b7318.tex: -------------------------------------------------------------------------------- 1 | \hypertarget{dir_5caca0cdf36469e9d889ba659d3b7318}{\section{Arduino/\-Red\-Bot Directory Reference} 2 | \label{dir_5caca0cdf36469e9d889ba659d3b7318}\index{Arduino/\-Red\-Bot Directory Reference@{Arduino/\-Red\-Bot Directory Reference}} 3 | } 4 | \subsection*{Files} 5 | \begin{DoxyCompactItemize} 6 | \item 7 | file {\bfseries Red\-Bot.\-cpp} 8 | \item 9 | file {\bfseries Red\-Bot.\-h} 10 | \item 11 | file {\bfseries Red\-Bot\-Accel.\-cpp} 12 | \item 13 | file {\bfseries Red\-Bot\-Motor.\-cpp} 14 | \item 15 | file {\bfseries Red\-Bot\-Sensor.\-cpp} 16 | \end{DoxyCompactItemize} 17 | -------------------------------------------------------------------------------- /Documentation/html/class_red_bot_accel.js: -------------------------------------------------------------------------------- 1 | var class_red_bot_accel = 2 | [ 3 | [ "RedBotAccel", "class_red_bot_accel.html#ad2d0de0051d6570ab9d0d4f06e7468a9", null ], 4 | [ "checkBump", "class_red_bot_accel.html#a88e803ce82865fa875e17e85f9e56801", null ], 5 | [ "enableBump", "class_red_bot_accel.html#a861b1e8f2cd9e35c3b2caee54d43d2d1", null ], 6 | [ "read", "class_red_bot_accel.html#a2b205e64828e57dcf2fb35ee81d5e731", null ], 7 | [ "setBumpThresh", "class_red_bot_accel.html#ace6875bab4125392c24c4fecc0313c32", null ], 8 | [ "x", "class_red_bot_accel.html#a190369eae35db9db9d406dab70ec90ad", null ], 9 | [ "y", "class_red_bot_accel.html#a1a4efe3197febc4632b8fc48237bb440", null ], 10 | [ "z", "class_red_bot_accel.html#a8678bd23d5f1913950b5c97b9487a9da", null ] 11 | ]; -------------------------------------------------------------------------------- /Documentation/html/search/functions_72.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['read',['read',['../class_red_bot_sensor.html#abd97ded86ad9de7e28ad0295a51d5c20',1,'RedBotSensor::read()'],['../class_red_bot_accel.html#a2b205e64828e57dcf2fb35ee81d5e731',1,'RedBotAccel::read()']]], 4 | ['redbotaccel',['RedBotAccel',['../class_red_bot_accel.html#ad2d0de0051d6570ab9d0d4f06e7468a9',1,'RedBotAccel']]], 5 | ['redbotmotor',['RedBotMotor',['../class_red_bot_motor.html#ae2c204ef267fe9bde43cf6caeb693eae',1,'RedBotMotor']]], 6 | ['redbotsensor',['RedBotSensor',['../class_red_bot_sensor.html#a2ebbbab14a59c03dde759f693c59ce26',1,'RedBotSensor']]], 7 | ['rightbrake',['rightBrake',['../class_red_bot_motor.html#a710584b709cd8a7a7070cbbf3d0a6ed6',1,'RedBotMotor']]], 8 | ['rightdrive',['rightDrive',['../class_red_bot_motor.html#acf1246d90ff26ec68748e16e7d80e78b',1,'RedBotMotor']]], 9 | ['rightstop',['rightStop',['../class_red_bot_motor.html#affb91e6e7205c9df1482bb58f0c0ed05',1,'RedBotMotor']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/RedBotButton.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | Main CPP for RedBot button control. 3 | 4 | This code is beerware; if you use it, please buy me (or any other 5 | SparkFun employee) a cold beverage next time you run into one of 6 | us at the local. 7 | 8 | 04 Oct 2014- B. Huang, SparkFun Electronics 9 | 10 | Code developed in Arduino 1.0.6, on an SparkFun Redbot rev02 11 | ****************************************************************/ 12 | 13 | #include "RedBot.h" 14 | #include 15 | 16 | #define BUTTON_PIN 12 17 | 18 | // Constructor. Mostly for pin setup; note that it's not necessary to configure 19 | // PWM pins as they will be automatically configured with the analogWrite() 20 | // function is called. 21 | RedBotButton::RedBotButton() 22 | { 23 | // Sets the "default" state of the button to be HIGH. 24 | pinMode(BUTTON_PIN, INPUT_PULLUP); 25 | } 26 | 27 | boolean RedBotButton::read() 28 | { 29 | return(!digitalRead(BUTTON_PIN)); 30 | } -------------------------------------------------------------------------------- /Documentation/html/class_red_bot_motor.js: -------------------------------------------------------------------------------- 1 | var class_red_bot_motor = 2 | [ 3 | [ "RedBotMotor", "class_red_bot_motor.html#ae2c204ef267fe9bde43cf6caeb693eae", null ], 4 | [ "brake", "class_red_bot_motor.html#a64540ac32e023eff2c93fd60f0537562", null ], 5 | [ "drive", "class_red_bot_motor.html#a92a78cd6ecaf47cb50b1c8059375c261", null ], 6 | [ "leftBrake", "class_red_bot_motor.html#a1fbd19b1b3ef733664397c183bb910ea", null ], 7 | [ "leftDrive", "class_red_bot_motor.html#aeef7a9abd94a74ea87860163ecad6764", null ], 8 | [ "leftStop", "class_red_bot_motor.html#ac757e02db079bc5a57774b4c7bbc3737", null ], 9 | [ "pivot", "class_red_bot_motor.html#a61a73a2dd543697bc966bbb0de47a81d", null ], 10 | [ "rightBrake", "class_red_bot_motor.html#a710584b709cd8a7a7070cbbf3d0a6ed6", null ], 11 | [ "rightDrive", "class_red_bot_motor.html#acf1246d90ff26ec68748e16e7d80e78b", null ], 12 | [ "rightStop", "class_red_bot_motor.html#affb91e6e7205c9df1482bb58f0c0ed05", null ], 13 | [ "stop", "class_red_bot_motor.html#a2e55b7f88c4c081928370fe711ca61ef", null ] 14 | ]; -------------------------------------------------------------------------------- /Documentation/html/search/all_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_6c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_70.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_78.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_79.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_7a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/classes_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_62.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_63.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_64.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_65.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_6c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_70.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_72.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/functions_73.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/variables_78.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/variables_79.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/variables_7a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /Documentation/html/search/all_72.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['read',['read',['../class_red_bot_sensor.html#abd97ded86ad9de7e28ad0295a51d5c20',1,'RedBotSensor::read()'],['../class_red_bot_accel.html#a2b205e64828e57dcf2fb35ee81d5e731',1,'RedBotAccel::read()']]], 4 | ['redbotaccel',['RedBotAccel',['../class_red_bot_accel.html',1,'RedBotAccel'],['../class_red_bot_accel.html#ad2d0de0051d6570ab9d0d4f06e7468a9',1,'RedBotAccel::RedBotAccel()']]], 5 | ['redbotmotor',['RedBotMotor',['../class_red_bot_motor.html',1,'RedBotMotor'],['../class_red_bot_motor.html#ae2c204ef267fe9bde43cf6caeb693eae',1,'RedBotMotor::RedBotMotor()']]], 6 | ['redbotsensor',['RedBotSensor',['../class_red_bot_sensor.html',1,'RedBotSensor'],['../class_red_bot_sensor.html#a2ebbbab14a59c03dde759f693c59ce26',1,'RedBotSensor::RedBotSensor()']]], 7 | ['rightbrake',['rightBrake',['../class_red_bot_motor.html#a710584b709cd8a7a7070cbbf3d0a6ed6',1,'RedBotMotor']]], 8 | ['rightdrive',['rightDrive',['../class_red_bot_motor.html#acf1246d90ff26ec68748e16e7d80e78b',1,'RedBotMotor']]], 9 | ['rightstop',['rightStop',['../class_red_bot_motor.html#affb91e6e7205c9df1482bb58f0c0ed05',1,'RedBotMotor']]] 10 | ]; 11 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp2_DriveForward/Exp2_DriveForward.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp2_DriveForward -- RedBot Experiment 2 3 | * 4 | * Drive forward and stop. 5 | * 6 | * Hardware setup: 7 | * The Power switch must be on, the motors must be connected, and the board must be receiving power 8 | * from the battery. The motor switch must also be switched to RUN. 9 | * 10 | * 23 Sept 2013 N. Seidle/M. Hord 11 | * 04 Oct 2014 B. Huang 12 | ***********************************************************************/ 13 | 14 | #include // This line "includes" the RedBot library into your sketch. 15 | // Provides special objects, methods, and functions for the RedBot. 16 | 17 | RedBotMotors motors; // Instantiate the motor control object. This only needs 18 | // to be done once. 19 | 20 | void setup() 21 | { 22 | motors.drive(255); // Turn on Left and right motors at full speed forward. 23 | delay(2000); // Waits for 2 seconds 24 | motors.stop(); // Stops both motors 25 | } 26 | 27 | void loop() 28 | { 29 | // Nothing here. We'll get to this in the next experiment. 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /Documentation/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 7 | } 8 | 9 | .tabs2 { 10 | font-size: 10px; 11 | } 12 | .tabs3 { 13 | font-size: 9px; 14 | } 15 | 16 | .tablist { 17 | margin: 0; 18 | padding: 0; 19 | display: table; 20 | } 21 | 22 | .tablist li { 23 | float: left; 24 | display: table-cell; 25 | background-image: url('tab_b.png'); 26 | line-height: 36px; 27 | list-style: none; 28 | } 29 | 30 | .tablist a { 31 | display: block; 32 | padding: 0 20px; 33 | font-weight: bold; 34 | background-image:url('tab_s.png'); 35 | background-repeat:no-repeat; 36 | background-position:right; 37 | color: #283A5D; 38 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 39 | text-decoration: none; 40 | outline: none; 41 | } 42 | 43 | .tabs3 .tablist a { 44 | padding: 0 10px; 45 | } 46 | 47 | .tablist a:hover { 48 | background-image: url('tab_h.png'); 49 | background-repeat:repeat-x; 50 | color: #fff; 51 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 52 | text-decoration: none; 53 | } 54 | 55 | .tablist li.current a { 56 | background-image: url('tab_a.png'); 57 | background-repeat:repeat-x; 58 | color: #fff; 59 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 60 | } 61 | -------------------------------------------------------------------------------- /Libraries/Arduino/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For RedBot 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | RedBotMotors KEYWORD1 10 | RedBotSensor KEYWORD1 11 | RedBotEncoder KEYWORD1 12 | RedBotAccel KEYWORD1 13 | RedBotBumper KEYWORD1 14 | RedBotSoftwareSerial KEYWORD1 15 | 16 | ####################################### 17 | # Methods and Functions (KEYWORD2) 18 | ####################################### 19 | 20 | drive KEYWORD2 21 | pivot KEYWORD2 22 | rightMotor KEYWORD2 23 | leftMotor KEYWORD2 24 | rightDrive KEYWORD2 25 | leftDrive KEYWORD2 26 | stop KEYWORD2 27 | coast KEYWORD2 28 | brake KEYWORD2 29 | rightStop KEYWORD2 30 | leftStop KEYWORD2 31 | rightCoast KEYWORD2 32 | leftCoast KEYWORD2 33 | leftBrake KEYWORD2 34 | rightBrake KEYWORD2 35 | clearEnc KEYWORD2 36 | getTicks KEYWORD2 37 | read KEYWORD2 38 | check KEYWORD2 39 | setBGLevel KEYWORD2 40 | setDetectLevel KEYWORD2 41 | calStatus KEYWORD2 42 | enableBump KEYWORD2 43 | checkBump KEYWORD2 44 | setBumpThresh KEYWORD2 45 | RedBotRadio KEYWORD2 46 | 47 | ####################################### 48 | # Constants (LITERAL1) 49 | ####################################### 50 | 51 | NOT_IN_USE LITERAL1 52 | WHISKER LITERAL1 53 | LENCODER LITERAL1 54 | RENCODER LITERAL1 55 | SW_SERIAL LITERAL1 -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp6_1_LineFollowing_IRSensors/Exp6_1_LineFollowing_IRSensors.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp6_LineFollowing_IRSensors -- RedBot Experiment 6_1 3 | * 4 | * This code reads the three line following sensors on A3, A6, and A7 5 | * and prints them out to the Serial Monitor. Upload this example to your 6 | * RedBot and open up the Serial Monitor by clicking the magnifying glass 7 | * in the upper-right hand corner. 8 | * 9 | * This sketch was written by SparkFun Electronics,with lots of help from 10 | * the Arduino community. This code is completely free for any use. 11 | * 12 | * 8 Oct 2013 M. Hord 13 | * Revised, 31 Oct 2014 B. Huang 14 | ***********************************************************************/ 15 | 16 | #include 17 | RedBotSensor IRSensor1 = RedBotSensor(A3); // initialize a sensor object on A3 18 | RedBotSensor IRSensor2 = RedBotSensor(A6); // initialize a sensor object on A6 19 | RedBotSensor IRSensor3 = RedBotSensor(A7); // initialize a sensor object on A7 20 | 21 | void setup() 22 | { 23 | Serial.begin(9600); 24 | Serial.println("Welcome to experiment 6!"); 25 | Serial.println("------------------------"); 26 | } 27 | 28 | void loop() 29 | { 30 | Serial.print("IR Sensor Readings: "); 31 | Serial.print(IRSensor1.read()); 32 | Serial.print("\t"); // tab character 33 | Serial.print(IRSensor2.read()); 34 | Serial.print("\t"); // tab character 35 | Serial.print(IRSensor3.read()); 36 | Serial.println(); 37 | delay(100); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Hardware/eagle.epf: -------------------------------------------------------------------------------- 1 | [Eagle] 2 | Version="06 04 00" 3 | Platform="Windows" 4 | Serial="6A0C6BA654-LSR-WLM30CP" 5 | Globals="Globals" 6 | Desktop="Desktop" 7 | 8 | [Globals] 9 | AutoSaveProject=1 10 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/LilyPad-Wearables.lbr" 11 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Aesthetics.lbr" 12 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-AnalogIC.lbr" 13 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Boards.lbr" 14 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Capacitors.lbr" 15 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Connectors.lbr" 16 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-DigitalIC.lbr" 17 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-DiscreteSemi.lbr" 18 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Displays.lbr" 19 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Electromechanical.lbr" 20 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-FreqCtrl.lbr" 21 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-LED.lbr" 22 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Passives.lbr" 23 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-PowerIC.lbr" 24 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-RF.lbr" 25 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Resistors.lbr" 26 | UsedLibrary="C:/Dropbox/SparkFun-Eagle-Libraries/SparkFun-Sensors.lbr" 27 | 28 | [Win_1] 29 | Type="Control Panel" 30 | Loc="0 0 763 713" 31 | State=1 32 | Number=0 33 | 34 | [Desktop] 35 | Screen="1600 900" 36 | Window="Win_1" 37 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp1_BasicTest/Exp1_BasicTest.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp1_BasicTest -- RedBot Experiment 1 3 | * 4 | * Time to make sure the electronics work! To test everything out, we're 5 | * going to blink the LED on the board. 6 | * 7 | * This sketch was written by SparkFun Electronics, with lots of help from 8 | * the Arduino community. 9 | * 10 | * 23 Sept 2013 N. Seidle/M. Hord 11 | * 04 Oct 2014 B. Huang 12 | ***********************************************************************/ 13 | 14 | // setup() function runs once at the very beginning. 15 | void setup() 16 | { 17 | pinMode(13, OUTPUT); // The RedBot has an LED connected to pin 13. 18 | // Pins are all generic, so we have to first configure it 19 | // as an OUTPUT using this command. 20 | } 21 | 22 | // loop() function repeats over and over... forever! 23 | void loop() 24 | { 25 | // Blink sequence 26 | digitalWrite(13, HIGH); // Turns LED ON -- HIGH puts 5V on pin 13. 27 | delay(500); // delay(500) "pauses" the program for 500 milliseconds 28 | digitalWrite(13, LOW); // Turns LED OFF -- LOW puts 0V on pin 13. 29 | delay(500); // delay(500) "pauses" the program for 500 milliseconds 30 | // The total delay period is 1000 ms, or 1 second. 31 | } 32 | 33 | /*********************************************************************** 34 | * In Arduino, an LED is often connected to pin 13 for "debug" purposes. 35 | * This LED is used as an indicator to make sure that we're able to upload 36 | * code to the board. It's also a good indicator that your program is running. 37 | **********************************************************************/ 38 | 39 | 40 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp4_1_MakingSounds/Exp4_1_MakingSounds.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp4_1_MakingSounds -- RedBot Experiment 4.1 3 | * 4 | * Push the button (D12) to make some noise and start running! 5 | * 6 | * Hardware setup: 7 | * Plug the included RedBot Buzzer board into the Servo header labeled 9. 8 | * 9 | * This sketch was written by SparkFun Electronics,with lots of help from 10 | * the Arduino community. This code is completely free for any use. 11 | * 12 | * 23 Sept 2013 N. Seidle/M. Hord 13 | * 29 Oct 2014 B. Huang 14 | ***********************************************************************/ 15 | 16 | #include 17 | RedBotMotors motors; 18 | 19 | // Create a couple of constants for our pins. 20 | const int buzzerPin = 9; 21 | const int buttonPin = 12; 22 | 23 | void setup() 24 | { 25 | pinMode(buttonPin, INPUT_PULLUP); // configures the button as an INPUT 26 | // INPUT_PULLUP defaults it to HIGH. 27 | pinMode(buzzerPin, OUTPUT); // configures the buzzerPin as an OUTPUT 28 | } 29 | 30 | void loop() 31 | { 32 | if ( digitalRead(buttonPin) == LOW ) // if the button is pushed (LOW) 33 | { 34 | tone(buzzerPin, 1000); // Play a 1kHz tone on the pin number held in 35 | // the variable "buzzerPin". 36 | delay(125); // Wait for 125ms. 37 | noTone(buzzerPin); // Stop playing the tone. 38 | 39 | tone(buzzerPin, 2000); // Play a 2kHz tone on the buzzer pin 40 | 41 | motors.drive(255); // Start the motors. The whiskers will stop them. 42 | delay(1000); // delay for 1000 ms (1 second) 43 | 44 | noTone(buzzerPin); // Stop playing the tone. 45 | motors.brake(); // brake() or stop the motors. 46 | } 47 | else // otherwise, do this. 48 | { 49 | } 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /Libraries/Arduino/README.md: -------------------------------------------------------------------------------- 1 | SparkFun RedBot Arduino Library 2 | ======================================== 3 | 4 | ![SparkFun RedBot](https://cdn.sparkfun.com//assets/parts/1/0/2/8/8/13166-07a.jpg) 5 | 6 | [*SparkFun RedBot (ROB-12649)*](https://www.sparkfun.com/products/12649) 7 | 8 | Arduino library to run the SparkFun RedBot. 9 | 10 | Repository Contents 11 | ------------------- 12 | 13 | * **/examples** - Example sketches for the library (.ino). Run these from the Arduino IDE. 14 | * **/src** - Source files for the library (.cpp, .h). 15 | * **keywords.txt** - Keywords from this library that will be highlighted in the Arduino IDE. 16 | * **library.properties** - General library properties for the Arduino package manager. 17 | 18 | Documentation 19 | -------------- 20 | 21 | * **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library. 22 | * **[Product Repository](https://github.com/sparkfun/RedBot)** - Main repository (including hardware files) for the RedBot. 23 | * **[Assembly Guide](https://learn.sparkfun.com/tutorials/assembly-guide-for-redbot-with-shadow-chassis)** - Basic hookup guide for the RedBot. 24 | * **[Experiment Guide](https://learn.sparkfun.com/tutorials/experiment-guide-for-redbot-with-shadow-chassis)** - Experiment guide for the RedBot. 25 | 26 | Products that use this Library 27 | --------------------------------- 28 | 29 | * [ROB-13166](https://www.sparkfun.com/products/13166)- Basic RedBot Kit 30 | * [ROB-12649](https://www.sparkfun.com/products/12649)- RedBot Experiment Kit 31 | 32 | 33 | License Information 34 | ------------------- 35 | 36 | This product is _**open source**_! 37 | 38 | Please review the LICENSE.md file for license information. 39 | 40 | If you have any questions or concerns on licensing, please contact techsupport@sparkfun.com. 41 | 42 | Distributed as-is; no warranty is given. 43 | 44 | - Your friends at SparkFun. 45 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp7_1_RotaryEncoder/Exp7_1_RotaryEncoder.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp7_1_RotaryEncoder -- RedBot Experiment 7_1 3 | * 4 | * Knowing where your robot is can be very important. The RedBot supports 5 | * the use of an encoder to track the number of revolutions each wheels has 6 | * made, so you can tell not only how far each wheel has traveled but how 7 | * fast the wheels are turning. 8 | * 9 | * This sketch was written by SparkFun Electronics, with lots of help from 10 | * the Arduino community. This code is completely free for any use. 11 | * 12 | * 8 Oct 2013 M. Hord 13 | * Revised, 31 Oct 2014 B. Huang 14 | ***********************************************************************/ 15 | 16 | #include 17 | RedBotMotors motors; 18 | 19 | RedBotEncoder encoder = RedBotEncoder(A2, 10); // initializes encoder on pins A2 and 10 20 | int buttonPin = 12; 21 | int countsPerRev = 192; // 4 pairs of N-S x 48:1 gearbox = 192 ticks per wheel rev 22 | 23 | // variables used to store the left and right encoder counts. 24 | int lCount; 25 | int rCount; 26 | 27 | void setup() 28 | { 29 | pinMode(buttonPin, INPUT_PULLUP); 30 | Serial.begin(9600); 31 | Serial.println("left right"); 32 | Serial.println("================"); 33 | } 34 | 35 | void loop(void) 36 | { 37 | // wait for a button press to start driving. 38 | if (digitalRead(buttonPin) == LOW) 39 | { 40 | encoder.clearEnc(BOTH); // Reset the counters. 41 | motors.drive(150); // Start driving forward. 42 | } 43 | 44 | // store the encoder counts to a variable. 45 | lCount = encoder.getTicks(LEFT); // read the left motor encoder 46 | rCount = encoder.getTicks(RIGHT); // read the right motor encoder 47 | 48 | // print out to Serial Monitor the left and right encoder counts. 49 | Serial.print(lCount); 50 | Serial.print("\t"); 51 | Serial.println(rCount); 52 | 53 | // if either left or right motor are more than 5 revolutions, stop 54 | if ((lCount >= 5*countsPerRev) || (rCount >= 5*countsPerRev) ) 55 | { 56 | motors.brake(); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp9_SerialDrive/Exp9_SerialDrive.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp9_SerialDrive -- RedBot Experiment 9 3 | * 4 | * The first step to controlling the RedBot remotely is to first drive it 5 | * from the Serial Monitor in a tethered setup. 6 | * 7 | * Hardware setup: 8 | * After uploading this sketch, keep the RedBot tethered to your computer with 9 | * the USB cable. Open up the Seral Monitor to send commands to the RedBot to 10 | * drive. 11 | * 12 | * This sketch was written by SparkFun Electronics, with lots of help from 13 | * the Arduino community. This code is completely free for any use. 14 | * 15 | * 15 Dec 2014 B. Huang 16 | * 17 | * This experiment was inspired by Paul Kassebaum at Mathworks, who made 18 | * one of the very first non-SparkFun demo projects and brought it to the 19 | * 2013 Open Hardware Summit in Boston. Thanks Paul! 20 | ***********************************************************************/ 21 | 22 | #include 23 | RedBotMotors motors; 24 | int leftPower; // variable for setting the drive power 25 | int rightPower; 26 | int data; // variable for holding incoming data from PC to Arduino 27 | 28 | void setup(void) 29 | { 30 | Serial.begin(9600); 31 | Serial.print("Enter in left and right motor power values and click [Send]."); 32 | Serial.print("Separate values with a space or non-numeric character."); 33 | Serial.println(); 34 | Serial.print("Positive values spin the motor CW, and negative values spin the motor CCW."); 35 | } 36 | 37 | void loop(void) 38 | { 39 | // if there is data coming in on the Serial monitor, do something with it. 40 | if(Serial.available() > 0) 41 | { 42 | leftPower = Serial.parseInt(); // read in the next numeric value 43 | leftPower = constrain(leftPower, -255, 255); // constrain the data to -255 to +255 44 | 45 | rightPower = Serial.parseInt(); // read in the next numeric value 46 | rightPower = constrain(rightPower, -255, 255); // constrain the data to -255 to +255 47 | 48 | motors.leftMotor(leftPower); 49 | motors.rightMotor(rightPower); 50 | 51 | } 52 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp3_Turning/Exp3_Turning.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp3_Turning -- RedBot Experiment 3 3 | * 4 | * Explore turning with the RedBot by controlling the Right and Left motors 5 | * separately. 6 | * 7 | * Hardware setup: 8 | * This code requires only the most basic setup: the motors must be 9 | * connected, and the board must be receiving power from the battery pack. 10 | * 11 | * 23 Sept 2013 N. Seidle/M. Hord 12 | * 04 Oct 2014 B. Huang 13 | ***********************************************************************/ 14 | #include // This line "includes" the library into your sketch. 15 | 16 | RedBotMotors motors; // Instantiate the motor control object. 17 | 18 | void setup() 19 | { 20 | // drive forward -- instead of using motors.drive(); Here is another way. 21 | motors.rightMotor(150); // Turn on right motor clockwise medium power (motorPower = 150) 22 | motors.leftMotor(-150); // Turn on left motor counter clockwise medium power (motorPower = 150) 23 | delay(1000); // for 1000 ms. 24 | motors.brake(); // brake() motors 25 | 26 | // pivot -- spinning both motors CCW causes the RedBot to turn to the right 27 | motors.rightMotor(-100); // Turn CCW at motorPower of 100 28 | motors.leftMotor(-100); // Turn CCW at motorPower of 100 29 | delay(500); // for 500 ms. 30 | motors.brake(); // brake() motors 31 | delay(500); // for 500 ms. 32 | 33 | // drive forward -- instead of using motors.drive(); Here is another way. 34 | motors.rightMotor(150); // Turn on right motor clockwise medium power (motorPower = 150) 35 | motors.leftMotor(-150); // Turn on left motor counter clockwise medium power (motorPower = 150) 36 | delay(1000); // for 1000 ms. 37 | motors.brake(); // brake() motors 38 | } 39 | 40 | void loop() 41 | { 42 | // Figure 8 pattern -- Turn Right, Turn Left, Repeat 43 | // motors.leftMotor(-200); // Left motor CCW at 200 44 | // motors.rightMotor(80); // Right motor CW at 80 45 | // delay(2000); 46 | // motors.leftMotor(-80); // Left motor CCW at 80 47 | // motors.rightMotor(200); // Right motor CW at 200 48 | // delay(2000); 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /Documentation/html/navtreeindex0.js: -------------------------------------------------------------------------------- 1 | var NAVTREEINDEX0 = 2 | { 3 | "_red_bot_8h_source.html":[1,0,0,0,0], 4 | "annotated.html":[0,0], 5 | "class_red_bot_accel.html":[0,0,0], 6 | "class_red_bot_accel.html#a190369eae35db9db9d406dab70ec90ad":[0,0,0,5], 7 | "class_red_bot_accel.html#a1a4efe3197febc4632b8fc48237bb440":[0,0,0,6], 8 | "class_red_bot_accel.html#a2b205e64828e57dcf2fb35ee81d5e731":[0,0,0,3], 9 | "class_red_bot_accel.html#a861b1e8f2cd9e35c3b2caee54d43d2d1":[0,0,0,2], 10 | "class_red_bot_accel.html#a8678bd23d5f1913950b5c97b9487a9da":[0,0,0,7], 11 | "class_red_bot_accel.html#a88e803ce82865fa875e17e85f9e56801":[0,0,0,1], 12 | "class_red_bot_accel.html#ace6875bab4125392c24c4fecc0313c32":[0,0,0,4], 13 | "class_red_bot_accel.html#ad2d0de0051d6570ab9d0d4f06e7468a9":[0,0,0,0], 14 | "class_red_bot_motor.html":[0,0,1], 15 | "class_red_bot_motor.html#a1fbd19b1b3ef733664397c183bb910ea":[0,0,1,3], 16 | "class_red_bot_motor.html#a2e55b7f88c4c081928370fe711ca61ef":[0,0,1,10], 17 | "class_red_bot_motor.html#a61a73a2dd543697bc966bbb0de47a81d":[0,0,1,6], 18 | "class_red_bot_motor.html#a64540ac32e023eff2c93fd60f0537562":[0,0,1,1], 19 | "class_red_bot_motor.html#a710584b709cd8a7a7070cbbf3d0a6ed6":[0,0,1,7], 20 | "class_red_bot_motor.html#a92a78cd6ecaf47cb50b1c8059375c261":[0,0,1,2], 21 | "class_red_bot_motor.html#ac757e02db079bc5a57774b4c7bbc3737":[0,0,1,5], 22 | "class_red_bot_motor.html#acf1246d90ff26ec68748e16e7d80e78b":[0,0,1,8], 23 | "class_red_bot_motor.html#ae2c204ef267fe9bde43cf6caeb693eae":[0,0,1,0], 24 | "class_red_bot_motor.html#aeef7a9abd94a74ea87860163ecad6764":[0,0,1,4], 25 | "class_red_bot_motor.html#affb91e6e7205c9df1482bb58f0c0ed05":[0,0,1,9], 26 | "class_red_bot_sensor.html":[0,0,2], 27 | "class_red_bot_sensor.html#a2ebbbab14a59c03dde759f693c59ce26":[0,0,2,0], 28 | "class_red_bot_sensor.html#a585a98bb820d20917bb71dfc004cc310":[0,0,2,1], 29 | "class_red_bot_sensor.html#a9bbf93b3c4282562e14f605a07f47c64":[0,0,2,4], 30 | "class_red_bot_sensor.html#aa3e2c32c59f8ac1f9866069602a16eba":[0,0,2,3], 31 | "class_red_bot_sensor.html#abd97ded86ad9de7e28ad0295a51d5c20":[0,0,2,2], 32 | "classes.html":[0,1], 33 | "dir_5caca0cdf36469e9d889ba659d3b7318.html":[1,0,0,0], 34 | "dir_a991eec27578c865874ede3d8ec657c2.html":[1,0,0], 35 | "files.html":[1,0], 36 | "functions.html":[0,2,0], 37 | "functions_func.html":[0,2,1], 38 | "functions_vars.html":[0,2,2], 39 | "index.html":[], 40 | "pages.html":[] 41 | }; 42 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp7_2_DriveDistance/Exp7_2_DriveDistance.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp7_2_DriveDistance -- RedBot Experiment 7.2 3 | * 4 | * In an earlier experiment, we used a combination of speed and time to 5 | * drive a certain distance. Using the encoders, we can me much more accurate. 6 | * In this example, we will show you how to setup your robot to drive a certain 7 | * distance regardless of the motorPower. 8 | * 9 | * This sketch was written by SparkFun Electronics, with lots of help from 10 | * the Arduino community. This code is completely free for any use. 11 | * 12 | * 8 Oct 2013 M. Hord 13 | * Revised, 31 Oct 2014 B. Huang 14 | ***********************************************************************/ 15 | #include 16 | 17 | RedBotMotors motors; 18 | 19 | RedBotEncoder encoder = RedBotEncoder(A2, 10); 20 | int buttonPin = 12; 21 | int countsPerRev = 192; // 4 pairs of N-S x 48:1 gearbox = 192 ticks per wheel rev 22 | 23 | float wheelDiam = 2.56; // diam = 65mm / 25.4 mm/in 24 | float wheelCirc = PI*wheelDiam; // Redbot wheel circumference = pi*D 25 | 26 | void setup() 27 | { 28 | pinMode(buttonPin, INPUT_PULLUP); 29 | Serial.begin(9600); 30 | } 31 | 32 | void loop(void) 33 | { 34 | // drive on button press. 35 | if (digitalRead(buttonPin) == LOW) 36 | { 37 | driveDistance(12, 150); // drive 12 inches, at motorPower = 150. 38 | } 39 | } 40 | 41 | void driveDistance(float distance, int motorPower) 42 | { 43 | long lCount = 0; 44 | long rCount = 0; 45 | float numRev; 46 | // debug 47 | Serial.print("driveDistance() "); 48 | Serial.print(distance); 49 | Serial.print(" inches at "); 50 | Serial.print(motorPower); 51 | Serial.println(" power."); 52 | 53 | numRev = (float) distance / wheelCirc; 54 | Serial.println(numRev, 3); 55 | encoder.clearEnc(BOTH); // clear the encoder count 56 | motors.drive(motorPower); 57 | 58 | while (rCount < numRev*countsPerRev) 59 | { 60 | // while the left encoder is less than the target count -- debug print 61 | // the encoder values and wait -- this is a holding loop. 62 | lCount = encoder.getTicks(LEFT); 63 | rCount = encoder.getTicks(RIGHT); 64 | Serial.print(lCount); 65 | Serial.print("\t"); 66 | Serial.print(rCount); 67 | Serial.print("\t"); 68 | Serial.println(numRev*countsPerRev); 69 | } 70 | // now apply "brakes" to stop the motors. 71 | motors.brake(); 72 | } 73 | 74 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp8_1_AccelerometerRead/Exp8_1_AccelerometerRead.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp8_1_AccelerometerRead -- RedBot Experiment 8.1 3 | * 4 | * Measuring speed, velocity, and acceleration are all key 5 | * components to robotics. This first experiment will introduce 6 | * you to using the Accelerometer sensor on the RedBot. 7 | * 8 | * Hardware setup: 9 | * You'll need to attach the RedBot Accelerometer board to hader on the upper 10 | * right side of the mainboard. See the manual for details on how to do this. 11 | * 12 | * This sketch was written by SparkFun Electronics, with lots of help from 13 | * the Arduino community. This code is completely free for any use. 14 | * 15 | * 8 Oct 2013 M. Hord 16 | * Revised, 31 Oct 2014 B. Huang 17 | * 18 | * 8 Oct 2013 M. Hord 19 | * 20 | * This experiment was inspired by Paul Kassebaum at Mathworks, who made 21 | * one of the very first non-SparkFun demo projects and brought it to the 22 | * 2013 Open Hardware Summit in Boston. Thanks Paul! 23 | ***********************************************************************/ 24 | 25 | #include 26 | RedBotMotors motors; 27 | 28 | // The RedBot library includes support for the accelerometer. We've tried 29 | // to make using the accelerometer as easy as to use as possible. 30 | 31 | RedBotAccel accelerometer; 32 | 33 | void setup(void) 34 | { 35 | Serial.begin(9600); 36 | Serial.println("Accelerometer Readings:"); 37 | Serial.println(); 38 | Serial.println("(X, Y, Z) -- [X-Z, Y-Z, X-Y]"); 39 | Serial.println("============================"); 40 | } 41 | 42 | void loop(void) 43 | { 44 | accelerometer.read(); // updates the x, y, and z axis readings on the acceleromter 45 | 46 | // Display out the X, Y, and Z - axis "acceleration" measurements and also 47 | // the relative angle between the X-Z, Y-Z, and X-Y vectors. (These give us 48 | // the orientation of the RedBot in 3D space. 49 | 50 | Serial.print("("); 51 | Serial.print(accelerometer.x); 52 | Serial.print(", "); // tab 53 | 54 | Serial.print(accelerometer.y); 55 | Serial.print(", "); // tab 56 | 57 | Serial.print(accelerometer.z); 58 | Serial.print(") -- "); // tab 59 | 60 | Serial.print("["); 61 | Serial.print(accelerometer.angleXZ); 62 | Serial.print(", "); 63 | Serial.print(accelerometer.angleYZ); 64 | Serial.print(", "); 65 | Serial.print(accelerometer.angleXY); 66 | Serial.println("]"); 67 | 68 | // short delay in between readings/ 69 | delay(100); 70 | } 71 | 72 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp5_Bumpers/Exp5_Bumpers.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp5_Bumpers -- RedBot Experiment 5 3 | * 4 | * Now let's experiment with the whisker bumpers. These super-simple switches 5 | * let you detect a collision before it really happens- the whisker will 6 | * bump something before your robot crashes into it. 7 | * 8 | * This sketch was written by SparkFun Electronics, with lots of help from 9 | * the Arduino community. 10 | * This code is completely free for any use. 11 | * Visit https://learn.sparkfun.com/tutorials/redbot-inventors-kit-guide 12 | * for SIK information. 13 | * 14 | * 8 Oct 2013 M. Hord 15 | * Revised 30 Oct 2014 B. Huang 16 | ***********************************************************************/ 17 | 18 | #include 19 | RedBotMotors motors; 20 | 21 | RedBotBumper lBumper = RedBotBumper(3); // initialzes bumper object on pin 3 22 | RedBotBumper rBumper = RedBotBumper(11); // initialzes bumper object on pin 11 23 | 24 | int buttonPin = 12; // variable to store the button Pin 25 | 26 | int lBumperState; // state variable to store the bumper value 27 | int rBumperState; // state variable to store the bumper value 28 | 29 | void setup() 30 | { 31 | // nothing here. 32 | } 33 | 34 | void loop() 35 | { 36 | motors.drive(255); 37 | lBumperState = lBumper.read(); // default INPUT state is HIGH, it is LOW when bumped 38 | rBumperState = rBumper.read(); // default INPUT state is HIGH, it is LOW when bumped 39 | 40 | if (lBumperState == LOW) // left side is bumped/ 41 | { 42 | reverse(); // backs up 43 | turnRight(); // turns 44 | } 45 | 46 | if (rBumperState == LOW) // right side is bumped/ 47 | { 48 | reverse(); // backs up 49 | turnLeft(); // turns 50 | } 51 | 52 | } 53 | 54 | // reverse() function -- backs up at full power 55 | void reverse() 56 | { 57 | motors.drive(-255); 58 | delay(500); 59 | motors.brake(); 60 | delay(100); // short delay to let robot fully stop 61 | } 62 | 63 | // turnRight() function -- turns RedBot to the Right 64 | void turnRight() 65 | { 66 | motors.leftMotor(-150); // spin CCW 67 | motors.rightMotor(-150); // spin CCW 68 | delay(500); 69 | motors.brake(); 70 | delay(100); // short delay to let robot fully stop 71 | } 72 | 73 | // turnRight() function -- turns RedBot to the Left 74 | void turnLeft() 75 | { 76 | motors.leftMotor(+150); // spin CW 77 | motors.rightMotor(+150); // spin CW 78 | delay(500); 79 | motors.brake(); 80 | delay(100); // short delay to let robot fully stop 81 | } 82 | 83 | 84 | -------------------------------------------------------------------------------- /Documentation/html/navtree.css: -------------------------------------------------------------------------------- 1 | #nav-tree .children_ul { 2 | margin:0; 3 | padding:4px; 4 | } 5 | 6 | #nav-tree ul { 7 | list-style:none outside none; 8 | margin:0px; 9 | padding:0px; 10 | } 11 | 12 | #nav-tree li { 13 | white-space:nowrap; 14 | margin:0px; 15 | padding:0px; 16 | } 17 | 18 | #nav-tree .plus { 19 | margin:0px; 20 | } 21 | 22 | #nav-tree .selected { 23 | background-image: url('tab_a.png'); 24 | background-repeat:repeat-x; 25 | color: #fff; 26 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 27 | } 28 | 29 | #nav-tree img { 30 | margin:0px; 31 | padding:0px; 32 | border:0px; 33 | vertical-align: middle; 34 | } 35 | 36 | #nav-tree a { 37 | text-decoration:none; 38 | padding:0px; 39 | margin:0px; 40 | outline:none; 41 | } 42 | 43 | #nav-tree .label { 44 | margin:0px; 45 | padding:0px; 46 | font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; 47 | } 48 | 49 | #nav-tree .label a { 50 | padding:2px; 51 | } 52 | 53 | #nav-tree .selected a { 54 | text-decoration:none; 55 | color:#fff; 56 | } 57 | 58 | #nav-tree .children_ul { 59 | margin:0px; 60 | padding:0px; 61 | } 62 | 63 | #nav-tree .item { 64 | margin:0px; 65 | padding:0px; 66 | } 67 | 68 | #nav-tree { 69 | padding: 0px 0px; 70 | background-color: #FAFAFF; 71 | font-size:14px; 72 | overflow:auto; 73 | } 74 | 75 | #doc-content { 76 | overflow:auto; 77 | display:block; 78 | padding:0px; 79 | margin:0px; 80 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 81 | } 82 | 83 | #side-nav { 84 | padding:0 6px 0 0; 85 | margin: 0px; 86 | display:block; 87 | position: absolute; 88 | left: 0px; 89 | width: 250px; 90 | } 91 | 92 | .ui-resizable .ui-resizable-handle { 93 | display:block; 94 | } 95 | 96 | .ui-resizable-e { 97 | background:url("ftv2splitbar.png") repeat scroll right center transparent; 98 | cursor:e-resize; 99 | height:100%; 100 | right:0; 101 | top:0; 102 | width:6px; 103 | } 104 | 105 | .ui-resizable-handle { 106 | display:none; 107 | font-size:0.1px; 108 | position:absolute; 109 | z-index:1; 110 | } 111 | 112 | #nav-tree-contents { 113 | margin: 6px 0px 0px 0px; 114 | } 115 | 116 | #nav-tree { 117 | background-image:url('nav_h.png'); 118 | background-repeat:repeat-x; 119 | background-color: #F9FAFC; 120 | -webkit-overflow-scrolling : touch; /* iOS 5+ */ 121 | } 122 | 123 | #nav-sync { 124 | position:absolute; 125 | top:5px; 126 | right:24px; 127 | z-index:0; 128 | } 129 | 130 | #nav-sync img { 131 | opacity:0.3; 132 | } 133 | 134 | #nav-sync img:hover { 135 | opacity:0.9; 136 | } 137 | 138 | @media print 139 | { 140 | #nav-tree { display: none; } 141 | div.ui-resizable-handle { display: none; position: relative; } 142 | } 143 | 144 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/RedBotSensor.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | Main CPP for RedBot IR reflectance sensors. 3 | 4 | This code is beerware; if you use it, please buy me (or any other 5 | SparkFun employee) a cold beverage next time you run into one of 6 | us at the local. 7 | 8 | 21 Jan 2014- Mike Hord, SparkFun Electronics 9 | 10 | Code developed in Arduino 1.0.5, on an SparkFun Redbot v12. 11 | ****************************************************************/ 12 | 13 | #include "RedBot.h" 14 | #include 15 | 16 | RedBotSensor::RedBotSensor(int pin) 17 | { 18 | _pin = pin; 19 | _BGLevel = -1; 20 | _detectLevel = -1; 21 | } 22 | 23 | int RedBotSensor::read() 24 | { 25 | return analogRead(_pin); 26 | } 27 | 28 | // If both the background and detection levels for this sensor have been 29 | // set, returns true. 30 | boolean RedBotSensor::calStatus() 31 | { 32 | if (_BGLevel != -1 && _detectLevel != -1) return true; 33 | else return false; 34 | } 35 | 36 | // An attempt at a decent single-call, quick return line detection function. 37 | boolean RedBotSensor::check() 38 | { 39 | // Collect a sample. 40 | int level = analogRead(_pin); 41 | 42 | // Are we looking for something that is darker than our normal level (say, 43 | // a table edge, or a black stripe on a white surface) or something that 44 | // is brighter than our normal level (say, a piece of copper tape? on a 45 | // dark floor)? 46 | // Remember, the darker the surface, the higher the value returned. 47 | if (_BGLevel < _detectLevel) // Light-on-dark situation 48 | { 49 | // For a light-on-dark detection, we're looking to see if the level is 50 | // higher than _BGLevel. Our threshold will be a rise above the BGLevel 51 | // of 1/4 the difference between background and detect levels. 52 | int threshold = (_detectLevel - _BGLevel)>>2; 53 | if (level-threshold > _BGLevel) return true; 54 | else return false; 55 | } 56 | else // Dark-on-light situation 57 | { 58 | // For a dark-on-light detection, we'll do exactly the opposite: check to 59 | // see if the level is lower than _BGLevel by at least 1/4 the difference 60 | // between the levels. 61 | int threshold = (_BGLevel - _detectLevel)>>2; 62 | if (level+threshold < _BGLevel) return true; 63 | else return false; 64 | } 65 | } 66 | 67 | // setBGLevel() is used to calibrate the level that we expect to see when we 68 | // aren't seeing something interesting. 69 | int RedBotSensor::setBGLevel() 70 | { 71 | _BGLevel = analogRead(_pin); 72 | 73 | return _BGLevel; 74 | } 75 | 76 | // setDetectLevel() works exactly the same as setBGLevel(), but with different 77 | // variables. 78 | int RedBotSensor::setDetectLevel() 79 | { 80 | _detectLevel = analogRead(_pin); 81 | 82 | return _detectLevel; 83 | } -------------------------------------------------------------------------------- /Libraries/Arduino/src/RedBotEncoder.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | Main CPP for RedBot wheel encoder. 3 | 4 | This code is beerware; if you use it, please buy me (or any other 5 | SparkFun employee) a cold beverage next time you run into one of 6 | us at the local. 7 | 8 | 21 Jan 2014- Mike Hord, SparkFun Electronics 9 | 10 | Code developed in Arduino 1.0.5, on an SparkFun Redbot v12. 11 | ****************************************************************/ 12 | 13 | #include "RedBot.h" 14 | #include 15 | 16 | RedBotEncoder *encoderObject=0; // Create a local pointer to an instance of this 17 | // class, so we can edit the counts with other 18 | // library functions. 19 | 20 | RedBotEncoder::RedBotEncoder(int lPin, int rPin) 21 | { 22 | // RedBot only breaks out ten valid pins: 23 | // A0-A5 a.k.a. D14-19 (PCINT 8-13) 24 | // D3 (PCINT 19) 25 | // D9-D11 (PCINT 1-3) 26 | // We'll need a whopping case statement to set up the pin change interrupts 27 | // for this; in fact, we'll need two, but I'll abstract it to a function. 28 | // A call to setPinChangeInterrupt() enables pin change interrupts for that 29 | // pin, and pin change interrupts for the group that pin is a part of. 30 | pinMode(lPin, INPUT_PULLUP); 31 | pinMode(rPin, INPUT_PULLUP); 32 | setPinChangeInterrupt(lPin, LENCODER); 33 | setPinChangeInterrupt(rPin, RENCODER); 34 | lCounts = 0; 35 | rCounts = 0; 36 | encoderObject = this; // We want a local pointer to the class member that is 37 | // instantiated in the sketch, so we can manipulate its 38 | // private members with other classes. 39 | lDir = 1; // default direction to forward -- used for encoder counting 40 | rDir = 1; // default direction to forward -- used for encoder counting 41 | } 42 | 43 | // This private function changes the counter when a tick happens. The direction 44 | // is set by the functions that set the motor direction. 45 | void RedBotEncoder::wheelTick(WHEEL wheel) 46 | { 47 | switch(wheel) 48 | { 49 | case LEFT: 50 | lCounts+= (long)lDir; 51 | break; 52 | case RIGHT: 53 | rCounts+= (long)rDir; 54 | break; 55 | case BOTH: 56 | break; 57 | } 58 | } 59 | 60 | // Public function to clear the encoder counts. 61 | void RedBotEncoder::clearEnc(WHEEL wheel) 62 | { 63 | switch(wheel) 64 | { 65 | case LEFT: 66 | lCounts = 0; 67 | break; 68 | case RIGHT: 69 | rCounts = 0; 70 | break; 71 | case BOTH: 72 | lCounts = 0; 73 | rCounts = 0; 74 | break; 75 | } 76 | } 77 | 78 | // Public function to read the encoder counts for a given wheel. 79 | long RedBotEncoder::getTicks(WHEEL wheel) 80 | { 81 | switch(wheel) 82 | { 83 | case LEFT: 84 | return lCounts; 85 | case RIGHT: 86 | return rCounts; 87 | case BOTH: 88 | return 0; 89 | } 90 | return 0; 91 | } -------------------------------------------------------------------------------- /Documentation/html/resize.js: -------------------------------------------------------------------------------- 1 | var cookie_namespace = 'doxygen'; 2 | var sidenav,navtree,content,header; 3 | 4 | function readCookie(cookie) 5 | { 6 | var myCookie = cookie_namespace+"_"+cookie+"="; 7 | if (document.cookie) 8 | { 9 | var index = document.cookie.indexOf(myCookie); 10 | if (index != -1) 11 | { 12 | var valStart = index + myCookie.length; 13 | var valEnd = document.cookie.indexOf(";", valStart); 14 | if (valEnd == -1) 15 | { 16 | valEnd = document.cookie.length; 17 | } 18 | var val = document.cookie.substring(valStart, valEnd); 19 | return val; 20 | } 21 | } 22 | return 0; 23 | } 24 | 25 | function writeCookie(cookie, val, expiration) 26 | { 27 | if (val==undefined) return; 28 | if (expiration == null) 29 | { 30 | var date = new Date(); 31 | date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week 32 | expiration = date.toGMTString(); 33 | } 34 | document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; 35 | } 36 | 37 | function resizeWidth() 38 | { 39 | var windowWidth = $(window).width() + "px"; 40 | var sidenavWidth = $(sidenav).outerWidth(); 41 | content.css({marginLeft:parseInt(sidenavWidth)+"px"}); 42 | writeCookie('width',sidenavWidth, null); 43 | } 44 | 45 | function restoreWidth(navWidth) 46 | { 47 | var windowWidth = $(window).width() + "px"; 48 | content.css({marginLeft:parseInt(navWidth)+6+"px"}); 49 | sidenav.css({width:navWidth + "px"}); 50 | } 51 | 52 | function resizeHeight() 53 | { 54 | var headerHeight = header.outerHeight(); 55 | var footerHeight = footer.outerHeight(); 56 | var windowHeight = $(window).height() - headerHeight - footerHeight; 57 | content.css({height:windowHeight + "px"}); 58 | navtree.css({height:windowHeight + "px"}); 59 | sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); 60 | } 61 | 62 | function initResizable() 63 | { 64 | header = $("#top"); 65 | sidenav = $("#side-nav"); 66 | content = $("#doc-content"); 67 | navtree = $("#nav-tree"); 68 | footer = $("#nav-path"); 69 | $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); 70 | $(window).resize(function() { resizeHeight(); }); 71 | var width = readCookie('width'); 72 | if (width) { restoreWidth(width); } else { resizeWidth(); } 73 | resizeHeight(); 74 | var url = location.href; 75 | var i=url.indexOf("#"); 76 | if (i>=0) window.location.hash=url.substr(i); 77 | var _preventDefault = function(evt) { evt.preventDefault(); }; 78 | $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); 79 | $(document).bind('touchmove',function(e){ 80 | try { 81 | var target = e.target; 82 | while (target) { 83 | if ($(target).css('-webkit-overflow-scrolling')=='touch') return; 84 | target = target.parentNode; 85 | } 86 | e.preventDefault(); 87 | } catch(err) { 88 | e.preventDefault(); 89 | } 90 | }); 91 | } 92 | 93 | 94 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | SparkFun License Information 2 | ============================ 3 | 4 | SparkFun uses two different licenses for our files - one for hardware and one for code. 5 | 6 | Hardware 7 | --------- 8 | 9 | **SparkFun hardware is released under [Creative Commons Share-alike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).** 10 | 11 | Note: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode). 12 | 13 | You are free to: 14 | 15 | Share — copy and redistribute the material in any medium or format 16 | Adapt — remix, transform, and build upon the material 17 | for any purpose, even commercially. 18 | The licensor cannot revoke these freedoms as long as you follow the license terms. 19 | Under the following terms: 20 | 21 | Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 22 | ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. 23 | No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. 24 | Notices: 25 | 26 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. 27 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. 28 | 29 | 30 | Code 31 | -------- 32 | 33 | **SparkFun code, firmware, and software is released under the [MIT License](http://opensource.org/licenses/MIT).** 34 | 35 | The MIT License (MIT) 36 | 37 | Copyright (c) 2016 SparkFun Electronics, Inc. 38 | 39 | Permission is hereby granted, free of charge, to any person obtaining a copy 40 | of this software and associated documentation files (the "Software"), to deal 41 | in the Software without restriction, including without limitation the rights 42 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 43 | copies of the Software, and to permit persons to whom the Software is 44 | furnished to do so, subject to the following conditions: 45 | 46 | The above copyright notice and this permission notice shall be included in all 47 | copies or substantial portions of the Software. 48 | 49 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 50 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 51 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 52 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 53 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 54 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 55 | SOFTWARE. 56 | 57 | 58 | -------------------------------------------------------------------------------- /Libraries/Arduino/LICENSE.md: -------------------------------------------------------------------------------- 1 | SparkFun License Information 2 | ============================ 3 | 4 | SparkFun uses two different licenses for our files - one for hardware and one for code. 5 | 6 | Hardware 7 | --------- 8 | 9 | **SparkFun hardware is released under [Creative Commons Share-alike 4.0 International](http://creativecommons.org/licenses/by-sa/4.0/).** 10 | 11 | Note: This is a human-readable summary of (and not a substitute for) the [license](http://creativecommons.org/licenses/by-sa/4.0/legalcode). 12 | 13 | You are free to: 14 | 15 | Share — copy and redistribute the material in any medium or format 16 | Adapt — remix, transform, and build upon the material 17 | for any purpose, even commercially. 18 | The licensor cannot revoke these freedoms as long as you follow the license terms. 19 | Under the following terms: 20 | 21 | Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. 22 | ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. 23 | No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. 24 | Notices: 25 | 26 | You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. 27 | No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. 28 | 29 | 30 | Code 31 | -------- 32 | 33 | **SparkFun code, firmware, and software is released under the [MIT License](http://opensource.org/licenses/MIT).** 34 | 35 | The MIT License (MIT) 36 | 37 | Copyright (c) 2016 SparkFun Electronics, Inc. 38 | 39 | Permission is hereby granted, free of charge, to any person obtaining a copy 40 | of this software and associated documentation files (the "Software"), to deal 41 | in the Software without restriction, including without limitation the rights 42 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 43 | copies of the Software, and to permit persons to whom the Software is 44 | furnished to do so, subject to the following conditions: 45 | 46 | The above copyright notice and this permission notice shall be included in all 47 | copies or substantial portions of the Software. 48 | 49 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 50 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 51 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 52 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 53 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 54 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 55 | SOFTWARE. 56 | 57 | 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SparkFun RedBot 2 | =============== 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
RedBot Mainboard [ROB-12097]SparkFun Inventor's Kit for RedBot [ROB-12649]
14 | 15 | Design files and firmware files for the [RedBot Main board](https://www.sparkfun.com/products/11622). 16 | 17 | Repository Contents 18 | ------------------- 19 | 20 | * **/Documentation** - Documentation for the library's public API 21 | * **/Hardware** - Eagle PCB layout files 22 | * **/Libraries/Arduino/RedBot** - RedBot support library 23 | * **/Production** - Files to support SparkFun production 24 | 25 | Documentation 26 | -------------- 27 | 28 | * **[Installing an Arduino Library Guide](https://learn.sparkfun.com/tutorials/installing-an-arduino-library)** - Basic information on how to install an Arduino library. 29 | * **[Product Repository](https://github.com/sparkfun/RedBot)** - Main repository (including hardware files) for the RedBot. 30 | * **[Library Repository](https://github.com/sparkfun/SparkFun_Redbot_Arduino_Library)** - Arduino library for the RedBot. 31 | * **[Assembly Guide](https://learn.sparkfun.com/tutorials/assembly-guide-for-redbot-with-shadow-chassis)** - Basic hookup guide for the RedBot. 32 | * **[Experiment Guide](https://learn.sparkfun.com/tutorials/experiment-guide-for-redbot-with-shadow-chassis)** - Experiment guide for the RedBot. 33 | 34 | 35 | Product Versions 36 | ---------------- 37 | This repository only contains the hardware files for the RedBot Main board. There are several different support products available for the RedBot Kit however. 38 | 39 | * [ROB-12097](https://www.sparkfun.com/products/12097) - RedBot Main Board. 40 | * [ROB-12649](https://www.sparkfun.com/products/12649) - RedBot SparkFun Inventor's Kit 41 | * *[ROB-13166 (RETIRED)](https://www.sparkfun.com/products/13166) - RedBot Basic Kit* 42 | * [ROB-12567](https://www.sparkfun.com/products/12567) - RedBot Buzzer 43 | * [SEN-11999](https://www.sparkfun.com/products/11999) - RedBot Mechanical Bumper 44 | * [SEN-12589](https://www.sparkfun.com/products/12589) - RedBot Accelerometer 45 | * [SEN-11769](https://www.sparkfun.com/products/11769) - RedBot Line Sensor 46 | * [SEN-13582](https://www.sparkfun.com/products/13582) - SparkFun Line Follower Array 47 | 48 | License Information 49 | ------------------- 50 | 51 | This product is _**open source**_! 52 | 53 | Please review the LICENSE.md file for license information. 54 | 55 | If you have any questions or concerns on licensing, please contact techsupport@sparkfun.com. 56 | 57 | Distributed as-is; no warranty is given. 58 | 59 | - Your friends at SparkFun. 60 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## SparkFun Useful stuff 3 | ################# 4 | 5 | ## AVR Development 6 | *.eep 7 | *.elf 8 | *.lst 9 | *.lss 10 | *.sym 11 | *.d 12 | *.o 13 | *.srec 14 | *.map 15 | 16 | ## Notepad++ backup files 17 | *.bak 18 | 19 | ## BOM files 20 | *bom* 21 | 22 | ################# 23 | ## Eclipse 24 | ################# 25 | 26 | *.pydevproject 27 | .project 28 | .metadata 29 | bin/ 30 | tmp/ 31 | *.tmp 32 | *.bak 33 | *.swp 34 | *~.nib 35 | local.properties 36 | .classpath 37 | .settings/ 38 | .loadpath 39 | 40 | # External tool builders 41 | .externalToolBuilders/ 42 | 43 | # Locally stored "Eclipse launch configurations" 44 | *.launch 45 | 46 | # CDT-specific 47 | .cproject 48 | 49 | # PDT-specific 50 | .buildpath 51 | 52 | 53 | ############# 54 | ## Eagle 55 | ############# 56 | 57 | # Ignore the board and schematic backup files 58 | *.b#? 59 | *.s#? 60 | 61 | 62 | ################# 63 | ## Visual Studio 64 | ################# 65 | 66 | ## Ignore Visual Studio temporary files, build results, and 67 | ## files generated by popular Visual Studio add-ons. 68 | 69 | # User-specific files 70 | *.suo 71 | *.user 72 | *.sln.docstates 73 | 74 | # Build results 75 | [Dd]ebug/ 76 | [Rr]elease/ 77 | *_i.c 78 | *_p.c 79 | *.ilk 80 | *.meta 81 | *.obj 82 | *.pch 83 | *.pdb 84 | *.pgc 85 | *.pgd 86 | *.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.vspscc 93 | .builds 94 | *.dotCover 95 | 96 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 97 | #packages/ 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opensdf 104 | *.sdf 105 | 106 | # Visual Studio profiler 107 | *.psess 108 | *.vsp 109 | 110 | # ReSharper is a .NET coding add-in 111 | _ReSharper* 112 | 113 | # Installshield output folder 114 | [Ee]xpress 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish 128 | 129 | # Others 130 | [Bb]in 131 | [Oo]bj 132 | sql 133 | TestResults 134 | *.Cache 135 | ClientBin 136 | stylecop.* 137 | ~$* 138 | *.dbmdl 139 | Generated_Code #added for RIA/Silverlight projects 140 | 141 | # Backup & report files from converting an old project file to a newer 142 | # Visual Studio version. Backup files are not needed, because we have git ;-) 143 | _UpgradeReport_Files/ 144 | Backup*/ 145 | UpgradeLog*.XML 146 | 147 | 148 | ############ 149 | ## Windows 150 | ############ 151 | 152 | # Windows image file caches 153 | Thumbs.db 154 | 155 | # Folder config file 156 | Desktop.ini 157 | 158 | 159 | ############# 160 | ## Python 161 | ############# 162 | 163 | *.py[co] 164 | 165 | # Packages 166 | *.egg 167 | *.egg-info 168 | dist 169 | build 170 | eggs 171 | parts 172 | bin 173 | var 174 | sdist 175 | develop-eggs 176 | .installed.cfg 177 | 178 | # Installer logs 179 | pip-log.txt 180 | 181 | # Unit test / coverage reports 182 | .coverage 183 | .tox 184 | 185 | #Translations 186 | *.mo 187 | 188 | #Mr Developer 189 | .mr.developer.cfg 190 | 191 | # Mac crap 192 | .DS_Store 193 | -------------------------------------------------------------------------------- /Libraries/Arduino/.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## SparkFun Useful stuff 3 | ################# 4 | 5 | ## AVR Development 6 | *.eep 7 | *.elf 8 | *.lst 9 | *.lss 10 | *.sym 11 | *.d 12 | *.o 13 | *.srec 14 | *.map 15 | 16 | ## Notepad++ backup files 17 | *.bak 18 | 19 | ## BOM files 20 | *bom* 21 | 22 | ################# 23 | ## Eclipse 24 | ################# 25 | 26 | *.pydevproject 27 | .project 28 | .metadata 29 | bin/ 30 | tmp/ 31 | *.tmp 32 | *.bak 33 | *.swp 34 | *~.nib 35 | local.properties 36 | .classpath 37 | .settings/ 38 | .loadpath 39 | 40 | # External tool builders 41 | .externalToolBuilders/ 42 | 43 | # Locally stored "Eclipse launch configurations" 44 | *.launch 45 | 46 | # CDT-specific 47 | .cproject 48 | 49 | # PDT-specific 50 | .buildpath 51 | 52 | 53 | ############# 54 | ## Eagle 55 | ############# 56 | 57 | # Ignore the board and schematic backup files 58 | *.b#? 59 | *.s#? 60 | 61 | 62 | ################# 63 | ## Visual Studio 64 | ################# 65 | 66 | ## Ignore Visual Studio temporary files, build results, and 67 | ## files generated by popular Visual Studio add-ons. 68 | 69 | # User-specific files 70 | *.suo 71 | *.user 72 | *.sln.docstates 73 | 74 | # Build results 75 | [Dd]ebug/ 76 | [Rr]elease/ 77 | *_i.c 78 | *_p.c 79 | *.ilk 80 | *.meta 81 | *.obj 82 | *.pch 83 | *.pdb 84 | *.pgc 85 | *.pgd 86 | *.rsp 87 | *.sbr 88 | *.tlb 89 | *.tli 90 | *.tlh 91 | *.tmp 92 | *.vspscc 93 | .builds 94 | *.dotCover 95 | 96 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 97 | #packages/ 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opensdf 104 | *.sdf 105 | 106 | # Visual Studio profiler 107 | *.psess 108 | *.vsp 109 | 110 | # ReSharper is a .NET coding add-in 111 | _ReSharper* 112 | 113 | # Installshield output folder 114 | [Ee]xpress 115 | 116 | # DocProject is a documentation generator add-in 117 | DocProject/buildhelp/ 118 | DocProject/Help/*.HxT 119 | DocProject/Help/*.HxC 120 | DocProject/Help/*.hhc 121 | DocProject/Help/*.hhk 122 | DocProject/Help/*.hhp 123 | DocProject/Help/Html2 124 | DocProject/Help/html 125 | 126 | # Click-Once directory 127 | publish 128 | 129 | # Others 130 | [Bb]in 131 | [Oo]bj 132 | sql 133 | TestResults 134 | *.Cache 135 | ClientBin 136 | stylecop.* 137 | ~$* 138 | *.dbmdl 139 | Generated_Code #added for RIA/Silverlight projects 140 | 141 | # Backup & report files from converting an old project file to a newer 142 | # Visual Studio version. Backup files are not needed, because we have git ;-) 143 | _UpgradeReport_Files/ 144 | Backup*/ 145 | UpgradeLog*.XML 146 | 147 | 148 | ############ 149 | ## Windows 150 | ############ 151 | 152 | # Windows image file caches 153 | Thumbs.db 154 | 155 | # Folder config file 156 | Desktop.ini 157 | 158 | 159 | ############# 160 | ## Python 161 | ############# 162 | 163 | *.py[co] 164 | 165 | # Packages 166 | *.egg 167 | *.egg-info 168 | dist 169 | build 170 | eggs 171 | parts 172 | bin 173 | var 174 | sdist 175 | develop-eggs 176 | .installed.cfg 177 | 178 | # Installer logs 179 | pip-log.txt 180 | 181 | # Unit test / coverage reports 182 | .coverage 183 | .tox 184 | 185 | #Translations 186 | *.mo 187 | 188 | #Mr Developer 189 | .mr.developer.cfg 190 | 191 | # Mac crap 192 | .DS_Store 193 | -------------------------------------------------------------------------------- /Documentation/html/dynsections.js: -------------------------------------------------------------------------------- 1 | function toggleVisibility(linkObj) 2 | { 3 | var base = $(linkObj).attr('id'); 4 | var summary = $('#'+base+'-summary'); 5 | var content = $('#'+base+'-content'); 6 | var trigger = $('#'+base+'-trigger'); 7 | var src=$(trigger).attr('src'); 8 | if (content.is(':visible')===true) { 9 | content.hide(); 10 | summary.show(); 11 | $(linkObj).addClass('closed').removeClass('opened'); 12 | $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); 13 | } else { 14 | content.show(); 15 | summary.hide(); 16 | $(linkObj).removeClass('closed').addClass('opened'); 17 | $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); 18 | } 19 | return false; 20 | } 21 | 22 | function updateStripes() 23 | { 24 | $('table.directory tr'). 25 | removeClass('even').filter(':visible:even').addClass('even'); 26 | } 27 | function toggleLevel(level) 28 | { 29 | $('table.directory tr').each(function(){ 30 | var l = this.id.split('_').length-1; 31 | var i = $('#img'+this.id.substring(3)); 32 | var a = $('#arr'+this.id.substring(3)); 33 | if (l 21 | RedBotSensor left = RedBotSensor(A3); // initialize a left sensor object on A3 22 | RedBotSensor center = RedBotSensor(A6); // initialize a center sensor object on A6 23 | RedBotSensor right = RedBotSensor(A7); // initialize a right sensor object on A7 24 | 25 | // constants that are used in the code. LINETHRESHOLD is the level to detect 26 | // if the sensor is on the line or not. If the sensor value is greater than this 27 | // the sensor is above a DARK line. 28 | // 29 | // SPEED sets the nominal speed 30 | 31 | #define LINETHRESHOLD 800 32 | #define SPEED 60 // sets the nominal speed. Set to any number from 0 - 255. 33 | 34 | RedBotMotors motors; 35 | int leftSpeed; // variable used to store the leftMotor speed 36 | int rightSpeed; // variable used to store the rightMotor speed 37 | 38 | void setup() 39 | { 40 | Serial.begin(9600); 41 | Serial.println("Welcome to experiment 6.2 - Line Following"); 42 | Serial.println("------------------------------------------"); 43 | delay(2000); 44 | Serial.println("IR Sensor Readings: "); 45 | delay(500); 46 | } 47 | 48 | void loop() 49 | { 50 | Serial.print(left.read()); 51 | Serial.print("\t"); // tab character 52 | Serial.print(center.read()); 53 | Serial.print("\t"); // tab character 54 | Serial.print(right.read()); 55 | Serial.println(); 56 | 57 | // if on the line drive left and right at the same speed (left is CCW / right is CW) 58 | if(center.read() > LINETHRESHOLD) 59 | { 60 | leftSpeed = -SPEED; 61 | rightSpeed = SPEED; 62 | } 63 | 64 | // if the line is under the right sensor, adjust relative speeds to turn to the right 65 | else if(right.read() > LINETHRESHOLD) 66 | { 67 | leftSpeed = -(SPEED + 50); 68 | rightSpeed = SPEED - 50; 69 | } 70 | 71 | // if the line is under the left sensor, adjust relative speeds to turn to the left 72 | else if(left.read() > LINETHRESHOLD) 73 | { 74 | leftSpeed = -(SPEED - 50); 75 | rightSpeed = SPEED + 50; 76 | } 77 | 78 | // if all sensors are on black or up in the air, stop the motors. 79 | // otherwise, run motors given the control speeds above. 80 | if((left.read() > LINETHRESHOLD) && (center.read() > LINETHRESHOLD) && (right.read() > LINETHRESHOLD) ) 81 | { 82 | motors.stop(); 83 | } 84 | else 85 | { 86 | motors.leftMotor(leftSpeed); 87 | motors.rightMotor(rightSpeed); 88 | 89 | } 90 | delay(0); // add a delay to decrease sensitivity. 91 | } 92 | 93 | 94 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/RedBotBumper.cpp: -------------------------------------------------------------------------------- 1 | /**************************************************************** 2 | Main CPP for RedBot whisker bumper. 3 | 4 | This code is beerware; if you use it, please buy me (or any other 5 | SparkFun employee) a cold beverage next time you run into one of 6 | us at the local. 7 | 8 | 21 Jan 2014- Mike Hord, SparkFun Electronics 9 | 10 | Code developed in Arduino 1.0.5, on an SparkFun Redbot v12. 11 | ****************************************************************/ 12 | 13 | #include "RedBot.h" 14 | #include 15 | 16 | void (*whiskerAction[10])(void); // Pointer to an array of functions 17 | // describing what should happen if a 18 | // given pin has a whisker event. 19 | 20 | // Standard class constructor, assumes that you want to halt the motors on a 21 | // bump. A more skilled programmer than I could figure out the error message 22 | // I get if I try to use the brake() function that's a part of the RedBotMotor 23 | // class; I worked around it by making a globally available one. 24 | RedBotBumper::RedBotBumper(int pin) 25 | { 26 | // setPinChangeInterrupt(pin, WHISKER); 27 | pinMode(pin, INPUT_PULLUP); 28 | //setBumpFunction(pin, &brake); 29 | _pin = pin; // set local variable for the pin 30 | } 31 | 32 | // Bonus points constructor, which allows the user to connect a custom function 33 | // to a bumper. 34 | RedBotBumper::RedBotBumper(int pin, void(*functionPointer)(void)) 35 | { 36 | setPinChangeInterrupt(pin, WHISKER); 37 | pinMode(pin, INPUT_PULLUP); 38 | setBumpFunction(pin, functionPointer); 39 | _pin = pin; // set local variable for the pin 40 | } 41 | 42 | boolean RedBotBumper::read() 43 | { 44 | return(digitalRead(_pin)); 45 | } 46 | // Non-class function that puts the brakes on. This is the default behavior if 47 | // the user doesn't specify a custom function for the bumper trigger. 48 | void brake(void) 49 | { 50 | digitalWrite(L_CTRL_1, HIGH); 51 | digitalWrite(L_CTRL_2, HIGH); 52 | analogWrite(PWM_L, 0); 53 | digitalWrite(R_CTRL_1, HIGH); 54 | digitalWrite(R_CTRL_2, HIGH); 55 | analogWrite(PWM_R, 0); 56 | } 57 | 58 | // I elected to create a function just to do this, rather than trying to wrap 59 | // it into the setPinChangeInterrupt() function. When a bumper action occurs, 60 | // a function will be called. By default, it's to brake the motors; users can 61 | // write a function of their own and this function will point the interrupt 62 | // at that custom function instead. 63 | void RedBotBumper::setBumpFunction(int pin, void(*functionPointer)(void)) 64 | { 65 | switch(pin) 66 | { 67 | case A0: 68 | whiskerAction[PCINT_A0] = functionPointer; 69 | break; 70 | case A1: 71 | whiskerAction[PCINT_A1] = functionPointer; 72 | break; 73 | case A2: 74 | whiskerAction[PCINT_A2] = functionPointer; 75 | break; 76 | case A3: 77 | whiskerAction[PCINT_A3] = functionPointer; 78 | break; 79 | case A4: 80 | whiskerAction[PCINT_A4] = functionPointer; 81 | break; 82 | case A5: 83 | whiskerAction[PCINT_A5] = functionPointer; 84 | break; 85 | case 3: 86 | whiskerAction[PCINT_3] = functionPointer; 87 | break; 88 | case 9: 89 | whiskerAction[PCINT_9] = functionPointer; 90 | break; 91 | case 10: 92 | whiskerAction[PCINT_10] = functionPointer; 93 | break; 94 | case 11: 95 | whiskerAction[PCINT_11] = functionPointer; 96 | break; 97 | } 98 | } -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp8_2_WindUp/Exp8_2_WindUp.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp8_2_WindUp -- RedBot Experiment 8.2 3 | * 4 | * This is a fun demo of using the accelerometer to "wind up" the the redBot 5 | * As you tilt the Redbot forward, it should speed up. When you place it flat 6 | * it will race forward for 3 seconds and then stop. 7 | * 8 | * Hardware setup: 9 | * You'll need to attach the RedBot Accelerometer board to hader on the upper 10 | * right side of the mainboard. See the manual for details on how to do this. 11 | * 12 | * This sketch was written by SparkFun Electronics, with lots of help from 13 | * the Arduino community. This code is completely free for any use. 14 | * 15 | * 8 Oct 2013 M. Hord 16 | * Revised, 31 Oct 2014 B. Huang 17 | * 18 | * 8 Oct 2013 M. Hord 19 | * 20 | * This experiment was inspired by Paul Kassebaum at Mathworks, who made 21 | * one of the very first non-SparkFun demo projects and brought it to the 22 | * 2013 Open Hardware Summit in Boston. Thanks Paul! 23 | ***********************************************************************/ 24 | 25 | #include 26 | RedBotMotors motors; 27 | int motorPower; // variable for setting the drive power 28 | 29 | // The RedBot library includes support for the accelerometer. We've tried 30 | // to make using the accelerometer as easy as to use as possible. 31 | 32 | RedBotAccel accelerometer; 33 | 34 | void setup(void) 35 | { 36 | Serial.begin(9600); 37 | } 38 | 39 | void loop(void) 40 | { 41 | accelerometer.read(); // updates the x, y, and z axis readings on the accelerometer 42 | 43 | int xAccel = accelerometer.x; 44 | int yAccel = accelerometer.y; 45 | int zAccel = accelerometer.z; 46 | 47 | float XZ = accelerometer.angleXZ; // read in the XZ angle 48 | float YZ = accelerometer.angleYZ; // read in the YZ angle 49 | float XY = accelerometer.angleXY; // read in the XY angle 50 | 51 | Serial.print(XZ, 2); // prints out floating point number with 2 decimal places 52 | Serial.print("\t"); // tab 53 | Serial.println(motorPower); // prints out motorPower 54 | 55 | // if the angle is greater than 20 degrees 56 | if (XZ > 20) 57 | { 58 | // while the angle is greater than 20, speed up or down (match the speed to the angle) 59 | while(XZ > 15) // 5 degree buffer 60 | { 61 | motorPower = map(XZ, 0, 90, 0, 255); 62 | motors.drive(motorPower); // Adjust the motor power with the scaled 63 | // value from the accelerometer. 64 | accelerometer.read(); // Update the readings, so the while() loop 65 | XZ = accelerometer.angleXZ; // Update the variable for the XZ angle 66 | 67 | // debug print statements 68 | Serial.print(XZ, 2); // prints out XZ angle with 2 decimal places 69 | Serial.print("\t"); // tab 70 | Serial.println(motorPower); // prints out motorPower 71 | delay(200); // give you a chance to set the robot down 72 | } 73 | } 74 | // If our accelerometer reading is less than 1500, we just want to let 75 | // the motor run, but slow it down a little bit at a time. 76 | else 77 | { 78 | motors.drive(motorPower); 79 | delay(200); // We don't want to slow the motor too fast, so while 80 | // we're slowing the motor, let's put in a delay so we don't blow through loop() quite as fast. 81 | if (motorPower > 50) 82 | { 83 | motorPower = motorPower - 1; // reduce motorSpeed by 1 each time -- until it is less than 50, then just stop. 84 | } 85 | else 86 | { 87 | motorPower = 0; 88 | } 89 | } 90 | } 91 | 92 | 93 | -------------------------------------------------------------------------------- /Libraries/Arduino/src/RedBotSoftwareSerial.h: -------------------------------------------------------------------------------- 1 | /* 2 | SoftwareSerial.h (formerly NewSoftSerial.h) - 3 | Multi-instance software serial library for Arduino/Wiring 4 | -- Interrupt-driven receive and other improvements by ladyada 5 | (http://ladyada.net) 6 | -- Tuning, circular buffer, derivation from class Print/Stream, 7 | multi-instance support, porting to 8MHz processors, 8 | various optimizations, PROGMEM delay tables, inverse logic and 9 | direct port writing by Mikal Hart (http://www.arduiniana.org) 10 | -- Pin change interrupt macros by Paul Stoffregen (http://www.pjrc.com) 11 | -- 20MHz processor support by Garrett Mace (http://www.macetech.com) 12 | -- ATmega1280/2560 support by Brett Hagman (http://www.roguerobotics.com/) 13 | 14 | This library is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU Lesser General Public 16 | License as published by the Free Software Foundation; either 17 | version 2.1 of the License, or (at your option) any later version. 18 | 19 | This library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | Lesser General Public License for more details. 23 | 24 | You should have received a copy of the GNU Lesser General Public 25 | License along with this library; if not, write to the Free Software 26 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 27 | 28 | The latest version of this library can always be found at 29 | http://arduiniana.org. 30 | */ 31 | 32 | #ifndef SoftwareSerial_h 33 | #define SoftwareSerial_h 34 | 35 | #include 36 | #include 37 | 38 | /****************************************************************************** 39 | * Definitions 40 | ******************************************************************************/ 41 | 42 | #define _SS_MAX_RX_BUFF 64 // RX buffer size 43 | #ifndef GCC_VERSION 44 | #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) 45 | #endif 46 | 47 | class SoftwareSerial : public Stream 48 | { 49 | private: 50 | // per object data 51 | uint8_t _receivePin; 52 | uint8_t _receiveBitMask; 53 | volatile uint8_t *_receivePortRegister; 54 | uint8_t _transmitBitMask; 55 | volatile uint8_t *_transmitPortRegister; 56 | 57 | uint16_t _rx_delay_centering; 58 | uint16_t _rx_delay_intrabit; 59 | uint16_t _rx_delay_stopbit; 60 | uint16_t _tx_delay; 61 | 62 | uint16_t _buffer_overflow:1; 63 | uint16_t _inverse_logic:1; 64 | 65 | // static data 66 | static char _receive_buffer[_SS_MAX_RX_BUFF]; 67 | static volatile uint8_t _receive_buffer_tail; 68 | static volatile uint8_t _receive_buffer_head; 69 | static SoftwareSerial *active_object; 70 | 71 | // private methods 72 | void recv(); 73 | uint8_t rx_pin_read(); 74 | void tx_pin_write(uint8_t pin_state); 75 | void setTX(uint8_t transmitPin); 76 | void setRX(uint8_t receivePin); 77 | 78 | // private static method for timing 79 | static inline void tunedDelay(uint16_t delay); 80 | 81 | public: 82 | // public methods 83 | SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false); 84 | ~SoftwareSerial(); 85 | void begin(long speed); 86 | bool listen(); 87 | void end(); 88 | bool isListening() { return this == active_object; } 89 | bool overflow() { bool ret = _buffer_overflow; _buffer_overflow = false; return ret; } 90 | int peek(); 91 | 92 | virtual size_t write(uint8_t byte); 93 | virtual int read(); 94 | virtual int available(); 95 | virtual void flush(); 96 | 97 | using Print::write; 98 | 99 | // public only for easy access by interrupt handlers 100 | static inline void handle_interrupt(); 101 | }; 102 | 103 | // Arduino 0012 workaround 104 | #undef int 105 | #undef char 106 | #undef long 107 | #undef byte 108 | #undef float 109 | #undef abs 110 | #undef round 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /Documentation/latex/refman.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{book} 2 | 3 | % Packages required by doxygen 4 | \usepackage{calc} 5 | \usepackage{doxygen} 6 | \usepackage{graphicx} 7 | \usepackage[utf8]{inputenc} 8 | \usepackage{makeidx} 9 | \usepackage{multicol} 10 | \usepackage{multirow} 11 | \usepackage{textcomp} 12 | \usepackage[table]{xcolor} 13 | 14 | % Font selection 15 | \usepackage[T1]{fontenc} 16 | \usepackage{mathptmx} 17 | \usepackage[scaled=.90]{helvet} 18 | \usepackage{courier} 19 | \usepackage{amssymb} 20 | \usepackage{sectsty} 21 | \renewcommand{\familydefault}{\sfdefault} 22 | \allsectionsfont{% 23 | \fontseries{bc}\selectfont% 24 | \color{darkgray}% 25 | } 26 | \renewcommand{\DoxyLabelFont}{% 27 | \fontseries{bc}\selectfont% 28 | \color{darkgray}% 29 | } 30 | 31 | % Page & text layout 32 | \usepackage{geometry} 33 | \geometry{% 34 | a4paper,% 35 | top=2.5cm,% 36 | bottom=2.5cm,% 37 | left=2.5cm,% 38 | right=2.5cm% 39 | } 40 | \tolerance=750 41 | \hfuzz=15pt 42 | \hbadness=750 43 | \setlength{\emergencystretch}{15pt} 44 | \setlength{\parindent}{0cm} 45 | \setlength{\parskip}{0.2cm} 46 | \makeatletter 47 | \renewcommand{\paragraph}{% 48 | \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% 49 | \normalfont\normalsize\bfseries\SS@parafont% 50 | }% 51 | } 52 | \renewcommand{\subparagraph}{% 53 | \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% 54 | \normalfont\normalsize\bfseries\SS@subparafont% 55 | }% 56 | } 57 | \makeatother 58 | 59 | % Headers & footers 60 | \usepackage{fancyhdr} 61 | \pagestyle{fancyplain} 62 | \fancyhead[LE]{\fancyplain{}{\bfseries\thepage}} 63 | \fancyhead[CE]{\fancyplain{}{}} 64 | \fancyhead[RE]{\fancyplain{}{\bfseries\leftmark}} 65 | \fancyhead[LO]{\fancyplain{}{\bfseries\rightmark}} 66 | \fancyhead[CO]{\fancyplain{}{}} 67 | \fancyhead[RO]{\fancyplain{}{\bfseries\thepage}} 68 | \fancyfoot[LE]{\fancyplain{}{}} 69 | \fancyfoot[CE]{\fancyplain{}{}} 70 | \fancyfoot[RE]{\fancyplain{}{\bfseries\scriptsize Generated on Fri Jan 3 2014 23\-:40\-:23 for Red\-Bot by Doxygen }} 71 | \fancyfoot[LO]{\fancyplain{}{\bfseries\scriptsize Generated on Fri Jan 3 2014 23\-:40\-:23 for Red\-Bot by Doxygen }} 72 | \fancyfoot[CO]{\fancyplain{}{}} 73 | \fancyfoot[RO]{\fancyplain{}{}} 74 | \renewcommand{\footrulewidth}{0.4pt} 75 | \renewcommand{\chaptermark}[1]{% 76 | \markboth{#1}{}% 77 | } 78 | \renewcommand{\sectionmark}[1]{% 79 | \markright{\thesection\ #1}% 80 | } 81 | 82 | % Indices & bibliography 83 | \usepackage{natbib} 84 | \usepackage[titles]{tocloft} 85 | \setcounter{tocdepth}{3} 86 | \setcounter{secnumdepth}{5} 87 | \makeindex 88 | 89 | % Hyperlinks (required, but should be loaded last) 90 | \usepackage{ifpdf} 91 | \ifpdf 92 | \usepackage[pdftex,pagebackref=true]{hyperref} 93 | \else 94 | \usepackage[ps2pdf,pagebackref=true]{hyperref} 95 | \fi 96 | \hypersetup{% 97 | colorlinks=true,% 98 | linkcolor=blue,% 99 | citecolor=blue,% 100 | unicode% 101 | } 102 | 103 | % Custom commands 104 | \newcommand{\clearemptydoublepage}{% 105 | \newpage{\pagestyle{empty}\cleardoublepage}% 106 | } 107 | 108 | 109 | %===== C O N T E N T S ===== 110 | 111 | \begin{document} 112 | 113 | % Titlepage & ToC 114 | \hypersetup{pageanchor=false} 115 | \pagenumbering{roman} 116 | \begin{titlepage} 117 | \vspace*{7cm} 118 | \begin{center}% 119 | {\Large Red\-Bot }\\ 120 | \vspace*{1cm} 121 | {\large Generated by Doxygen 1.8.5}\\ 122 | \vspace*{0.5cm} 123 | {\small Fri Jan 3 2014 23:40:23}\\ 124 | \end{center} 125 | \end{titlepage} 126 | \clearemptydoublepage 127 | \tableofcontents 128 | \clearemptydoublepage 129 | \pagenumbering{arabic} 130 | \hypersetup{pageanchor=true} 131 | 132 | %--- Begin generated contents --- 133 | \chapter{Class Index} 134 | \input{annotated} 135 | \chapter{Class Documentation} 136 | \input{class_red_bot_accel} 137 | \input{class_red_bot_motor} 138 | \input{class_red_bot_sensor} 139 | %--- End generated contents --- 140 | 141 | % Index 142 | \newpage 143 | \phantomsection 144 | \addcontentsline{toc}{part}{Index} 145 | \printindex 146 | 147 | \end{document} 148 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp4_2_Music/Exp4_2_Music.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp04_2_Music -- RedBot Experiment 4.2 (Making Music) 3 | * 4 | * Rather than just making beeps and boops, what about playing an actual 5 | * song? This example includes a "header" file called notes.h that has all 6 | * the notes on any standard piano #defined to make composing sounds easier. 7 | * 8 | * Hardware setup: 9 | * Plug the included RedBot Buzzer board into the Servo header labeled 9. 10 | * 11 | * This sketch was written by SparkFun Electronics,with lots of help from 12 | * the Arduino community. This code is completely free for any use. 13 | * 14 | * 23 Sept 2013 N. Seidle/M. Hord 15 | * 29 Oct 2014 B. Huang 16 | * 17 | * Music from: 18 | * http://musicwithmstomomi.global2.vic.edu.au/2013/02/18/recorder-its-small-world-after-all/ 19 | ***********************************************************************/ 20 | 21 | #include "notes.h" // Individual "notes" have been #defined in the notes.h tab to make 22 | // playing sounds easier. noteC4, for example, is defined as 262, the 23 | // frequency for middle C. See the tab above? 24 | 25 | #include 26 | RedBotMotors motors; 27 | 28 | // Create a couple of constants for our pins. 29 | const int buzzerPin = 9; 30 | const int buttonPin = 12; 31 | 32 | void setup() 33 | { 34 | pinMode(buttonPin, INPUT_PULLUP); // configures the button as an INPUT 35 | // INPUT_PULLUP defaults it to HIGH. 36 | pinMode(buzzerPin, OUTPUT); // configures the buzzerPin as an OUTPUT 37 | } 38 | 39 | void loop() 40 | { 41 | if(digitalRead(buttonPin) == LOW) 42 | { 43 | playTwinkleTwinkle(); 44 | } 45 | } 46 | 47 | void playTwinkleTwinkle() 48 | { 49 | playNote(noteC4, QN); 50 | playNote(noteC4, QN); 51 | 52 | playNote(noteG4, QN); 53 | playNote(noteG4, QN); 54 | 55 | playNote(noteA4, QN); 56 | playNote(noteA4, QN); 57 | 58 | playNote(noteG4, HN); 59 | 60 | playNote(noteF4, QN); 61 | playNote(noteF4, QN); 62 | 63 | } 64 | 65 | void playSmallWorld() 66 | { 67 | // we use a custom function below called playNote([note],[duration]) 68 | // to play a note and delay a certain # of milliseconds. 69 | // 70 | // Both notes and durations are #defined in notes.h -- WN = whole note, 71 | // HN = half note, QN = quarter note, EN = eighth note, SN = sixteenth note. 72 | // 73 | playNote(noteG5, HN+QN); 74 | playNote(noteG5, QN); 75 | playNote(noteB5, HN); 76 | playNote(noteG5, HN); 77 | playNote(noteA5, HN+QN); 78 | playNote(noteA5, QN); 79 | playNote(noteA5, HN+QN); 80 | playNote(Rest, QN); 81 | playNote(noteA5, HN+QN); 82 | playNote(noteA5, QN); 83 | playNote(noteC6, HN); 84 | playNote(noteA5, HN); 85 | playNote(noteB5, HN+QN); 86 | playNote(noteB5, QN); 87 | playNote(noteB5, HN+QN); 88 | playNote(Rest, QN); 89 | playNote(noteB5, HN+QN); 90 | playNote(noteB5, QN); 91 | playNote(noteD6, HN); 92 | playNote(noteB5, HN); 93 | playNote(noteC6, HN+QN); 94 | playNote(noteC6, QN); 95 | playNote(noteC6, HN); 96 | playNote(noteB5, QN); 97 | playNote(noteA5, QN); 98 | playNote(noteD5, WN); 99 | playNote(noteFs5, WN); 100 | playNote(noteG5, WN); 101 | } 102 | 103 | void playNote(int note, int duration) 104 | // This custom function takes two parameters, note and duration to make playing songs easier. 105 | // Each of the notes have been #defined in the notes.h file. The notes are broken down by 106 | // octave and sharp (s) / flat (b). 107 | { 108 | tone(buzzerPin, note, duration); 109 | delay(duration); 110 | } 111 | 112 | /*********************************************************************** 113 | * Troubleshooting for experiment 4.1 114 | * My code won't upload! 115 | * - Make sure that your USB cable is plugged into the robot and the 116 | * computer you're using to write code. 117 | * - Make sure that the "Power" switch is switched to "ON". 118 | * - Double check that you have the right serial port selected under the 119 | * "Tools" menu. The easiest way to check is to see which item 120 | * disappears from the menu when you unplug the USB cable, and select 121 | * that one when you plug the board back in. 122 | * - Make sure the Serial Select switch at the top edge of the board is 123 | * switched to "XBEE SW SERIAL", even if you have an Xbee attached. 124 | * - Check that you have the right board selected under the "Tools" menu. 125 | * The RedBot is Uno-compatible, so select "Arduino Uno" from the list. 126 | * My motors aren't turning! 127 | * - This code demonstrates only the tone() commands; there's no code to 128 | * make the motors turn. 129 | ***********************************************************************/ 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp4_2_Music/notes.h: -------------------------------------------------------------------------------- 1 | /*************************************************************** 2 | * Frequencies for an entire piano keyboard. We pulled this info 3 | * from this website: 4 | * http://www.phy.mtu.edu/~suits/notefreqs.html 5 | * 6 | * Note names are organized by octave and sharp (s) or flat (b). 7 | * 8 | * Note: #define is a pre-compiler directive, so on the first pass 9 | * through your code, the compiler will replace anything that 10 | * has a #define statement associated with it with the appropriate 11 | * string or value. 12 | * 13 | * Notice that #define does not use an '=' or a ';' mark. 14 | * 15 | * It's convenient because it doesn't use up any processor resources 16 | * and the math is done by the compiling computer rather than on 17 | * the Arduino. 18 | * 19 | ***************************************************************/ 20 | #define beatLength 200 // # of milliseconds per beat 21 | 22 | // Define the length of each note 23 | #define WN beatLength*4 // ...a whole note... 24 | #define HN beatLength*2 // ...a half note... 25 | #define QN beatLength // ...a quarter note... 26 | #define EN beatLength/2 // ...an eighth note... 27 | #define SN beatLength/4 // ...and a sixteenth note. 28 | 29 | // These are pre-written #defines for every note on a piano 30 | #define Rest 0 31 | #define noteC0 16 32 | #define noteCs0 17 33 | #define noteDb0 17 34 | #define noteD0 18 35 | #define noteDs0 19 36 | #define noteEb0 19 37 | #define noteE0 21 38 | #define noteF0 22 39 | #define noteFs0 23 40 | #define noteGb0 23 41 | #define noteG0 25 42 | #define noteGs0 26 43 | #define noteAb0 26 44 | #define noteA0 28 45 | #define noteAs0 29 46 | #define noteBb0 29 47 | #define noteB0 31 48 | #define noteC1 33 49 | #define noteCs1 35 50 | #define noteDb1 35 51 | #define noteD1 37 52 | #define noteDs1 39 53 | #define noteEb1 39 54 | #define noteE1 41 55 | #define noteF1 44 56 | #define noteFs1 46 57 | #define noteGb1 46 58 | #define noteG1 49 59 | #define noteGs1 52 60 | #define noteAb1 52 61 | #define noteA1 55 62 | #define noteAs1 58 63 | #define noteBb1 58 64 | #define noteB1 62 65 | #define noteC2 65 66 | #define noteCs2 69 67 | #define noteDb2 69 68 | #define noteD2 73 69 | #define noteDs2 78 70 | #define noteEb2 78 71 | #define noteE2 82 72 | #define noteF2 87 73 | #define noteFs2 93 74 | #define noteGb2 93 75 | #define noteG2 98 76 | #define noteGs2 104 77 | #define noteAb2 104 78 | #define noteA2 110 79 | #define noteAs2 117 80 | #define noteBb2 117 81 | #define noteB2 123 82 | #define noteC3 131 83 | #define noteCs3 139 84 | #define noteDb3 139 85 | #define noteD3 147 86 | #define noteDs3 156 87 | #define noteEb3 156 88 | #define noteE3 165 89 | #define noteF3 175 90 | #define noteFs3 185 91 | #define noteGb3 185 92 | #define noteG3 196 93 | #define noteGs3 208 94 | #define noteAb3 208 95 | #define noteA3 220 96 | #define noteAs3 233 97 | #define noteBb3 233 98 | #define noteB3 247 99 | #define noteC4 262 100 | #define noteCs4 277 101 | #define noteDb4 277 102 | #define noteD4 294 103 | #define noteDs4 311 104 | #define noteEb4 311 105 | #define noteE4 330 106 | #define noteF4 349 107 | #define noteFs4 370 108 | #define noteGb4 370 109 | #define noteG4 392 110 | #define noteGs4 415 111 | #define noteAb4 415 112 | #define noteA4 440 113 | #define noteAs4 466 114 | #define noteBb4 466 115 | #define noteB4 494 116 | #define noteC5 523 117 | #define noteCs5 554 118 | #define noteDb5 554 119 | #define noteD5 587 120 | #define noteDs5 622 121 | #define noteEb5 622 122 | #define noteE5 659 123 | #define noteF5 698 124 | #define noteFs5 740 125 | #define noteGb5 740 126 | #define noteG5 784 127 | #define noteGs5 831 128 | #define noteAb5 831 129 | #define noteA5 880 130 | #define noteAs5 932 131 | #define noteBb5 932 132 | #define noteB5 988 133 | #define noteC6 1047 134 | #define noteCs6 1109 135 | #define noteDb6 1109 136 | #define noteD6 1175 137 | #define noteDs6 1245 138 | #define noteEb6 1245 139 | #define noteE6 1319 140 | #define noteF6 1397 141 | #define noteFs6 1480 142 | #define noteGb6 1480 143 | #define noteG6 1568 144 | #define noteGs6 1661 145 | #define noteAb6 1661 146 | #define noteA6 1760 147 | #define noteAs6 1865 148 | #define noteBb6 1865 149 | #define noteB6 1976 150 | #define noteC7 2093 151 | #define noteCs7 2217 152 | #define noteDb7 2217 153 | #define noteD7 2349 154 | #define noteDs7 2489 155 | #define noteEb7 2489 156 | #define noteE7 2637 157 | #define noteF7 2794 158 | #define noteFs7 2960 159 | #define noteGb7 2960 160 | #define noteG7 3136 161 | #define noteGs7 3322 162 | #define noteAb7 3322 163 | #define noteA7 3520 164 | #define noteAs7 3729 165 | #define noteBb7 3729 166 | #define noteB7 3951 167 | #define noteC8 4186 168 | #define noteCs8 4435 169 | #define noteDb8 4435 170 | #define noteD8 4699 171 | #define noteDs8 4978 172 | #define noteEb8 4978 173 | 174 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /Libraries/Arduino/examples/Exp7_3_DriveStraightDistance/Exp7_3_DriveStraightDistance.ino: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Exp7_3_DriveStraight -- RedBot Experiment 7.3 3 | * 4 | * Knowing where your robot is can be very important. The RedBot supports 5 | * the use of an encoder to track the number of revolutions each wheels has 6 | * made, so you can tell not only how far each wheel has traveled but how 7 | * fast the wheels are turning. 8 | * 9 | * This sketch was written by SparkFun Electronics, with lots of help from 10 | * the Arduino community. This code is completely free for any use. 11 | * 12 | * 8 Oct 2013 M. Hord 13 | * Revised, 31 Oct 2014 B. Huang 14 | ***********************************************************************/ 15 | #include 16 | RedBotMotors motors; 17 | 18 | RedBotEncoder encoder = RedBotEncoder(A2, 10); 19 | int buttonPin = 12; 20 | int countsPerRev = 192; // 4 pairs of N-S x 48:1 gearbox = 192 ticks per wheel rev 21 | 22 | float wheelDiam = 2.56; // diam = 65mm / 25.4 mm/in 23 | float wheelCirc = PI*wheelDiam; // Redbot wheel circumference = pi*D 24 | 25 | void setup() 26 | { 27 | pinMode(buttonPin, INPUT_PULLUP); 28 | Serial.begin(9600); 29 | } 30 | 31 | void loop(void) 32 | { 33 | // set the power for left & right motors on button press 34 | if (digitalRead(buttonPin) == LOW) 35 | { 36 | driveStraight(12, 150); 37 | } 38 | } 39 | 40 | void driveStraight(float distance, int motorPower) 41 | { 42 | long lCount = 0; 43 | long rCount = 0; 44 | long targetCount; 45 | float numRev; 46 | 47 | // variables for tracking the left and right encoder counts 48 | long prevlCount, prevrCount; 49 | 50 | long lDiff, rDiff; // diff between current encoder count and previous count 51 | 52 | // variables for setting left and right motor power 53 | int leftPower = motorPower; 54 | int rightPower = motorPower; 55 | 56 | // variable used to offset motor power on right vs left to keep straight. 57 | int offset = 5; // offset amount to compensate Right vs. Left drive 58 | 59 | numRev = distance / wheelCirc; // calculate the target # of rotations 60 | targetCount = numRev * countsPerRev; // calculate the target count 61 | 62 | // debug 63 | Serial.print("driveStraight() "); 64 | Serial.print(distance); 65 | Serial.print(" inches at "); 66 | Serial.print(motorPower); 67 | Serial.println(" power."); 68 | 69 | Serial.print("Target: "); 70 | Serial.print(numRev, 3); 71 | Serial.println(" revolutions."); 72 | Serial.println(); 73 | 74 | // print out header 75 | Serial.print("Left\t"); // "Left" and tab 76 | Serial.print("Right\t"); // "Right" and tab 77 | Serial.println("Target count"); 78 | Serial.println("============================"); 79 | 80 | encoder.clearEnc(BOTH); // clear the encoder count 81 | delay(100); // short delay before starting the motors. 82 | 83 | motors.drive(motorPower); // start motors 84 | 85 | while (rCount < targetCount) 86 | { 87 | // while the right encoder is less than the target count -- debug print 88 | // the encoder values and wait -- this is a holding loop. 89 | lCount = encoder.getTicks(LEFT); 90 | rCount = encoder.getTicks(RIGHT); 91 | Serial.print(lCount); 92 | Serial.print("\t"); 93 | Serial.print(rCount); 94 | Serial.print("\t"); 95 | Serial.println(targetCount); 96 | 97 | motors.leftDrive(leftPower); 98 | motors.rightDrive(rightPower); 99 | 100 | // calculate the rotation "speed" as a difference in the count from previous cycle. 101 | lDiff = (lCount - prevlCount); 102 | rDiff = (rCount - prevrCount); 103 | 104 | // store the current count as the "previous" count for the next cycle. 105 | prevlCount = lCount; 106 | prevrCount = rCount; 107 | 108 | // if left is faster than the right, slow down the left / speed up right 109 | if (lDiff > rDiff) 110 | { 111 | leftPower = leftPower - offset; 112 | rightPower = rightPower + offset; 113 | } 114 | // if right is faster than the left, speed up the left / slow down right 115 | else if (lDiff < rDiff) 116 | { 117 | leftPower = leftPower + offset; 118 | rightPower = rightPower - offset; 119 | } 120 | delay(50); // short delay to give motors a chance to respond. 121 | } 122 | // now apply "brakes" to stop the motors. 123 | motors.brake(); 124 | } -------------------------------------------------------------------------------- /Documentation/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Main Page 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 |
69 |
70 | 75 |
77 |
78 |
79 | 82 |
83 | 84 | 89 | 90 | 91 |
92 | 95 |
96 | 97 |
98 |
99 |
RedBot Documentation
100 |
101 |
102 |
103 |
104 | 105 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /Documentation/latex/class_red_bot_sensor.tex: -------------------------------------------------------------------------------- 1 | \hypertarget{class_red_bot_sensor}{\section{Red\-Bot\-Sensor Class Reference} 2 | \label{class_red_bot_sensor}\index{Red\-Bot\-Sensor@{Red\-Bot\-Sensor}} 3 | } 4 | 5 | 6 | {\ttfamily \#include $<$Red\-Bot.\-h$>$} 7 | 8 | \subsection*{Public Member Functions} 9 | \begin{DoxyCompactItemize} 10 | \item 11 | \hyperlink{class_red_bot_sensor_a2ebbbab14a59c03dde759f693c59ce26}{Red\-Bot\-Sensor} (int pin) 12 | \item 13 | int \hyperlink{class_red_bot_sensor_abd97ded86ad9de7e28ad0295a51d5c20}{read} () 14 | \item 15 | boolean \hyperlink{class_red_bot_sensor_a585a98bb820d20917bb71dfc004cc310}{check} () 16 | \item 17 | int \hyperlink{class_red_bot_sensor_aa3e2c32c59f8ac1f9866069602a16eba}{set\-B\-G\-Level} () 18 | \item 19 | int \hyperlink{class_red_bot_sensor_a9bbf93b3c4282562e14f605a07f47c64}{set\-Detect\-Level} () 20 | \end{DoxyCompactItemize} 21 | 22 | 23 | \subsection{Detailed Description} 24 | A class for controlling the Red\-Bot's sensors. 25 | 26 | A single object of the class \hyperlink{class_red_bot_sensor}{Red\-Bot\-Sensor} is needed for each sensor that you want to use on the Red\-Bot. 27 | 28 | \subsection{Constructor \& Destructor Documentation} 29 | \hypertarget{class_red_bot_sensor_a2ebbbab14a59c03dde759f693c59ce26}{\index{Red\-Bot\-Sensor@{Red\-Bot\-Sensor}!Red\-Bot\-Sensor@{Red\-Bot\-Sensor}} 30 | \index{Red\-Bot\-Sensor@{Red\-Bot\-Sensor}!RedBotSensor@{Red\-Bot\-Sensor}} 31 | \subsubsection[{Red\-Bot\-Sensor}]{\setlength{\rightskip}{0pt plus 5cm}Red\-Bot\-Sensor\-::\-Red\-Bot\-Sensor ( 32 | \begin{DoxyParamCaption} 33 | \item[{int}]{pin} 34 | \end{DoxyParamCaption} 35 | )}}\label{class_red_bot_sensor_a2ebbbab14a59c03dde759f693c59ce26} 36 | Create a new object of the \hyperlink{class_red_bot_sensor}{Red\-Bot\-Sensor} class. 37 | 38 | {\itshape pin} is the analog input pin that the sensor is connected to. 39 | 40 | Usage Example\-: 41 | 42 | \#include $<$\hyperlink{_red_bot_8h_source}{Red\-Bot.\-h}$>$ 43 | 44 | \hyperlink{class_red_bot_sensor}{Red\-Bot\-Sensor} sensor = \hyperlink{class_red_bot_sensor}{Red\-Bot\-Sensor} (A2); 45 | 46 | \subsection{Member Function Documentation} 47 | \hypertarget{class_red_bot_sensor_a585a98bb820d20917bb71dfc004cc310}{\index{Red\-Bot\-Sensor@{Red\-Bot\-Sensor}!check@{check}} 48 | \index{check@{check}!RedBotSensor@{Red\-Bot\-Sensor}} 49 | \subsubsection[{check}]{\setlength{\rightskip}{0pt plus 5cm}boolean Red\-Bot\-Sensor\-::check ( 50 | \begin{DoxyParamCaption} 51 | {} 52 | \end{DoxyParamCaption} 53 | )}}\label{class_red_bot_sensor_a585a98bb820d20917bb71dfc004cc310} 54 | Determines if the current sensor reading is within the configured levels. 55 | 56 | This method returns {\itshape true} if the sensor's current analog value is within the configured levels. If the sensor's current analog value is outside the configured levels, \hyperlink{class_red_bot_sensor_a585a98bb820d20917bb71dfc004cc310}{Red\-Bot\-Sensor\-::check()} returns {\itshape false}. \hypertarget{class_red_bot_sensor_abd97ded86ad9de7e28ad0295a51d5c20}{\index{Red\-Bot\-Sensor@{Red\-Bot\-Sensor}!read@{read}} 57 | \index{read@{read}!RedBotSensor@{Red\-Bot\-Sensor}} 58 | \subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}int Red\-Bot\-Sensor\-::read ( 59 | \begin{DoxyParamCaption} 60 | {} 61 | \end{DoxyParamCaption} 62 | )}}\label{class_red_bot_sensor_abd97ded86ad9de7e28ad0295a51d5c20} 63 | Read the analog level of the sensor. 64 | 65 | This method is primarily used when you want to do your own data processing instead of relying on the library's edge detection. \hypertarget{class_red_bot_sensor_aa3e2c32c59f8ac1f9866069602a16eba}{\index{Red\-Bot\-Sensor@{Red\-Bot\-Sensor}!set\-B\-G\-Level@{set\-B\-G\-Level}} 66 | \index{set\-B\-G\-Level@{set\-B\-G\-Level}!RedBotSensor@{Red\-Bot\-Sensor}} 67 | \subsubsection[{set\-B\-G\-Level}]{\setlength{\rightskip}{0pt plus 5cm}int Red\-Bot\-Sensor\-::set\-B\-G\-Level ( 68 | \begin{DoxyParamCaption} 69 | {} 70 | \end{DoxyParamCaption} 71 | )}}\label{class_red_bot_sensor_aa3e2c32c59f8ac1f9866069602a16eba} 72 | Set the background/default sensor reading level. 73 | 74 | Calling this method sets the sensor's reading level that corresponds to an uninteresting sensor reading. For example, if you are trying to follow a black line on a white background, you would call Red\-Bot\-Sensor\-::set\-B\-P\-Level() when the light sensor is over the white background. \hypertarget{class_red_bot_sensor_a9bbf93b3c4282562e14f605a07f47c64}{\index{Red\-Bot\-Sensor@{Red\-Bot\-Sensor}!set\-Detect\-Level@{set\-Detect\-Level}} 75 | \index{set\-Detect\-Level@{set\-Detect\-Level}!RedBotSensor@{Red\-Bot\-Sensor}} 76 | \subsubsection[{set\-Detect\-Level}]{\setlength{\rightskip}{0pt plus 5cm}int Red\-Bot\-Sensor\-::set\-Detect\-Level ( 77 | \begin{DoxyParamCaption} 78 | {} 79 | \end{DoxyParamCaption} 80 | )}}\label{class_red_bot_sensor_a9bbf93b3c4282562e14f605a07f47c64} 81 | Set the forground/active sensor reading level. 82 | 83 | Calling this method sets the sensor's reading level that corresponds to an interesting sensor reading. For example, if you are trying to follow a black line on a white background, you would call \hyperlink{class_red_bot_sensor_a9bbf93b3c4282562e14f605a07f47c64}{Red\-Bot\-Sensor\-::set\-Detect\-Level()} when the light sensor is over the black background. 84 | 85 | The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize} 86 | \item 87 | Arduino/\-Red\-Bot/Red\-Bot.\-h\item 88 | Arduino/\-Red\-Bot/Red\-Bot\-Sensor.\-cpp\end{DoxyCompactItemize} 89 | -------------------------------------------------------------------------------- /Documentation/html/search/search.css: -------------------------------------------------------------------------------- 1 | /*---------------- Search Box */ 2 | 3 | #FSearchBox { 4 | float: left; 5 | } 6 | 7 | #MSearchBox { 8 | white-space : nowrap; 9 | position: absolute; 10 | float: none; 11 | display: inline; 12 | margin-top: 8px; 13 | right: 0px; 14 | width: 170px; 15 | z-index: 102; 16 | background-color: white; 17 | } 18 | 19 | #MSearchBox .left 20 | { 21 | display:block; 22 | position:absolute; 23 | left:10px; 24 | width:20px; 25 | height:19px; 26 | background:url('search_l.png') no-repeat; 27 | background-position:right; 28 | } 29 | 30 | #MSearchSelect { 31 | display:block; 32 | position:absolute; 33 | width:20px; 34 | height:19px; 35 | } 36 | 37 | .left #MSearchSelect { 38 | left:4px; 39 | } 40 | 41 | .right #MSearchSelect { 42 | right:5px; 43 | } 44 | 45 | #MSearchField { 46 | display:block; 47 | position:absolute; 48 | height:19px; 49 | background:url('search_m.png') repeat-x; 50 | border:none; 51 | width:111px; 52 | margin-left:20px; 53 | padding-left:4px; 54 | color: #909090; 55 | outline: none; 56 | font: 9pt Arial, Verdana, sans-serif; 57 | } 58 | 59 | #FSearchBox #MSearchField { 60 | margin-left:15px; 61 | } 62 | 63 | #MSearchBox .right { 64 | display:block; 65 | position:absolute; 66 | right:10px; 67 | top:0px; 68 | width:20px; 69 | height:19px; 70 | background:url('search_r.png') no-repeat; 71 | background-position:left; 72 | } 73 | 74 | #MSearchClose { 75 | display: none; 76 | position: absolute; 77 | top: 4px; 78 | background : none; 79 | border: none; 80 | margin: 0px 4px 0px 0px; 81 | padding: 0px 0px; 82 | outline: none; 83 | } 84 | 85 | .left #MSearchClose { 86 | left: 6px; 87 | } 88 | 89 | .right #MSearchClose { 90 | right: 2px; 91 | } 92 | 93 | .MSearchBoxActive #MSearchField { 94 | color: #000000; 95 | } 96 | 97 | /*---------------- Search filter selection */ 98 | 99 | #MSearchSelectWindow { 100 | display: none; 101 | position: absolute; 102 | left: 0; top: 0; 103 | border: 1px solid #90A5CE; 104 | background-color: #F9FAFC; 105 | z-index: 1; 106 | padding-top: 4px; 107 | padding-bottom: 4px; 108 | -moz-border-radius: 4px; 109 | -webkit-border-top-left-radius: 4px; 110 | -webkit-border-top-right-radius: 4px; 111 | -webkit-border-bottom-left-radius: 4px; 112 | -webkit-border-bottom-right-radius: 4px; 113 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); 114 | } 115 | 116 | .SelectItem { 117 | font: 8pt Arial, Verdana, sans-serif; 118 | padding-left: 2px; 119 | padding-right: 12px; 120 | border: 0px; 121 | } 122 | 123 | span.SelectionMark { 124 | margin-right: 4px; 125 | font-family: monospace; 126 | outline-style: none; 127 | text-decoration: none; 128 | } 129 | 130 | a.SelectItem { 131 | display: block; 132 | outline-style: none; 133 | color: #000000; 134 | text-decoration: none; 135 | padding-left: 6px; 136 | padding-right: 12px; 137 | } 138 | 139 | a.SelectItem:focus, 140 | a.SelectItem:active { 141 | color: #000000; 142 | outline-style: none; 143 | text-decoration: none; 144 | } 145 | 146 | a.SelectItem:hover { 147 | color: #FFFFFF; 148 | background-color: #3D578C; 149 | outline-style: none; 150 | text-decoration: none; 151 | cursor: pointer; 152 | display: block; 153 | } 154 | 155 | /*---------------- Search results window */ 156 | 157 | iframe#MSearchResults { 158 | width: 60ex; 159 | height: 15em; 160 | } 161 | 162 | #MSearchResultsWindow { 163 | display: none; 164 | position: absolute; 165 | left: 0; top: 0; 166 | border: 1px solid #000; 167 | background-color: #EEF1F7; 168 | } 169 | 170 | /* ----------------------------------- */ 171 | 172 | 173 | #SRIndex { 174 | clear:both; 175 | padding-bottom: 15px; 176 | } 177 | 178 | .SREntry { 179 | font-size: 10pt; 180 | padding-left: 1ex; 181 | } 182 | 183 | .SRPage .SREntry { 184 | font-size: 8pt; 185 | padding: 1px 5px; 186 | } 187 | 188 | body.SRPage { 189 | margin: 5px 2px; 190 | } 191 | 192 | .SRChildren { 193 | padding-left: 3ex; padding-bottom: .5em 194 | } 195 | 196 | .SRPage .SRChildren { 197 | display: none; 198 | } 199 | 200 | .SRSymbol { 201 | font-weight: bold; 202 | color: #425E97; 203 | font-family: Arial, Verdana, sans-serif; 204 | text-decoration: none; 205 | outline: none; 206 | } 207 | 208 | a.SRScope { 209 | display: block; 210 | color: #425E97; 211 | font-family: Arial, Verdana, sans-serif; 212 | text-decoration: none; 213 | outline: none; 214 | } 215 | 216 | a.SRSymbol:focus, a.SRSymbol:active, 217 | a.SRScope:focus, a.SRScope:active { 218 | text-decoration: underline; 219 | } 220 | 221 | span.SRScope { 222 | padding-left: 4px; 223 | } 224 | 225 | .SRPage .SRStatus { 226 | padding: 2px 5px; 227 | font-size: 8pt; 228 | font-style: italic; 229 | } 230 | 231 | .SRResult { 232 | display: none; 233 | } 234 | 235 | DIV.searchresults { 236 | margin-left: 10px; 237 | margin-right: 10px; 238 | } 239 | 240 | /*---------------- External search page results */ 241 | 242 | .searchresult { 243 | background-color: #F0F3F8; 244 | } 245 | 246 | .pages b { 247 | color: white; 248 | padding: 5px 5px 3px 5px; 249 | background-image: url("../tab_a.png"); 250 | background-repeat: repeat-x; 251 | text-shadow: 0 1px 1px #000000; 252 | } 253 | 254 | .pages { 255 | line-height: 17px; 256 | margin-left: 4px; 257 | text-decoration: none; 258 | } 259 | 260 | .hl { 261 | font-weight: bold; 262 | } 263 | 264 | #searchresults { 265 | margin-bottom: 20px; 266 | } 267 | 268 | .searchpages { 269 | margin-top: 10px; 270 | } 271 | 272 | -------------------------------------------------------------------------------- /Documentation/html/dir_a991eec27578c865874ede3d8ec657c2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Arduino Directory Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 |
69 |
70 | 75 |
77 |
78 |
79 | 82 |
83 | 84 | 89 | 90 | 91 |
92 | 95 |
96 | 97 |
98 |
99 |
Arduino Directory Reference
100 |
101 |
102 | 103 | 105 | 106 | 107 |

104 | Directories

directory  RedBot
 
108 |
109 |
110 | 111 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /Documentation/html/functions_vars.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Class Members - Variables 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 | 75 | 82 |
83 |
84 | 89 |
91 |
92 |
93 | 96 |
97 | 98 | 103 | 104 | 105 |
106 | 109 |
110 | 111 |
112 |   123 |
124 |
125 | 126 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /Documentation/html/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Class Index 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 | 75 |
76 |
77 | 82 |
84 |
85 |
86 | 89 |
90 | 91 | 96 | 97 | 98 |
99 | 102 |
103 | 104 |
105 |
106 |
Class Index
107 |
108 |
109 | 110 | 111 | 113 | 114 | 115 | 116 |
  R  
112 |
RedBotMotor   RedBotSensor   
RedBotAccel   
117 | 118 |
119 |
120 | 121 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /Documentation/html/annotated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Class List 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 | 75 |
76 |
77 | 82 |
84 |
85 |
86 | 89 |
90 | 91 | 96 | 97 | 98 |
99 | 102 |
103 | 104 |
105 |
106 |
Class List
107 |
108 |
109 |
Here are the classes, structs, unions and interfaces with brief descriptions:
110 | 111 | 112 | 113 | 114 |
oCRedBotAccel
oCRedBotMotor
\CRedBotSensor
115 |
116 |
117 |
118 | 119 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /Documentation/html/files.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: File List 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 | 73 |
74 |
75 | 80 |
82 |
83 |
84 | 87 |
88 | 89 | 94 | 95 | 96 |
97 | 100 |
101 | 102 |
103 |
104 |
File List
105 |
106 |
107 |
Here is a list of all documented files with brief descriptions:
108 |
[detail level 123]
109 | 110 | 111 | 112 |
\-Arduino
 \-RedBot
  \*RedBot.h
113 |
114 |
115 |
116 | 117 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /Documentation/html/dir_5caca0cdf36469e9d889ba659d3b7318.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Arduino/RedBot Directory Reference 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 |
69 |
70 | 75 |
77 |
78 |
79 | 82 |
83 | 84 | 89 | 90 | 91 |
92 | 95 |
96 | 97 |
98 |
99 |
RedBot Directory Reference
100 |
101 |
102 | 103 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 |

104 | Files

file  RedBot.cpp
 
file  RedBot.h [code]
 
file  RedBotAccel.cpp
 
file  RedBotMotor.cpp
 
file  RedBotSensor.cpp
 
116 |
117 |
118 | 119 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /Documentation/html/class_red_bot_sensor-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Member List 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 | 75 |
76 |
77 | 82 |
84 |
85 |
86 | 89 |
90 | 91 | 96 | 97 | 98 |
99 | 102 |
103 | 104 |
105 |
106 |
RedBotSensor Member List
107 |
108 |
109 | 110 |

This is the complete list of members for RedBotSensor, including all inherited members.

111 | 112 | 113 | 114 | 115 | 116 | 117 |
check()RedBotSensor
read()RedBotSensor
RedBotSensor(int pin)RedBotSensor
setBGLevel()RedBotSensor
setDetectLevel()RedBotSensor
118 |
119 | 120 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /Documentation/html/class_red_bot_accel-members.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RedBot: Member List 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 | 36 | 37 | 38 |
32 |
RedBot 33 |
34 |
RedBot Arduino Library for the Sparkfun RedBot
35 |
39 |
40 | 41 | 42 | 45 | 68 | 75 |
76 |
77 | 82 |
84 |
85 |
86 | 89 |
90 | 91 | 96 | 97 | 98 |
99 | 102 |
103 | 104 |
105 |
106 |
RedBotAccel Member List
107 |
108 |
109 | 110 |

This is the complete list of members for RedBotAccel, including all inherited members.

111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
checkBump()RedBotAccel
enableBump()RedBotAccel
read()RedBotAccel
RedBotAccel()RedBotAccel
setBumpThresh(int xThresh)RedBotAccel
xRedBotAccel
yRedBotAccel
zRedBotAccel
121 |
122 | 123 | 130 | 131 | 132 | --------------------------------------------------------------------------------