For this mid-term I was paired with Yuchi Ma to build a midterm project. Yuchi and I didn’t know eachother very well so immediately after our pairing we sat down to figure out what we wanted to do.
I pitched increasing the scope of the nagging hand to interact with the browser and build it out of better materials than a Kellog’s cardboard. I let Yuchi know I was open minded about his ideas.
He suggested building a power glove that we can manipulate in VR. I was happy to consider that option but wanted to limit ourselves to p5 and not have to learn a new software like Maya or 3D Max while we had other projects going on.
We did our own research and played around with Maya, but controlling variables was very hard (could only get the ball to fall off the grid, not much else). With that, we jumped into p5.
Having done the lab for asynchronous serial communication and handling multiple values coming in we decided to use two flex sensors (as opposed to five which we already bought). Came up with the algorithm, labled and mapped the flex sensors. We got familiar with the use of a wire wrapper too.
Then we started programming p5 with the if statements first. These were critical, if “sensor a” vs “sensor b” are bent, display Image X. This we spent a bit of time on and correlated with the values we’d mapped.
We encountered some problems with the server port not working, but got around that with the help of a resident Laura Chen. We also modified the lab’s code to declare separate variables as opposed to the same variable in the arduino sketch to improve accuracy.
An important aspect was getting the do-nothing gesture to be as effective as a paper gesture because they are similar in nature. We got over that - with a bit of faith - and a lot of sensitive mapping of flex sensors. Hence are annoyance at it during the presentation.
A lot of debugging (console.log which was introduced to us at that point) helped in mapping ‘a’ vs ‘b’.
The last couple of days were spent building a timer (which we shameless found and used code from the internet), but getting it to work in our program wasn’t simple. I would try a function based approach and Yuchi would watch it fail - then he would try creating an array, and I would watch that fail. Until, well, we would get help. Other functions we built out included, game mechanics, adding randomness to play with the computer, assessing wins and a scoring system.
Our program was a patch work of borrowed, tailored and original code.
##Success - it worked. Kind of - and then we ran some user tests on the floor.
Alot of our programming and testing was done with the user sitting down. 10 minutes before class started we were testing to see if our game worked on the projector but Yuchi stood up when he used the glove - lol - and the wires ripped off. PANIC!
But I asked him to remain calm, and we re-did the wires and crossed our fingers that the values mapped values for the flex sensors didnt change with the wiring. It happened before! Thankfully it worked and everybody who played it enjoyed the game!