Development Documentation
Mental Health is an important aspect of everyday life that is often overlooked in everyday life. Simply taking stock of how you feel on any given day is incredibly beneficial to mental health and continued well-being. This, coupled with the fact that I only had a potentiometer due to a late toggle switch, led me to design a box that allows the user to rate their day.
I decided early on to use the lights on one half of the board as a scale that the user could adjust. I then designed a simple box with a slit cut out of it from which these lights will shine through. The box would have a scale by the slit and faces to correlate negative emotions on one side and positive emotions on the other. The user is prompted to move the potentiometer to a value that represents their emotional state at the end of the day.
Then I began the task of coding and hooking up the board so that it would function properly. Due to the late arrival of my board, this was my first experience with MakeCode which delayed my development, but eventually I got it all figured out. Once I had it coded and working on the board I began the creative aspect of the project.
I decided to use a cardboard box to house the project, but I quickly determined that a drab cardboard box wouldn't convey what I wanted with this project so I painted it a pastel blue to liven it up. I then cut all the holes and wrote on it with sharpee to convey the meaning of the box. Once the box was assembled, I secured the board and potentiometer in with tape and hid the wires underneath.
Video of functionality
https://www.youtube.com/watch?v=a-0rLOVXBH0&feature=youtu.be
Technical Documentation
The box is very simple, it has one potentiometer that tracks the position of the knob and lights the board up in response. The potentiometer only takes in values between 0 and 512, as that is equal to half of the board and I only needed 5 values for my scale. Also having a semi-circular scale is more readable than a complete circle for my purposes.
In MakeCode, I set up a series of if else statements in a forever loop as I couldn't find an easy way to do switch statements in MakeCode with the time I had. Each statement corresponds to the five equivalent sets of numbers between 0 and 512 and sets the light to a specific position when it's within a given fifth of the range. I also made sure to attach the petentiometer in a way that the user can track the movement of the light by the direction the potentiometer is facing, which also helps with conveyance. All in all, I feel like the project came together nicely and I learned a lot through the experience.



Comments