Example Assignment
Example Assignment
Apply Computational to
Solve a Simple Problem
This problem is about a wearable device that monitors peoples vital signs and
they fall below a safe level then the alarm will be activated and a message is
sent to the carer. When they wear the device if their systolic blood pressure
goes above maximum then the alarm will also be activated.
If the wearable devices detect a sudden fall, then the alarm will also alert the
carer. If the wearable devices enter a safe level between 90 and 190 then the
alarm should not go off.
The alarm is activated if their systolic blood pressure goes above a maximum or
their breathing is interrupted. It can also go off if the accelerometer detects a
sudden fall.
A wearable device monitors a persons vital signs. If they fall below a safe level an
instant message is sent to request help from a carer.
However, it does not go off due
to blood pressure or a fall if
another carers wearable
device is detected within 2 Between 90 & 190
meters. If the blood pressure
is above being between 90 and
190 then the alarm will not
activate. The sensor should
allow possible inputs with a
minimum of 50 and a
maximum of 250.
Truth Table
Above I have included a truth table to reflect the problem. I have demonstrated all combinations that
could trigger the alarm to go off and not off.
Design a detailed programming solution
Start
Sensor Input
Yes
Alarm
Accelerometer No
detects sudden fall
sudden fall
No
finish
START
No
Are they Alarm
breathing Yes
No
Blood Pressure Alarm
Yes
Below minimum
Yes
Blood Pressure Alarm
No
above maximum
Yes Alarm
Accelerometer No
detects sudden fall
FINISH
Test Plan
Blood Pressure
Blood
Pressure
Not TEST
Breathing
Patient
Falls
Refinements Before
I have included an image below of before I have the recommended improvements to my health
device. This is what it looks like before as you can see there is an image of the wearable device
with the code.
The image that I have included below is a refinement image as you can see I have read what
Karan has written in the feedback and I have added an extra two buttons to my wearable
device this improve the user experience of the device because its lets you know that the device
is connected to each others. I have made this improvement because it has been recommended
that I add to extra buttons as you can see from the image below I have included two extra
buttons.
Another refinement that I have made is I have added a reset button to my health device so this
will reset the device back to 0. Below you will see a screenshot. This screenshot shows below
that I have not yet added the test button to my wearable device.
The screenshot below shows that I have added a reset button to my wearable device. As you
can see this device did not have a reset button before and now I have successfully added a
reset button this has been done because it will improve the user experience when they are
using the health device.
Link to Refined Version of health device: https://scratch.mit.edu/projects/141323313/