I'm working on this new project wireless nurse calling system using multiple 433mhz transmitters & single receiver. The project has a 4 digit 7 segment display as Main Console & many remotes with 2 buttons & HT12E connected to 433mhz transmitter.
I have found an example code for receiving the data & displaying on the 7 segment display, but now the problem I have is when multiple patients have called I want to display each number one after another with some delay until they have been attended by nurse & numbers been cleared from the display.
The obvious solution would be to put the caller data into an array when it is received to form an action queue and to display data relating to each level of the array in turn at intervals, timed using millis() so that the receipt of new messages is not blocked. You will need a mechanism on the receiver to acknowledge that the call has been actioned and to remove the call from the action queue held in the array
I dd this a few years back but using POCSAG pager modems.
The code isn’t too hard.. maintain an array of our callers- ideally a strict so you can also track other things like battery level and call type etc.
When a call is received, you can copy the callers ‘index’ into a queue that you walk through until no alarms are true. a beep is raised only when new alerts are added to the ‘queue’
The battery and ‘urgency’ flags can be used to sort the members - so that a heart attack is given higher priority than a toilet call etc.
Yo-yo can manually clear individual queue members while the list is being displayed, or the caller can use a second button to cancel a call from their room./bed side.
This is the sketch I'm using & getting the addressInteger displayed on 4 digit 7 segment display.
there are 2 buttons on my remote 1 for call & other for clear the display.
I’m glad this is an assignment only, i’d hate to think Charlie’s water call, caused Mildred’s death !
Generally we don’t write code for college assignments, as it’s seen as ‘cheating.
’.
Depending on your budget, you can ask the mods to move this thread to the Paid Consultancy section.
The strategy I mentioned earlier works and is compliantm with nursing care requirements in my region.
the display routine can use millis() to determine when to update the display with a patient. an index indicates the patient to display from a list. no need to display anything is the list is empty. increment the index after each display update. the index remains the same if # of patients is 1