Skip to content

Install Arduino support on FreeBSD

Brian Cully edited this page Nov 25, 2018 · 4 revisions

The Arduino system has been designed to be accessible to people at all skill levels, and Keyboardio is built on top of the Arduino platform because we share that goal. There are many ways to set up your system to work with the Keyboardio firmware, the most typical is to use the Arduino Integrated Development Environment (IDE); an application that gives some visual context to the code you want to send to your Arduino device. This is the easiest process for folks who are new to Arduino, or to programming generally. If you follow the instructions below step by step you should be fine. :-)

Step One: installing support packages

  1. Install the following packages required by the build system: bash, gmake, perl5, avrdude, and arduino18.

    $ sudo pkg install bash gmake perl5 avrdude arduino18
  2. Flashing firmware as non-root.

    a. If you want to flash your firmware as non-root, ensure your user has write access to the appropriate USB devices in devfs. By default, the devices are owned by root:operator, so put yourself in the operator group. You will also need to add yourself to the dialer group to use the modem device:

    $ sudo pw groupmod operator -m $USER
    $ sudo pw groupmod dialer -m $USER

    b. Add devfs rules for write access for operator to USB devices:

    $ cat << EOM >> /etc/devfs.rules
    # Allow operators access to usb devices.
    add path usbctl mode 0660 group operator
    add path 'usb/*' mode 0660 group operator
    add path 'ugen*' mode 0660 group operator

    c. Update /etc/rc.conf to use the new devfs rule as the system rule:

    $ sudo sysrc devfs_system_ruleset=operator_usb

    d. Restart devfs:

    $ sudo service devfs restart

Step Two: using the FreeBSD fork.

The FreeBSD support pull request hasn't been pulled into mainline yet, and until it is, you can use my branch at

  1. Check out the Keyboardio-Bundle according to the existing documentation.

  2. Pull in my fork as another remote repository in the Kaleidoscope repository.

    $ cd $HOME/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope
    $ git remote add bjc
    $ git fetch bjc
    $ git checkout -b freebsd-port bjc/freebsd-port

Step three: compiling the firmware and flashing the keyboard.

  1. Edit your sketch or copy one of the examples from $HOME/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/examples.

  2. Flash the firmware:

    $ cd $HOME/Arduino/Model01-Firmware
    $ gmake flash

Congrats, you've just installed the latest firmware!!

Next step: Edit a Keymap

Clone this wiki locally
You can’t perform that action at this time.