Install Arduino support on FreeBSD
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
Install the following packages required by the build system:
$ sudo pkg install bash gmake perl5 avrdude arduino18
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
operator, so put yourself in the
operatorgroup. You will also need to add yourself to the
dialergroup 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. # [operator_usb=5] add path usbctl mode 0660 group operator add path 'usb/*' mode 0660 group operator add path 'ugen*' mode 0660 group operator EOM
/etc/rc.confto 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
Check out the Keyboardio-Bundle according to the existing documentation.
Pull in my fork as another remote repository in the Kaleidoscope repository.
$ cd $HOME/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope $ git remote add bjc https://github.com/bjc/Kaleidoscope.git $ git fetch bjc $ git checkout -b freebsd-port bjc/freebsd-port
Step three: compiling the firmware and flashing the keyboard.
Edit your sketch or copy one of the examples from
Flash the firmware:
$ cd $HOME/Arduino/Model01-Firmware $ gmake flash
Congrats, you've just installed the latest firmware!!
Next step: Edit a Keymap