Skip to content

Repository files navigation

Create2API

A python library for controlling the iRobot Create 2

Simple

Create2API is made to give simple access to basic, often used functions on the iRobot Create 2. It keeps all the important info about your Create 2 in an easy to access JSON file.

Safe

Create2API has a lot of checks in place to make sure you don't send a bad command to your robot. If something won't work, Create2API will let you know!

Easy to use

Create2API is meant to be interacted with through a single class: "Create2". Interacting with your bot is a breeze

Important Note:

The Serial-USB port is currently hardcoded. Contributions for automatically finding the port are welcome.

importcreate2apiimporttime#Create a Create2. This will automatically try to connect to your#	robot over serialbot=create2api.Create2()
#Start the Create2bot.start()
#Put the Create2 into 'safe' mode so we can drive itbot.safe()
#Tell the Create2 to drive straight forward at a speed of 100 mm/sbot.drive_straight(100)
#Wait for 5 secondstime.sleep(5)
#Tell the Create2 to drive straight backward at a speed of 100 mm/sbot.drive_straight(-100)
#Wait for 5 secondstime.sleep(5)
#Stop the botbot.drive_straight(0)
#Close the connectionbot.destroy()

Implemented OI codes

  • Start
  • Reset
  • Stop
  • Baud
  • Safe
  • Full
  • Clean
  • Max
  • Spot
  • Seek Dock
  • Power (Off)
  • Set Day/Time
  • Drive
  • Motors PWM
  • Digit LED ASCII
  • Sensors

Unimplemented OI codes

  • Schedule
  • Drive Direct
  • Drive PWM
  • Motors
  • LED
  • Scheduling LED
  • Digit LED Raw
  • Buttons
  • Song
  • Play
  • Query List
  • Stream
  • Pause/Resume Stream

About

A python library for controlling the iRobot Create2

Resources

Stars

20 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages