Go Down

Topic: $$ Programmer needed: wireless capacitive touch  (Read 903 times) previous topic - next topic

3DPiper

I have a project where I need a Leonardo (emulating a keyboard) plugged in to a computer via USB. The keypresses it sends will come wirelessly from four other Arduino flavor boards that each have 8 capacitive touch inputs (MPR121 breakout?).  The first Arduino's sensors will send keyboard characters 1-8 via the Leonardo, the second Arduino's sensors will send keyboard characters Q,W,E,R,T,Y,U,I, the third Arduino's sensors will send A,S,D,F,G,H,J,K, the fourth Arduino's sensors will send keyboard characters Z,X,C,V,B,N,M,L. All keypresses are active at once. This is a custom input for an app/game. In the end, the computer just sees keyboard keys being pressed/held in realtime. I can handle hardware build based on advice from programmer.

PaulMurrayCbr

#1
Jan 21, 2016, 09:55 am Last Edit: Jan 21, 2016, 10:19 am by PaulMurrayCbr
The MPR121 is an I2C board. You really don't need one arduino for each one. According to the datasheet, each can be set up to use i2c address 5a, 5b, 5c or 5d, so you can just hook all four of them onto the i2c bus].

Alternatively, you might want you use something like this i2c multiplexer

Either way, this means that you don't need that rotary encoder. Your transmitting arduino would ask each MPR121 in turn about what pads are being touched, and it would decide what key that counts as.

Furthermore, if you want a wireless connection, the arduino might be able to emulate being a bluetooth keyboard. This would mean that you don't need a transmitting and receiving arduino. If your computer can talk to a bluetooth keyboard, well, there you go.

Check out this: Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller. According to the blurb:
Quote
This breakout acts just like a BT keyboard, and works great with any BT-capable device: Mac, Windows, Linux, iOS, and Android. Power the module with 3-16VDC, and pair it to the computer, tablet or phone just as you would any other BT device
http://paulmurraycbr.github.io/ArduinoTheOOWay.html

3DPiper

Quote
The MPR121 is an I2C board. You really don't need one arduino for each one. According to the datasheet, each can be set up to use i2c address 5a, 5b, 5c or 5d, so you can just hook all four of them onto the i2c bus].

Alternatively, you might want you use something like this i2c multiplexer
This will basically be a custom game controller, and I do need 4 separate ones. Think: four separate xbox controllers.

Quote
Either way, this means that you don't need that rotary encoder. Your transmitting arduino would ask each MPR121 in turn about what pads are being touched, and it would decide what key that counts as.
There is a chance I would make more than four, and if that is the case each would need to be set so they don't step on each other's keystrokes. I can't have two players both on 1!

Quote
Furthermore, if you want a wireless connection, the arduino might be able to emulate being a bluetooth keyboard. This would mean that you don't need a transmitting and receiving arduino. If your computer can talk to a bluetooth keyboard, well, there you go
I definitely want the Leonardo emulating a keyboard as the computer side source. The four game controllers need to be wireless and self-selectable (1-4). If the radio link between the game controllers and Leonardo is Bluetooth or other I don't care.

I have the EZ-Key Bluetooth Keyboard and it works great for what it does. However, as stated in the documentation the limitations of Bluetooth mean it can only send 6 simultaneous keystrokes at one time and I need 8 per player.



Go Up