Last week was the first week in which I failed to get my pcomp blogs up on time; finishing the midterm took me down to the wire, and even though I had finished the labs earlier in the week, I neglected the blog post for them. As such, here are the blog posts for them combined.
To my surprise, doing the labs was actually helpful to my understanding and completion of the midterm. Our project didn’t involve any serial output from p5, but I implemented handshaking by looking at the code for the labs– input from the keyboard and mouse get converted into a value for the LED.
What was most helpful was doing the Bluetooth lab, as the device is very finicky and particular about wiring. Thankfully the ER had some bluetooth ez-links– I wouldn’t have been able to do the lab nor our midterm without this supply!
For the midterm, I worked with Chloe to convert her existing ICM homework into a physical computing project. She had created an application based around the Little Prince– all about how when you grow older, you fail to see the depths of people and the important things in life. You can view the original project here.
I suggested that we carve out a book and use it as a controller, and perhaps add a touchscreen into the pages. After consulting Benedetta, we simplified the project to just using the book as a switch, and not a touchscreen– we didn’t need to overcomplicate. Later, though, our feedback from the class was largely commenting that they’d wished we did use a touchscreen. Everyone is very ambitious! It was hard enough getting what we had to work.
After a quick jaunt to the Strand for a book to control, we divided the work as follows: Chloe would handle the cutting of the book; I’d handle the wiring; and we’d split the programming work. It worked out, though, that when it came down to the wire, Chloe handled a lot more of the wiring and I did the programming– in a rush, it’s easiest to play to your strengths.
Here’s the work we brought into each other the next day. Since a lot of the materials had to be gotten at school, I just produced a Fritzing wiring diagram.
We then wired up a button to test our project out. We did everything in increments; it makes it easier to debug and understand what we introduced that went wrong.
After this test was successful, we tried it on bluetooth and battery– this was also a success, thanks in part to doing the labs earlier. The wiring turned out to be very similar to the fritzing diagram I had produced, after a few mishaps with broken parts.
With this completed, we put everything in the book and changed the switch from a button to a photoresistor. We had originally intended to use conductive ribbon and create a concealed switch in the pages, but by the time we reached this point it was rather late and it seemed more prudent to work with the familiar. It worked relatively well– I just needed to be careful of the light values of each room.
Unfortunately, it was late, as I mentioned. The logic of the code was wrong, and the prince flickered when we closed the box. I was too tired, and could not figure it out.
After a good night’s rest, I figured out my simple logic peoblem– I needed to remember the previous state and only update the screen when it changed. I took this time to add a few different book illustrations that changed when you opened and closed the book– I don’t think Chloe liked this as much, but it impressed the class.
Rather cute, isn’t it?
Subscribe via RSS