Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new board variant: Seeed XIAO targeted for Keyboards/HID Devices #5442

Merged
merged 2 commits into from
Oct 8, 2021

Conversation

jpconstantineau
Copy link

@jpconstantineau jpconstantineau commented Oct 8, 2021

This PR is for a new variant of the Seeed XIAO targeted for users wanting to build keyboards.

Before merging this commit, I would appreciate comments on the modules added and removed. I would like this to be generic enough so that many people can use this variant without the need to revert to the original one or having to create new ones.

Selection of the modules is governed by the following criteria:

  1. Selected modules must fit on samd21 flash space
  2. keyboards have "local" input devices connected to their GPIOs
    a. buttons
    b. key matrix
    c. rotary encoders
    d. touch pads
  3. keyboards have "local" output devices connected to their GPIOs
    a. LEDs (directly connected)
    b. LED arrays controlled via a single mosfet
    c. Neopixels
    d. buzzers/speakers
  4. keyboards are USB HID devices
  5. keyboards do not have sensors
  6. keyboards do not have displays
  7. keyboards do not need real time clocks

Enabled modules

  • keypad (1a and 1b)
  • rotaryio (1c)
  • USB HID (3)
  • USB Midi (?)
  • pwmio (2b and 2d)
  • neopixel write (2c)
  • rainbowio (2c)
  • random (2c)

Disabled modules

  • Audiocore (0)
  • busio (4 and 5)
  • pulseio (4)
  • rtc (6)
  • math (0)
  • onewireio (4)

Frozen libraries

  • Circuitpython HID (3)
  • Neopixel (2c)

I am not too sure if I should drop the USB_MIDI in favor of other modules. If this was a QT Py, people might want to use this with a neokey or a rotary encoder/stemma qt board...

The VID/PID were provided by Seeed. I am linking this PR for them to comment on this.

@tannewt tannewt requested a review from dhalbert October 8, 2021 16:49
@dhalbert
Copy link
Collaborator

dhalbert commented Oct 8, 2021

The proof is in the execution here. Is there enough space in the 64kB CIRCUITPY to fit a reasonable keyboard program? Do you have an existence proof? Thanks.

@jpconstantineau
Copy link
Author

Good Point... I have everything here already tested and working for a 9 key and rotary encoder macropad...
Had to get a "keyboard" library "precompiled" as a mpy
The cope.py code is similar to the adafruit macropad with the keymap in a py file a subfolder.

I tested this about a month ago (was waiting for the PID for a while). I'll get a fresh uf2 on there and see if anything changed (doubt it).

@dhalbert
Copy link
Collaborator

dhalbert commented Oct 8, 2021

Do you think it is usable for a full-array keyboard with features (KMK won't fit, I assume, but some subset of it might). Or are you targeting macropad-style applications?

@jpconstantineau
Copy link
Author

jpconstantineau commented Oct 8, 2021

With 11 GPIOs, the largest matrix the Xiao could have would be 5x6 or 30 keys. I haven't tested for that large.

My current test bed is a macropad that looks like the CNCEncoderpad. The encoder sends reports so fast that the QMK tester detects it as chattering...

I could use one of my gherkins and bodge a few wires between the PCB and the Xiao to see if it works fine. That would give me the 30 keys test. It might take a bit of time to set that up...

I am not thinking of using KMK but a derivative of the macropad hotkeys without the RGB or display...

I just uploaded the UF2 from the Github Action build. Code works fine...

@dhalbert
Copy link
Collaborator

dhalbert commented Oct 8, 2021

I could use one of my gherkins and bodge a few wires between the PCB and the Xiao to see if it works fine. That would give me the 30 keys test. It might take a bit of time to set that up...

No, that is fine. I was just wondering if you were thinking of this for a regular keyboard.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, and thanks for the testing!

@dhalbert dhalbert merged commit 4c45364 into adafruit:main Oct 8, 2021
@jpconstantineau
Copy link
Author

Just gave it a test on my Gherkin (5x6 matrix) and it ran fine without the need for pre-compiled/mpy files.

Having these frozen libraries made it possible to load the code without the need to load additional libraries; which was quite nice but you miss the chance to get a position on that bingo card :)

Thanks for the review and merge.

@jpconstantineau jpconstantineau deleted the board-xiao-kb branch November 22, 2021 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants