Giter Club home page Giter Club logo

micromechboard's Introduction

MicroMechBoard

This project is the teensy code for Will Yager's custom mechanical keyboard project.

The code serves two functions:

  1. If plugged into USB, the device will act as a stand-alone keyboard with 33 keys. ("The master")
  2. If a second device is plugged into that first device, the two devices will share relevant information over I2C. In this way, two of these devices can be connected to form a 66-key keyboard. With some modification to the firmware and the I2C pull-up resistors, one could theoretically chain up to 129 boards together (I believe).

Building/installing

  1. Install avr-gcc.
  2. Install Teensy loader.
  3. cd src
  4. make
  5. Drag main.hex into Teensy loader.
  6. Program Teensy.

Modifying key layout

  1. Modify keys[] in KeyMapper.cpp.
  2. Replace values like KEY_A with other values from keylayouts.h.

This should be fairly simple to figure out. Within the file, I have keys[] laid out just like the physical keys.

Program structure

main.cpp

       Start USB/I2C
       Determine master/slave status
       
       forever:
              led_status
              => get hardware state from HardwareController
              => debounce buttons with ButtonDebouncer
              => detect changes in buttons with ButtonDeltaDetector
              => map button changes to key changes with KeyMapper
              =: key_changes

              led_status
              => update the slave (if it exists) with the SlaveNotifier
              =: slave_key_changes

              key_changes, slave_key_changes
              => notify the master (over USB or I2C) of key changes with the MasterNotifier
              =: led_status
              

micromechboard's People

Contributors

wyager avatar caitsith2 avatar spatil47 avatar

Watchers

none-p avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.