I created a embedded system that will ask if the user is feeling mentally and or physically unwell and then if the user activates the system it shall start a timer and a step tracker with an additional function to include the users height, once the walk is concluded and the data is gathered it is then moved using the serial port extension to transfer it to python in which it stores and validates the data to see if it fits within standard parameters, it shall then predict whether or not the user requires another walk or their wellbeing shall improve the most from longer singular walks.
If a user is negatively impacted by a walk, it shall showcase a graph of this data to allow a better understanding of this data and then suggest to the user a short break from any activities since it might affect their mental well being.
In the case in which the user does not wish to go on a additional walk to reach optimal wellbeing levels the code shall advise them to take a short break from any activities
If the user is incapable of going on a walk, The microbit shall encourage them to be active in minor ways they are capable of as not all people are in proper fitness to go for a walk.
For my Computer Science project I planned to design an embedded system in the form of a microbit and an interactive website on HTML to locate my writeup within, To make this project as concise as possible I have narrowed my selected ideas down to three and for each of these ideas I shall go over the positives and negatives of each idea, I will then discuss the specific details and how I will go about achieving my goals.
My first idea was a sleep calculator, this would intake many variables such as sound, light, noise and movement. These being key indicators of sleep quality I would use two micro bits for this particular project due to one being required to be attached to a limb to trace movement but if that limb were to be below an object such as a blanket this could skew the results so the second one would be placed on anything close to the bed aslong as it was face up, this proved to be a disadvantage to the the idea due to the complex nature of this type of code.
The reason I did not do this project was because I do not beleive it would allow me to gather the nessecary data to answer any What If questions and any data for surveys or graphs.
My third idea for a fitbit was to try ascertain the users wellbeing and prompt them to go on a walk and then if the user goes on said walk it will track the steps and time to ascertain the quality of the walk this entire system could take place on a single microbit this being an advantage.
For my project I chose to do the Fitbit idea, I intend to achieve this using a singular microbit which will ask if the user wants to go on a walk then account steps upon shaking and start a global time counter upon the start of the walk and hopefully a height based variable to attmept to find out physical health.
For my project I aim for the project to display graphs and data to showcase to the user the impact of walking and how it imrpoves their mental welbeing, I also aim to learn the designing skills during the completion of this project.
The only component I used in my project was a strap to attach the microbit to the user to make it wearable to make gathering the step data easier, This was the only external component needed because I used built in components, being the accelerometer used to track steps by sensing the sudden acceloration and stopping of the users limbs to get the "steps" data and with both of the other two variables were gathered from user input and a timer function, this design lacked need of any real external components primarily relying on software.
Python
MicroBit
My fully automated embedded system is a fit-bit style system designed to track steps, time and height and use these inputs to promote wellbeing through physical health by promoting walking, it would then store this data and ensure it fits within proper parameters, It would then ascertain mental wellbeing before and after the walk the calculate and graph mental wellbeing increase or decrease this information is then used to try predict what would be better for the users mental wellbeing then using my python developed computer model off a personally created dataset of wellbeing data it then tries to explain away two what if questions I myself have devised.
In order to test if the code could validate the data, I purposely inputed incorrect data. The first of these incorrect peices of data were negative numbers the code corrrected this by changing it to equal a teriary variable and only taking the positive. The second being non integar data in the form of numbers in a string the code would inturn change these values to integars if possible.
A problem I encountered and overcame was during the process of making python intake serial as I had an issue if a value equalled zero due to how my code worked making it so a zero would loop this would not work, in order to rectify I changed the code to instead look for when the variables are not none.
An important peice of code in my project is in the serial code as I am trying to get the data for a reason I still havent fiqured out why it would not give me the data, In order to remedy this issue I remade how the serial shall read the data and made it so if the zero collumn's row equaled for example "height" then x equals the next column of the data on that row.