To see what magnitude values your mic is giving you, use the REPL or Read-Eval-Print-Loop on Mu.
There's a print statement I put in the code that prints the value of the mic magnitude every time the program runs through the while loop. You can print any data you want by creating a statement like this. More on printing output in Python here.
print("mag = ", magnitude)
Click on the REPL button at the top of Mu.
Next you should see a section at the bottom of the editor pop up. This is where your program output will be sent. If you aren't already getting the magnitude values to print, try clicking in the box that just opened up and doing a control + d, this will start the process of outputting the data. If you want to stop the program from outputting the data, do a control + c.
The REPL can be a great resource to help debug your code. If you have errors in your code, the REPL will tell you what's going wrong and where. Handy!
I know, that was a lot... moving on... to 3D Printing!!!
Page last edited March 08, 2024
Text editor powered by tinymce.