Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of MaKeyMaKey_mbed_version by
A piano built with a basket of fruit, a microcontroller and a computer.
The idea is from Makey Makey, but uses different hardware and software. An mbed enabled microcontroller with USB is used.
Hardware
- An Arch board
- A basket of fruit
- A computer with AC power
- some wires
Software
- Click this link to import the program to mbed online compiler.
- Compile the code and download the binary file - Fruit_Piano_LPC11U24.bin.
- Connect the Arch board to the computer and long press the button, a USB drive named CRP DISABLD will pop up.
- Delete firmware.bin and copy Arch_GPIO_Ex1_LPC11U24.bin to the USB drive.
- Quick press the button to run the program
- Wire some apples or bananas to A0 - A5 (P0_11 - P0_14, P0_16, P0_22) pins of the Arch board
- Open Fruit Piano and play
Have fun!
Revision 1:93bbcf91f356, committed 2014-08-18
- Comitter:
- yihui
- Date:
- Mon Aug 18 01:58:34 2014 +0000
- Parent:
- 0:4755a81efb1d
- Commit message:
- Custom for Fruit Piano
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4755a81efb1d -r 93bbcf91f356 main.cpp --- a/main.cpp Mon May 26 08:03:17 2014 +0000 +++ b/main.cpp Mon Aug 18 01:58:34 2014 +0000 @@ -10,11 +10,11 @@ Ticker tick; USBKeyboard keyboard; -uint8_t key_map[TOUCH_N] = {RIGHT_ARROW, LEFT_ARROW, DOWN_ARROW, UP_ARROW, ' ', '\n'}; -PinName touch_pin[TOUCH_N] = {A0, A1, A2, A3, A4, A5}; +uint8_t key_map[] = {'a', 'f', 'd', 'g', 'd', 'h', 'j', 'k', 'l', ';', '\'', '\n'}; +PinName touch_pin[] = {A0, A3, A2, A4, A1, A5}; DigitalInOut *p_touch_io[TOUCH_N]; -uint8_t touch_data[TOUCH_N] = {0, }; +uint16_t touch_data[TOUCH_N] = {0, }; void detect(void) { @@ -55,7 +55,7 @@ p_touch_io[i]->write(1); } - tick.attach(detect, 1.0 / 64.0); + tick.attach(detect, 1.0 / 40.0); while(1) { // do something