Piano
Capacitive Touch Piano Module
- Overview
- Commands
- Samples
- On-Module Code
Piano is a DUELink microcomputer shaped like a piano keyboard — capacitive touch pads laid out as keys, multiple octaves, an on-board buzzer, and five status LEDs. Alligator-clip holes at the top let students play notes by touching fruit, foil, or other conductive objects.
Ships with MicroBlocks firmware pre-loaded, so block coding works out of the box. Or code it in Python, JavaScript, .NET, Arduino, or C++. Mounting holes on the body let you bolt on additional DUELink modules.
Pick Piano for music-themed STEM activities, accessibility projects, or any setting where the "input" needs to be something more tangible than a button press.
Key features • Piano key layout | Resources 📄 Schematics PID: 0x0C0005 |
Modules ship without cables to reduce waste. Some specialty boards include a USB cable; for the rest, see Cables to add cables to your order.
Commands this module accepts. See Samples for runnable code in popular host languages.
| Function | Description |
|---|---|
DVer() | This driver version. |
SetLED(i,s) | Set specific LED to on or off. |
SetLedAll(o) | Set all leds 1,2,3,4,5 to on(1) or off(0). |
TLArrow() | return 1 if touched on left arrow. |
TRArrow() | return 1 if touched on right arrow. |
TPad(i) | return 1 if touched on pad i. |
Peek under the hood
The script below is this module's driver — it teaches the hardware how to respond to the commands listed above. It ships pre-loaded from the factory; most users never need to open it.
loading...
Example code that calls this module's commands from popular host languages.
New here? See Get Started to connect a module and send your first command.
- Python
- JavaScript
- .NET
loading...
loading...
loading...
Code that runs directly on this module's MCU. See how On-Module Code allows modules to run standalone.
- Script
- Arduino IDE
- MicroBlocks
This example runs using the default DUELink Internal Engine using its Scripting Language, and it expects the module's driver to be loaded first, see the Commands Tab.
loading...
See Arduino IDE page for more info.
loading...
This project runs standalone. It assumes that the MicroBlocks firmware is already loaded on the module.
Click the button below to open, edit, and run the project directly on the MicroBlocks website.
Ordering Info
| Product | Part Number | Price |
|---|---|---|
| DUELink Piano | GDL-SPPIANO-B | $14.95 |