Skip to content

Commit

Permalink
added readme for cover detection
Browse files Browse the repository at this point in the history
  • Loading branch information
SirLefti committed Mar 29, 2022
1 parent baea690 commit c6a1ecd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Docs/cover_detection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Implementing a keyboard cover detection depends highly on your specific model. Basically any type of switch will work,
that closes the circuit when the cover is closed. For example, you can use a mechanical switch that is placed
underneath the cover and will be closed by the cover. Alternatively you can use a magnetic reed switch (will be used as
example).

Wire one end of the switch to GPIO PIN 12 on your pi. The other end must be connected to ground. You can share the
ground line used by the RGB strip.

![coverdetection_pic](../Docs/pics/coverdetection_pic.jpg)

In this example the reed switch is taped down onto the piano. A small neodymium magnet is mounted behind the cover and
sits directly in front of the reed switch when being closed. One wire goes to the raspberry GPIO PIN 12, the other
shares the ground supply of the RGB strip.
Binary file added Docs/pics/coverdetection_pic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
**Not required but worth having, to make everything look neat:**

- Custom 3d printed case (*I attached STL file with modified 3d model, there is additional space and holes for power socket and wires, [here](https://www.thingiverse.com/thing:3393553) is original model*)
- Waveshare LCD TFT 1,44'' 128x128px [Amazon US](https://amzn.to/2YkW5nC) | [Aliexpress](http://s.click.aliexpress.com/e/cpk00blQ)
- Waveshare LCD TFT 1,44'' 128x128px [Amazon US](https://amzn.to/2YkW5nC) | [Aliexpress](http://s.click.aliexpress.com/e/cpk00blQ)
- Braid for cables [Amazon US](https://amzn.to/2yd2Fhz) | [Aliexpress](http://s.click.aliexpress.com/e/cG7ur6Di)
- Heat shrink bands [Amazon US](https://amzn.to/2SsSYok) | [Aliexpress](http://s.click.aliexpress.com/e/UwKVLo8)
- Aluminium LED Profile with diffuser (*highly recommend to search for the right one in local shops*) [pic#1](https://i.imgur.com/MF7dd1R.png) [pic#2](https://i.imgur.com/fFWOs3v.png)
Alternative made of silica gel: [Aliexpress](https://s.click.aliexpress.com/e/_A0HNfF) *(choose T0515 for 12mm 2 meters, credits to [vzoltan](https://github.com/vzoltan) for finding this)*
- Double side tape to stick everything on the piano
- Windows 10 laptop/tablet with bluetooth to run Synthesia
- magnetic or mechanical switch to detect if the keyboard cover is opened or closed, if your piano has one (see [Instructions](https://github.com/onlaj/Piano-LED-Visualizer/blob/master/Docs/cover_detection.md))

**Total cost (excluding piano and tablet) should be 75-100 USD**
*Disclosure: All of the links above are affiliate links, which means that without additional costs for you, I will earn a commission if you make a purchase by clicking through it.*
Expand Down Expand Up @@ -109,7 +110,7 @@ If you are getting mixed colors, meaning that leds are lighting up with your pre

The Visualizer supports learning to play MIDI files without the need of Synthesia or additional external devices.

![learnmidi_pic](/Docs/pics/learnmidi_pic.png)
![learnmidi_pic](./Docs/pics/learnmidi_pic.png)

For practicing, the following 3 modes can be used:
- **Melody**: The song will wait for you to hit the correct notes. Take your time and try to avoid mistakes. Holding notes to their full duration is also important, otherwise you might develop muscle memory with the mistakes included.
Expand Down

0 comments on commit c6a1ecd

Please sign in to comment.