For the final Circuits summative, I made a game. Here’s my process of creating the project and my reflection on the summative.

Planning

The Outputs and Inputs: I used five LEDs in my plan: two sequence LEDs (both green) and three status LEDs (yellow, red, and green). The inputs are the A and B buttons.

The Code: Nothing happens until the player starts the game by pressing A and B at the same time. The game would randomly generate a sequence of left and rights (represented with 0s and 1s in the code), and then display the sequence with the two sequence LEDs. The A and B buttons will have to be pressed in the right order for the player to win. If the player wins, the green status LED lights up, and otherwise the red LED lights up.

The Circuit: The left sequence light would be connected to port A4 of the CPX, and the right sequence will be connected to A3. The three status LEDs (yellow, red, and green) would be connected to A5, A6, and A7 in order.

Here’s an image of my plan:

Changes to the Plan

I removed the status LEDs from the plan. This is because the status LEDs are not very important: they don’t add much to the general project, despite requiring three LEDs to be sewn, which I thought was a waste of time when considering what it does for the project. My project stayed true to the plan otherwise though.

Making the Project

The majority of the project was spent on coding and debugging, due to the more complex code needed to make the project. There was a problem: MakeCode did not have wait until condition and repeat until condition blocks, which is what the concept was based on. I had to create a workaround with on event and wait until event blocks that was very delicate: the code would probably break if one block activated half a second slower. It took a while to get the timing right (there was weird reactivations of scripts, and other details that took a while to fix).  After that, the rest of the time was spent on sewing the two sequence LEDs in place. Here are some images of the process:

First LED Sewn

           

Second LED Sewn

The Final Product & My Reflection

Front side of the final product.

Back side of the final product (the stitches and sewing is shown here).

My final product looks rather bland: it does not have any decorative stitches or pieces of felt. I thought about adding letters in felt that says “DEFUSE” below the CPX, a guide to the game on paper pinned to the project, and a lighted string on the CPX to make it look like a bomb, but there wasn’t enough time. In other words, if I had more time, I would add on to the the visual aspect of the project.

In this project, I learned how to sew and make circuits with the CPX (the concept of a common end for multiple separate circuits confused me a bit at first). I also learned how to use the CPX in general. In the future, I think I probably would not be doing much with CPXes, but if I did, I would probably make some more code-focused projects.