The second interactive prototype requires us to incorporate Makey Makey into our designs. I’ve been testing out different ways to use it and familiarising myself with the technology. What I plan for this prototype, is that the makey makey will be connected to a bag with a zipper, and as the user unzips/zips the bag, this will also be represented in the companion digital prototype (and sets off alarm accordingly).
Since the main physical interface of ZipperBan is a zipper, a decided to test out different interactions using the Makey Makey connected to the zip in an extra pair of jeans I had at the time. I hooked up the ground to my other hand, and inserted a wire as close as possible to the zipper rail, which was connected to the space bar on the makey makey. The challenge was to make sure the pin on the wire makes contact with the zipper as it passes through, in order to complete the circuit.
I even tried playing some music on Spotify and zipped up/down in order to play/pause the music. A video demo can be seen here:
How to incorporate this with ZipperBan?
Problems/challenges:
- The motion of zippers is continuous, yet there is no ‘continuous input’ option on the makey makey i.e the values on the makey makey are either ‘pressed’ or ‘not pressed’ - how do we use these values to measure the displacement of the zipper?
- If all the areas of the zipper were connected to a certain input e.g space bar, the system can know and therefore act whenever the space bar is triggered e.g if the zipper is moved and makes contact with a connected area, move the zipper on the screen to the right. There is however no information about the placement of the zipper in the xyz plane - it does not have a state indicating exactly where it is along the zipper. For instance, if the user moves the zipper forward, and it makes contact with connected areas 3 times, on the screen it will move the zipper to the right 3 times. However if the user zips backwards, the connected areas will still trigger the same action. There is no way to distinguish between the connected areas.
Solution: Divide the zipper rail into 6 points, attach a wire to each of these points and connect each wire to the 6 different letters in the makey makey. This ensures that as it touches each point, it will have information regarding its location and can better determine the behaviour. This solution will still have discrete steps, and the movement will be staggered, however a smooth motion between points is not the focus of this prototype.
Algorithm: Zipper passes point connected to letter ‘a’. ‘Point-is-reached’ event is triggered. If ‘a’ is the point reached, move zipper to location (x,y).
Here is a sketch of how the system will be connected:
The pictures below illustrate the iterations of producing the physical interface:
Positioning the wires:
Sticking foil on the zipper to increase chances of making contact with wires:
Sticking the wires into place:
Covering wire ends in foil to increase surface area and attach the wires better. The wire pins kept falling out previously by just threading them through the threads in the material of the pencil case. Attached them as close as possible to the zipper rail.
The main focus for testing for this prototype, will be to see how different levels of sensitivity affect the alarm system and behaviour of the thief. There will be three levels of sensitivity: weak, medium and high. Weak sensitivity means the alarm will be set off once the zipper has reached the end of the rail. High sensitivity means the alarm will be set off after only the second point has been reached. Medium will set off the alarm at point 4. It will test the ability of the thief to retrieve belongings in a bag at different sensitivity levels.
The red circles indicate ‘active spots’ - points on the zipper rail that will trigger an alarm.
Steps for incorporating into the digital prototype:
- Divide the zipper rail on the digital prototype into 6 points. Position the zipper element on each point and record the corresponding coordinates.
- Create 3 functions in main that set off alarm at different points. i.e at 2, 4 and 6.
- Add a switch statement in main constructor corresponding to sensitivity button that executes appropriate function e.g for sensitivity=high, an alarm would be set off at point 2.
- Create buttons for the sensitivity levels
In terms of the differences between the previous digital prototype, and the digital prototype companion for the makey makey, most of the functionality that requires interfacing with the user (e.g clicking and dragging the zipper) has been removed as this interfacing has been replaced with the makey makey prototype. Also for this prototype, the user chooses to be either the owner or a thief, and this option is no longer randomised. The basic idea is:
- User chooses a sensitivity level and a ‘thief status’. Default is sensitivity=weak, thief=false.
- It listens for a keyboard event
- Based on the key that was pressed, the zipper object is moved to the corresponding location on the zipper rail
- Depending on the sensitivity level chosen, the alarm will be set off at the corresponding point
First we create and add event listeners to the ‘toggleSensitivity’ and ‘toggleThief’ buttons. We also add an event listener to the stage to listen for a keyboard event, which will trigger the default action zipperMoveWeak:
The toggleSensitivity button is implemented - it cycles through the sensitivity settings and listens for the appropriate event:
Depending on the sensitivity level, different actions will be taken. This is a snippet of the zipperMoveStrong function, which sets off the alarm as soon as the second point is reached. As can be seen in the following code, each point also sets the zipper element’s new coordinates to represent its movement along the zipper rail:
The reason it dispatches an event at every point after the second, rather than just at the second point, is because of the volatility of the physical prototype. Because in reality, the zipper may not touch each point, it should still set off an alarm at any point past the second.
Previously, the code did not include the ‘if (!isAlarming)’ checks for each dispatch. This raised an error, since there was an issue involved dispatching multiple events when it was already alarming. This prompted these dispatches to be wrapped in this check, to ensure that it only sets off an alarm if the alarm is not already set.
Overall it seems like the prototype is progressing quite well, despite a few challenges and hurdles along the way. Next week it will be interesting to test the prototype and see how it responds to different users’ input.