I have just started out using a Raspberry Pi, and for my first project, I wanted to build a pseudo theremin using an ultrasonic motion detector and other electronic components (requirements are laid out here https://www.raspberrypi.org/learning/ultrasonic-theremin/requirements/).
Since this is my very first Raspberry Pi project, I tried following the instructions laid out in https://www.raspberrypi.org/learning/ultrasonic-theremin/worksheet/ as carefully as possible. But I have run into a number of issues, chief among them being that the actual end product does not produce any kind of sounds whatsoever. Additionally, the worksheet is not clear as to how I should run the code that is required. Do I need to run the Python 3 code in the Terminal by supplying the command
python3 exampletestscript.py? Or should I run the code in a different manner?
Step 3 is also proving to be quite complicated, as the instructions do not make it clear as to whether the different code blocks must be written in a single buffer, or if there is only one code block that must be written in a single buffer and then modified per each each step? To illustrate, should the two code blocks given in parts 2 and 3 of Step 3 be given in the buffer as:
live_loop :listen do set_sched_ahead_time! 0.1 end live_loop :listen do message = sync "/play_this" end
Or should there only be one block of code in the buffer, such that by the end of Step 3, the single code block in the buffer will read:
live_loop :listen do message = sync "/play_this" note = message[:args] play note end
The final problem comes with the physical design of the ultrasonic motion sensor, bread board, and jumper and resistors. The sensors face down the board (please see the "Setting up the circuitry" in Step 1 of the worksheet in the URL provided above), and are thus always blocked by the cables themselves. It seems very counter-intuitive to have this kind of design (note: once I get a chance, I will upload a picture of the physical set-up).
I have bought all the pieces dictated by the "Requirements" section of the project, so I am quite sure that this is not a situation of having the wrong equipment. Rather, I think that this project assumes a certain level of proficiency with Raspberry Pi set-up, and has not properly explained the set-up properly. I should note that other buffers in my Sonic Pi do indeed produce sound, and the output of step 2 "Detecting distance" is consistent with the instructions, and my Raspberry Pi works fine otherwise.