Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tigoe committed Nov 13, 2023
1 parent 3ecde5e commit ab433df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tone_examples/UltrasonicSensorExamples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Concepts covered:


## [How to Convert Distance to Frequency](2_HC_SR04_ultrasonic_sensor_to_tone/2_HC_SR04_ultrasonic_sensor_to_tone.ino)
* based on these notes
* based on [these notes](https://tigoe.github.io/SoundExamples/tone.html)
* assume that the distance range that matters is 0 - 100cm
* Assume that the range of frequencies you want is 110Hz to 1046.5 Hz (A2 to C6 in equal tempered musical note pitches)
* Map the distance range to the frequency range
Expand All @@ -31,5 +31,6 @@ Now you've got a theremin
* If they're the same, don't play anything.

## [To Make The Device Convert To Specific Notes (Not All Frequencies In Between)](4_HC_SR04_ultrasonic_sensor_to_note_norepeat/4_HC_SR04_ultrasonic_sensor_to_note_norepeat.ino) (optional)
* also based on [these notes](https://tigoe.github.io/SoundExamples/tone.html)
* Convert the distance to a MIDI note value
* Convert the MIDI note value to a frequency

0 comments on commit ab433df

Please sign in to comment.