The Makey Makey is a great little device that emulates a USB keyboard and lets you make keys out of any somewhat conductive thing (aluminum foil, bananas, play dough, etc.), which can then be used as a controller for games and educational projects. The Makey Makey has two downsides: (1) cost and (2) the need for a ground connection.
This project is a cheap alternative using a $2 STM32F1 board and capacitive sensing. It only has 10 inputs as opposed to the Makey Makey’s 12, but it has the advantage that in addition to emulating a keyboard, it can emulate a USB gamepad controller (digital joystick).
Parts:
“black pill” STM32F103c8 board ($1.90 on Aliexpress) breadboard (less than $1 on Aliexpress) and jumper wires; or just a bunch female-to-male dupont connectors ($0.70 on Aliexpress for a pack of 40) paperclips, alligator clips, etc.Tools:
computer UART-to-USB adapter for initial board programming (an Arduino Uno or Mega will do the job, as will a cheap CH340 unit) soldering ironThe software is an example sketch included with my ADCTouchSensor library which allows for capacitive sensing with a single pin on the STM32F1 board per sensor (it’s based on martin2250’s library for AVR).
Warning: In dry weather, or where static is an issue (e.g., on a carpet), don’t touch the exposed metal connectors lest you cause electrostatic damage to the STM32F1 board. I expect that the resistance of potatoes, bananas, play dough, etc. will help protect the board, but if you use bare aluminum foil, you might have problems. On the other hand, the board is only $1.90.
Educational activity ideas:
Experiment to find out what items are conductive and can be used as control surfaces. (E.g., pencil lead vs. crayon; play dough vs. candle.)Write Scratch games that use a home-made controller.Modify the Arduino code powering the project to allow mouse click/movement, other keys, more than four joystick directions, etc.”

Link

Related Content