I’m at an interesting point in my project where I’m not hitting much frustration. As great as that is, I feel like it’s going too well. I feel like I’ll hit a road block soon. I mean, I did a road block, but I’m confident that I’ll figure it out with Aaron’s help.
I set out to do a few things for this deadline:
- make the speaker
- create a timer for the hyperventilation
- make a key press for the “Pose/Superhero music”
- set up the human presence sensor and test the range I’d use for the stethoscope
- test how the serial communication is working
One thing that I am a bit stressed about is the fact that I don’t have an actual tree yet. Prop Loan has been closed since the last class, so once they reopen I will go and check out what they have. Then most of my time will be spent on making that. If Prop Loan has nothing, I think I’ll ask the convenience store for some cardboard boxes that they aren’t using. I plan on going to prop loan tomorrow either during class (Wednesdays they are open 10am-12pm) or Thursday right after my class (5:20 it ends, Prop Loan closes at 6:00pm).
Okay now onto what I’ve done for this deadline! I’m actually feeling okay about it. Could I have done more? Yes. But did I do a lot? Also yes.
This was towards the beginning of my working. Here, you can see the Hyperventilation timer on for a few seconds and then turn off. Right now I’m just working with cout<< but this will then trigger the bird sounds to turn on at a set volume. The hyperventilationOff will then, in turn, shut off the bird sounds.
You can also see the light turning on and off in response to the complete switch becoming incomplete. When I was first working with this, there was a bit of a delay. I’m not sure what was happening but I would remove the plate and then a few seconds later, the light would turn off. Later, I fixed this issue. I don’t know what I did but in the final version of the serial communication that I used, the light response was very fast! A miracle? Maybe!

To trigger this, I’m using a piece of cardboard that has copper tape in strips along the sides. In the middle is a small square that has some of the copper tape leading into it. When I put a little copper square in the middle of the two strips, it completes the circuit. I wasn’t sure how to get a valuable reading on this, but after trial and error with a few different sensors/inputs, I decided to go with a touchRead. So, I put one end of the circuit into pin 3 and then the other end into power. This gives me a giant reading of about 65000 when the circuit is complete. However, when the circuit is not complete, I get a reading of about 1000. This makes it very easy to distinguish between whether the circuit is completed or not. I’m using the little LED just as a way for me to easily see if the circuit is completed. This will be important come performance time!
Here is what I ended my work with. You can see the light response is much faster now! I’ve turned off the hyperventilation timer just so I can see the readings that I”m getting on the human presence sensor.
One issue that I’m having is the serial communication with the human presence sensor. In arduino, I’m getting readings that range from -900 to 6000, however when I send that over to openFrameworks, I get very jittery readings that range from 0-120 and don’t seem to really react to any adjustment of the human presence sensor. That is to say I can’t find an easily map-able range that would control the volume of the bird noises. Why is this so jumpy? Do I need to add smoothing? Is this something I can fix? Why are the oF readings different from the arduino readings?
The code is vaguely a mess right now with things being commented out to focus on other aspects, but here’s the link!