5 mentioned the active column in the last picture description
source | link

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that, if you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high, at the moment Column 1 is active, which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that, if you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that, if you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high, at the moment Column 1 is active, which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

4 typo
source | link

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that is, if you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that is you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that, if you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

3 added some schematics
source | link

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that is you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that is you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

If you just want to make a keyboard, without using your Makey Makey, you can do that using the GPIO functionality of the Raspberry Pi. But like commented before, the Raspberry Pi does not have sufficient pins available to make a keyboard that is actually useful.

However, if you are willing to add 2 IC's you can make yourself a keyboard with so much keys that you will have a problem to come up with a function for every key!

My suggestion is to connect 2 I2C IC's to the I2C bus on the Raspberry Pi, and use those to create your own scan matrix.

If you use one PCF8574 you have 8 I/O pins available, if you get a PCF8575 you even have 16 I/O pins available. By combining then you can get a scan matrix of:

  • 64 keys: (2x PCF8574)
  • 128 keys: (1x PCF8574 & 1x PCF8575)
  • 256 keys: (2x PCF8575)

You have to use always one of them as output, and one as input. On the output you let a bit 'walk' from bit 0 to bit n (7 or 15), these are the columns of the matrix. On the other you constantly read the value of the input and these are the rows of the matrix. The combination of what output bit is active and what input bit is '1' is the key that is pressed.

principle of scan matrix

Actually creating the matrix is the most work, and while you are at it, don't forget to add a diode after every switch you put in the matrix, this diode (a normal 1N4148 will do fine) needs to be placed with the anode to the switch and the cathode to the row line. The voltage drop of 0.6V over this diode should not be a problem, the remaining (3.3V-0.6V) 2.7V should still be a logical '1'.

practical scan matrix

The reason for this truckload of diodes is that it will prevent things like ghosting and masking of keys. Ghosting is the effect that if you press more then three keys at the same time, it is possible that it is interpreted as a totally different key because more rows will have a logical '1'. Masking is the effect that is you have multiple keys pressed and release a key this will (in some situations) not be detected because the row for that key is still a logical '1'.

ghosting example

The picture shows an example of ghosting, buttons A, B, D are pressed and besides Row 1 (for button A) also Row 2 (for button C) is high which is not correct.

After the whole hardware adventure, you need to write or adapt a kernel driver to actually use the keyboard under linux. A nice starting point might be this link: Driver for keys on TCA6416 I2C IO expander, this is a similar idea, but only uses a 16 keys keypad.

Hope this helps you a little.

2 added 3 characters in body
source | link
1
source | link