Skip to content

Integrate the NeoKey 1x4 #25

@afternoon

Description

@afternoon

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();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions