Project assistance.

Embedded Systems
Assignment 3
Nursing Bed Alarm
Required equipment

  1. Arduino
  2. Open Smart - Rich Shield
  3. Laptop PC
    In this assignment you’ll use your laptop to send commands to the Arduino and receive results back. You will write an application on the laptop in C# and you will write an application on the Arduino in C.
    A company specialising in products for home care for the elderly has an idea for a product. The new product im-proves safety and comfort of people confined to their beds by giving them controls to change the position of the bed as well as providing an alarm button in case of emergencies and monitoring the room temperature.
    The system consists of three subsystems.
    Subsystem 1: An Arduino system mounted onto the bed. This system is what the patient interacts with.
    Subsystem 2: A small laptop under the bed. This systems interfaces with the Arduino and may forward alarms to the alarm center.
    Subsystem 3: A remote server is the alarm center. This server receives an alarm and sends it to the personnel to take action. We will not build this system.
    You will build subsystem 1 and subsystem 2.
    Functional description
    User interaction with Arduino
    Display mode: Button 1 switches between three display modes.
    Mode 1: The display shows the current time. The time is retrieved from the laptop pc.
    Mode 2: The display shows the current temperature. The temperature is calculated from the on-board NTC or DHT11.
    Mode 3: The display shows the angle of the headrest. Valid values are between 0-30 degrees.
    Alarm button: Button 2 activates an alarm and must work at all times. When the alarm button is pushed the red LED switches on. An alarm is sent to the laptop PC and is shown in the laptop application. The alarm can only be reset from the laptop. When an alarm is reset, the red LED switches off.
    Headrest: The knob increases or decreases the inclination of the headrest of the bed. The angle of the headrest can only be adjusted between 0-30 degrees. When adjusting the headrest the display mode switches automatical-ly to mode 3. You must use the full scale of the knob.
    Other functionality.
    Temperature monitoring: The system monitors the temperature at regular intervals. When the temperature drops below 16°C or rises above 27°C the system also triggers an alarm. It can be the same urgent alarm as with button 2 or a different less urgent alarm. The temperature is sent to the laptop application at regular intervals.
    Laptop application
    You will create an application in C# on your laptop. The laptop application shows:
  4. The current status of the alarm,
  5. a button to reset the alarm,
  6. a history of all alarms,
  7. and the current room temperature.
    The laptop application allows the user to reset an active alarm. When the alarm is reset the red LED on the Ar-duino also switches off.
    The laptop application will send the time to the Arduino when requested. You can get time as a string in C# as follows:
    String time = DateTime.Now.ToString(“HHmm”);
    The application could like something like this:


Also note that people will often NOT help you complete your studies.

Could you please READ THIS POST to help you get the best out of the forum.


You can leave off all of the C# stuff in your posts of requirements. This is an Arduino forum and is here to help with Arduino projects. C# programming is out of scope for the forum.

We gladly help people with their code, but you must do the work and when you have trouble you should post the code that you are having trouble with with a description of what the code actually does and how that differs from what you want.

You have a lot of pieces. Measure angle, display on LCD, measure temperature, sense alarm condition, read a potentiometer (head angle), communicate with laptop, ... Tackle each piece individually. find out how to interface the part and write a small sketch to get it to work. Once you understand each piece it will be easier to combine it all into one program.

Here are some posts on program design and implementation.

This is assignment three of an embedded systems course. The requirements here are relatively advanced so you should be well into the course by now.

You must have previous course material and assignments that used fundamentals that you could apply here, no?

What do you have now?

@grace1010, you have given us the text of your assignment but you have not told us what Arduino assistance you need.