Jake's Computer Science Leaving Cert Writeup
Table Setting

Microbit


Coding Requirments

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.

I then asked the user on python to answer questions to see their wellbeing prior and post walk and by graphing this data I visualise it to help convey it to the user, I then run this well being data alongside my database in a atempt to see if the users well being has improved enough for the walk they took or if they need to seek a different lenght of walk.


What if


What if the user gets negatively impacted by a walk?

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.


What if a user doesnt want to go on a another walk?

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


What if the user is incapable of going on a walk?

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.


Menu

Table Setting

Investigations


Plan

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.

Previous ideas

Sleep Calculator

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.


Breathing Exercise Educator

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.


Fit Bit

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.


Intended Aproach

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.

Aims

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.


Design


Components/Technologies

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

Table Setting

MicroBit

Table Setting

Outlining the Brief

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.



Create

Creation Process

Week 1 and 2

Week 3

Week 4 and 5

Week 6 and 7

Week 8

Week 9-12

Problems and Testing

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.



Table Setting

Evaluations


Final Artifact Evaluation

  • My embedded system utilities analogue and digital inputs and outputs digital and analogue in support of wellbeing.
  • My embedded system validate and stores the data gathered by the embedded system.
  • My code contains and analysis component that attempts to predict whether the user needs another walk and if the user feels better after short or long walks.
  • In python I created a computer model that is based on a personally created dataset, that contains two what if questions.
  • Each of my what if questions have a minimum of three validating parameters with two being different data types.
  • In python I made it so users could view such data in graphical format in the form of the line graph of my what if questions.

End User Needs

  • The user needs to be able to view the data to help motivate them to achieve more.
  • The user needs to feel accomplished with what they have achieved this will bolster the mental wellbeing.
  • The user needs to be able to achieve physical wellbeing that will help bolster the mental wellbeing.

Improvements

There are three improvements I could of made to the code and embedded systems that have come to mind.

  • Make more use of the height variable as I beleive I underused this variable.
  • To make my embedded system upload its serial data continuously as I beleive this is a downside of my code not tracking continous data to make better graphs to showcase more data.
  • Another improvement would be the ability to ascertain wellbeing during the walk itself this would help convey and validate data more.


Word Counter

Microbit What if Investigation Design Creation Evaluation Total
182 152 399 216 444 268 1666

References

This is a template I used to styalise my website.

W3schools templates

I used Neo cities to host my html.

Neo Cities

I used the thonney application to write my python code on.

Thonny

I used the this website to write my microbit code on.

MakeCode.Microbit

I used a line of code from this website.

Stack Overflow