Skip to content


Repository files navigation

ct-Bot Teensy framework

This is a very basic framework for the ct-Bot with a Teensy 4.0 or Teensy 4.1 controller. It is licensed under the terms of the GPLv3 license.

Chat on Matrix


This code was created for testing a new and simplified design of the ct-Bot software framework. The basic idea is to have a modular structured framework implemented in C++ built on modern language features.


Consider this as experimental code. If it breaks, you get to keep both pieces.


Note for Atom IDE users: When installed via Atom package, Bash (Shell) used in the terminal currently does not seem to recognise the command platformio; use pio instead. (State as of May 2019)

  1. Install PlatformIO core as described here
  2. Clone this git repository: git clone
  3. Change to cloned repo: cd ctbot-teensy
  4. Initialize build system for...
    • Commandline build: platformio init
    • VS Code project: platformio init --ide vscode
    • Eclipse CDT project: platformio init --ide eclipse
    • any other environment supported by PlatformIO


  1. Build project
    • Commandline: platformio run -e teensy41
    • VS Code: use “Build” button on the PlatformIO toolbar or shortcut (ctrl/cmd+alt+b)
    • Eclipse CDT: Project -> Build Project or shortcut (ctrl/cmd+b)
    • Atom: Select project folder in sidebar -> Menu PlatformIO -> Build or shortcut (Alt+Ctrl+B)
  2. Upload firmware image
    • Connect USB cable to teensy board
    • Commandline: platformio run -v -e teensy41 -t upload
    • VS Code: use “Upload” button on the PlatformIO toolbar or shortcut (ctrl/cmd+alt+t) and select "PlatformIO: Upload"
    • Atom: Select project folder in sidebar -> Menu PlatformIO -> Upload or shortcut (Alt+Ctrl+U)
  3. Use a terminal program (e.g. minicom) to connect to the USB serial device
    • If you use minicom:
      • goto Serial port setup settings and set Serial Device to your serial device (typically sth. like /dev/cu.usbmodemXXXXXXX or /dev/tty.usbmodemXXXXXXX), Bps/Par/Bits to 4000000 8N1 and Hardware Flow Control to No as well as Software Flow Control to No
      • goto Screen and keyboard settings and set Add carriage return to Yes
  4. Have fun with the command line interface
    • type help to get a list and description of available commands
  5. Cruise around with the ct-Bot using
    • your remote control: arrow keys for forward, backward, left, right and power button for stop
    • the command line interface: set speed 30 30 for 30% of max speed on both wheels, set speed 0 0 (or just set speed) to stop
  6. Press play on remote control to show a little easter egg on the command line interface :) or I/II to shutdown the bot :(


Continuous integration tests

Branch Build status
master PlatformIO CI