geekhack
geekhack Projects => Making Stuff Together! => Topic started by: HotKillerZzz on Fri, 18 July 2014, 08:40:51
-
How do you use an MCP23018 "I/O expander" to link between two custom made hardwired diy ergo keyboard?
-
Subscribing. I will need to do this for my hand wired dox and I have not researched it yet.
-
The ergodox firmware has a file that explains how the i/o expander works.
https://github.com/benblazak/ergodox-firmware/blob/master/src%2Fkeyboard%2Fergodox%2Fcontroller%2Fmcp23018.md (https://github.com/benblazak/ergodox-firmware/blob/master/src%2Fkeyboard%2Fergodox%2Fcontroller%2Fmcp23018.md)
You can also check out the source code for the ergodox firmware:
https://github.com/benblazak/ergodox-firmware/blob/master/src%2Fkeyboard%2Fergodox%2Fcontroller%2Fmcp23018.c (https://github.com/benblazak/ergodox-firmware/blob/master/src%2Fkeyboard%2Fergodox%2Fcontroller%2Fmcp23018.c)
-
Then how do you program the teensy to work tgt with it?
-
Teensy is a ATmega 32u4 AVR, and can be programmed in C or using the Arduino IDE and libraries. In either case you will need to write firmware to implement the IO logic, and then you can communicate with the IO expander using an I2C library. Once your program compiles you load it onto the Teensy using their custom loader program (comes with the "Teensyduino" add on to the Arduino IDE) or via their command line loader (available from the PJRC website I believe).