This is an old revision of the document!
Table of Contents
MIDI Keyboard
A 25 key Midi keyboard based on an Arduino (Atmega328P-PU). It has an small OLED Display, too.
Pulldown Resistor
Every botton is connected to +5V and at the pin to the MCP23017 it has a 10k pulldown resistor to ground.
I2C
I2C SDA SCL Arduino Uno A4 A5
Setting the Adress
To set the I2C address of the MCP23017 one has to connect A0, A1 and A2 to GND or to power.
GND = 0 and +5V = 1
A0 A1 A2 adresse 0 0 0 0x20 0 1 0 0 0x21 1 0 1 0 0x22 2 1 1 0 0x23 3 0 0 1 0x24 4 1 0 1 0x25 5 0 1 1 0x26 6 1 1 1 0x27 7
And in the code one has to put the address in the “begin” command:
mcp.begin(address);
Library
OLED Display
Pins:
GND: power ground VCC: 3.3v or 5.0V power supply D0: ClK D1: MOSI data RST: Reset DC: Data/Command CS: Chip select Port
Bit Converter
http://en.radzio.dxp.pl/bitmap_converter/