The 8th week of PComp was a difficult one but because I was really inspired by our project with Wendy Wang I’ve barely noticed it (or maybe I just got used to the stressful life of the ITP student). We’re making a lot of progress in our labyrinth game, as we separated our responsibilities. We catch up with each other once a week to discuss the problems we’ve been having. Thus, we come up with the solutions together.
I’m responsible for the Arduino side that includes programming the thumb joystick, the speaker/headphones, SD card, and finding music. This week I spent programming the joystick that took me a lot of hours and help from two residents (bless them!). It wasn’t really problematic to connect the joystick, but it was hard to make it move step by step rather than all over the screen. Another problem was that the joystick would return to the center of the screen due to translate function instead of staying on the place where I moved it. In the process of solving it, one more problem appeared. P5 would translate the values from sensors into the strings and thus, I couldn’t do any arithmetical operation with them. And finally, the mapping (uuuggggh)…apparently the joystick’s values in the resting state weren’t just zeros. Hence, I had to add conditional statements that would trigger the mapping function when I want to.
Working sketch and a piece of p5
Maze attempts in p5 on the left and a joystick circuit on the right
Things to do:
1) Choose the music – I’ve already researched it and asked around, so I have several sources. We wanted to use the music or sounds created by visually impaired sound artists or musicians that presented some difficulties.
2) Finish the Maze/Labyrinth – Wendy took the responsibility for that and she’s working really hard! Ideally, we want to create a maze that is randomly generated every time the game is run (which already sounds difficult to do). We also want to add background music into p5 itself. Wendy has based her code on this work https://codepen.io/Sorb/pen/wvwJZLj.
3) Getting the SD card to work – So my SD breakout board doesn’t work, as the card isn’t being initialized. One of the residents suggested that it needs soldering. I have never done it, so I’ll be taught soldering on Thursday and hopefully make the card work then. As for another lab, my color sensor arrives on Friday, so I won’t be able to do the lab until then. I’ll update the blog as soon as I do try the lab.
4) Speaker or Earphones – We’re still deciding between these 2 options. While it is easier to add the speaker to the circuit, earphones can provide a stereo sound and hence, it would be more convenient to use. Tom Igoe provided some resources on how to connect earphones to the circuit, and I’ll look into that.
Labs updates:
1) One of the residents Arnab taught me how to solder, so now I can proudly put this skill on my resume. After soldering pins to breakout board, the SD card worked perfectly. I managed to get the readings from my DHT11 sensor and see them on my computer. I used the code created by Tom Igoe.
SD card circuit, data from the DHT11 sensor, soldering fun
Comments