Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550

Deprecated: (6.186) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/course/6/6.186/web_scripts/2013/w/includes/Sanitizer.php on line 1550
Code Documentation - Maslab 2013

Code Documentation

From Maslab 2013
(Difference between revisions)
Jump to: navigation, search
 
(Staff Code Documentation)
 
(10 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
*OpenCV (installing this can be a bit challenging, ask staff if you need help)
 
*OpenCV (installing this can be a bit challenging, ask staff if you need help)
 
*pyusb (gives usb-core, which is used to repeatably identify the Arduino in the Arduino interface code)
 
*pyusb (gives usb-core, which is used to repeatably identify the Arduino in the Arduino interface code)
*If you want to modify the code loaded on the Arduino (for gyro, accelerometer integration, for instance):
+
*If you want to modify the code loaded on the Arduino (for gyro, accelerometer integration, for instance) the Arduino IDE is at http://www.arduino.cc/en/Main/software (the eeePCs are using IDE 1.0)
:the Arduino IDE: http://www.arduino.cc/en/Main/software (the eeePCs are using IDE 0022)
+
:Qik Arduino library: http://code.google.com/p/qik2s9v1arduino/
+
  
===Documentation===
+
===Staff Code Documentation===
*OpenCV:
+
'''Git:'''
:http://opencv.willowgarage.com/documentation/python/index.html
+
  
*[[arduino_code | Arduino code (loaded on the Arduino)]]
+
Our repository uses Git, and we recommend you use Git as your version control as well. See [[Git Documentation]] for more information on setting up Git.
  
*[[arduino_interface | arduino.py]]
+
 
:Used for interfacing with the Arduino
+
'''What do we give you?'''
 +
 
 +
The staff repository contains three things:
 +
* Arduino firmware -- You shouldn't need to modify this code unless you have a really special setup. To load firmware onto your Arduino:
 +
** Open it in the Arduino IDE
 +
** Go to File > Preferences
 +
** Set the sketchbook location to <staff repo>/arduino_firmware/sketchbook (this makes sure the Arduino IDE can find all the libraries)
 +
** Click Upload
 +
* Python interface library -- Use classes in this library to interact with the Arduino. '''Go to [[Code_Documentation/Interface_Library]] to read more about this.'''
 +
* Lots of examples. Look in the examples folder for lots of examples on how to use the Python interface library.
 +
 
 +
===External Library Documentation===
 +
* Vision
 +
** OpenCV (http://opencv.willowgarage.com/wiki/) - An open source library for computer vision. Available for a number of languages.
 +
** SimpleCV (http://simplecv.org/) - A high-level wrapper around OpenCV for Python. This could be useful if doing simple image processing. One particularly interesting example is detection of a yellow car: http://simplecv.org/learn/examples/parking.html.
 +
* State Machines (it's reasonable to write your own state machine code)
 +
** Fysom (https://github.com/oxplot/fysom) - A slick FSM implementation that provides function callbacks for each state. (NOTE: Hasn't been looked over, since Github is down at the time of this writing)
 +
** Skip Montanero's FSM (http://www.smontanaro.net/python/fsm.py) - A simple FSM implementation.
 +
** Python-Course (http://www.python-course.eu/finite_state_machine.php) - FSM tutorial, including code for a general FSM implementation
 +
* Arduino
 +
** General Arduino info (http://arduino.cc)
 +
** pySerial (http://pyserial.sourceforge.net/) - If you want to roll your own Arduino communication library, you can simply use pySerial to read/write data from the serial connection. You can find an example on the Arduino site: http://playground.arduino.cc/Interfacing/Python.

Latest revision as of 17:40, 16 January 2013

What you might want on your computer

  • OpenCV (installing this can be a bit challenging, ask staff if you need help)
  • pyusb (gives usb-core, which is used to repeatably identify the Arduino in the Arduino interface code)
  • If you want to modify the code loaded on the Arduino (for gyro, accelerometer integration, for instance) the Arduino IDE is at http://www.arduino.cc/en/Main/software (the eeePCs are using IDE 1.0)

Staff Code Documentation

Git:

Our repository uses Git, and we recommend you use Git as your version control as well. See Git Documentation for more information on setting up Git.


What do we give you?

The staff repository contains three things:

  • Arduino firmware -- You shouldn't need to modify this code unless you have a really special setup. To load firmware onto your Arduino:
    • Open it in the Arduino IDE
    • Go to File > Preferences
    • Set the sketchbook location to <staff repo>/arduino_firmware/sketchbook (this makes sure the Arduino IDE can find all the libraries)
    • Click Upload
  • Python interface library -- Use classes in this library to interact with the Arduino. Go to Code_Documentation/Interface_Library to read more about this.
  • Lots of examples. Look in the examples folder for lots of examples on how to use the Python interface library.

External Library Documentation