Programming the Model 01 - adding plugins to code?

I take these are somewhat beginner questions, so please be patient :wink:

  • I managed to get my .ino file compile and upload it via the arduino ide. Check… but how can I add third party plugins here or - if i am able to - one of my own?
  • i also got the commandline running, make flash die flash my keyboard, but it spits out a ton of what seems to be error messages and warnings so that I really hesitated before hitting enter - something wrong with my settings?
  • i am familiar with git and such, but I do not understand arduino yet, and keyboardios system. but to get me just started: in commandline - how would I add a new plugin there? just add it to the src directly?
  • when running make flash, during the process the print dialog fires up!? never printed the file, but it seems a bit strange…

Thanks

You seem to have figured most of this out since asking, but for reference, and anyone reading this in the future, a few tips and tricks:

Plugins

Plugins are just “random” objects that descend from the kaleidoscope::Plugin base class. You can add them directly to your sketch (the .ino file), or a separate header+implementation combo in your sketch repo. The easiest way to add a new plugin is doing it in your own repo. Depending on the complexity of the plugin, either directly in the ino file, or as a separate pair of files.

For third party plugins, as long as Arduino sees them, you can use them. Cloning them to $HOME/Arduino/libraries is probably the easiest.

Flashing

What warnings exactly? If it’s complaining about ModemManager, that might be a legit issue, if you have ModemManager running. It will complain even if it isn’t, but the udev rules aren’t set up to tell it to skip probing the keyboard.

For reference, ModemManager will try to probe any USB serial port to see if it’s a modem, unless we tell it not to (via an udev rule). Probing will interfere with flashing, and with Chrysalis too, so it’s best to let ModemManager know that the Model01 is not a modem, despite having an USB serial port.

The print dialog popping up is… weird, I haven’t seen it happen before. Can you file an issue about it on GitHub, please?

1 Like

I will file an issue for the print dialog - no problem. But I need to find out, when it happens. It seems it prints out some strange characters then on the console also.

Regarding the warnings, it’s probably too much to post here, but warnings like

                                 ^~~~~~~~
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h: In member function 'bool kaleidoscope::Hardware::isKeyswitchPressed(byte, byte)':
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h:290:57: warning: unused parameter 'row' [-Wunused-parameter]
   DEPRECATED(ROW_COL_FUNC) bool isKeyswitchPressed(byte row, byte col) {
                                                         ^~~
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h:290:67: warning: unused parameter 'col' [-Wunused-parameter]
   DEPRECATED(ROW_COL_FUNC) bool isKeyswitchPressed(byte row, byte col) {
                                                                   ^~~
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h: In member function 'bool kaleidoscope::Hardware::isKeyswitchPressed(uint8_t)':
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h:302:35: warning: unused parameter 'keyIndex' [-Wunused-parameter]
   bool isKeyswitchPressed(uint8_t keyIndex) {
                                   ^~~~~~~~
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h: In member function 'bool kaleidoscope::Hardware::wasKeyswitchPressed(byte, byte)':
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h:322:58: warning: unused parameter 'row' [-Wunused-parameter]
   DEPRECATED(ROW_COL_FUNC) bool wasKeyswitchPressed(byte row, byte col) {
                                                          ^~~
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h:322:68: warning: unused parameter 'col' [-Wunused-parameter]
   DEPRECATED(ROW_COL_FUNC) bool wasKeyswitchPressed(byte row, byte col) {
                                                                    ^~~
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h: In member function 'bool kaleidoscope::Hardware::wasKeyswitchPressed(kaleidoscope::Hardware::KeyAddr)':
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h:332:36: warning: unused parameter 'key_addr' [-Wunused-parameter]
   bool wasKeyswitchPressed(KeyAddr key_addr) {
                                    ^~~~~~~~
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h: In member function 'bool kaleidoscope::Hardware::wasKeyswitchPressed(uint8_t)':
/Users/stephan/Library/Arduino15/packages/keyboardio/hardware/avr/1.96.0/libraries/Kaleidoscope/src/kaleidoscope/Hardware.h:344:36: warning: unused parameter 'keyIndex' [-Wunused-parameter]
   bool wasKeyswitchPressed(uint8_t keyIndex) {

it seems like the versions do not match or something - might that be?

I guess I found the “bug”… it links to the installation of Arduino and not to the directly checked out sources. This probably causes the problem.l