Code Monkey home page Code Monkey logo

roomba_control's Introduction

Roomba with PS4 Controller

With this small project you can control your Roomba with a Playstation 4 controller and play Midi songs.

Installation

git clone https://github.com/danielzuegner/roomba_control.git
cd roomba_control
pip install -r requirements.txt

Setup

  • Check whether your Roomba has a micro USB port. I have a Roomba 960 and the USB port is located under a section of the chassis on the bottom right. See the image below for details: !mage
  • Connect a computer with the USB port I've used a Raspberry Pi Zero W with a powerbank, but other options should work.
  • Clone this repo on the computer you want to use to control your Roomba
  • Connect the computer to your PS4 controller, e.g., as described here.
  • Figure out the device interface of the USB connection to your Roomba. For my Raspberry Pi, the port is /dev/ttyACM0.
  • Figure out the device interface of the Bluetooth connection to your PS4 controller. In my case, this is /dev/input/js0.

Usage

Once your setup is complete, simply run

python roomba.py --interface /your/roomba/interface --controller-interface /your/ps4/interface

and have fun! Steering is straightforward with the L3 analog stick. Vaccuuming can be turned on with R2. I've added a couple of songs to play on the square, x, circle, triangle, up arrow, and down arrow buttons.

Convert MIDI to Roomba Songs

If you want to teach your Roomba more songs, you can use midi_to_roomba.py to do so:

python midi_to_roomba.py --file your_midi_file.mid --track TRACK_ID

where TRACK_ID is the ID of the MIDI track you would like to export.

Simply add the output JSON into the SONGS_DICT in songs.py.

roomba_control's People

Contributors

danielzuegner avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

seemirra

roomba_control's Issues

2024 is it still working?

Hei first of all this is one of the funniest things i see in a long time i wanna ask if its still working with the new updates of roomba? Mine is a roomba 966 is it working with that either ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.