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

Integrate the NeoKey 1x4 #25

Open
afternoon opened this issue Jun 22, 2023 · 1 comment
Open

Integrate the NeoKey 1x4 #25

afternoon opened this issue Jun 22, 2023 · 1 comment
Milestone

Comments

@afternoon
Copy link
Owner

afternoon commented Jun 22, 2023

Adafruit's NeoKey 1x4 is a PCB that holds 4 Cherry MX keys and 4 NeoPixels (RGB LEDs). Clicky keys are really nice (I love the Elektron ones), colourful LEDs are really nice.

The NeoKey talks Adafruit's Seesaw protocol over I2C. The button state can be read by writing a command and then doing a read. A short pause is needed between these. Adafruit suggest 250us.

There are a couple of Seesaw crates available, but both use longer delays. This leads to the device locking up, as the key state is read every few ms. The Seesaw protocol is pretty simple, so the way to go might be to just do I2C write and read calls directly in the RTIC tasks. E.g.:

fn task1() {
  send_get_key_state_command();
  task2::spawn_after(READ_DELAY_US);
}

fn task2 {
  read_response();
}
@afternoon
Copy link
Owner Author

Don't forget to update the docs when this is done!

@afternoon afternoon added this to the Alpha milestone Jun 27, 2023
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

No branches or pull requests

1 participant