Project for a healthcare monitoring system

Hi, I just started learning how to use the Arduino a week ago and am stuck with my project.
I am suppose to create a healthcare system for elderly who are living alone and all the data are to be sent to a social worker wirelessly. I have already done a temperature sensor monitoring as well as a sensor for taking of medication. The problem i face now is using the ESP8266 WiFi module in my programs and hardware for wireless transmission of data. I am currently using the RF 433MHz Transmitter and Receiver now and do not know how to proceed with the ESP8266.
Would appreciate if someone can help me with the programming and configuration on how to in-cooperate the ESP8266 into my project.
Attached is the hardware that I have done, as well as the text document for the coding of my medication sensor (there isn’t enough space for the coding here)
Below is the transmitter and receiver coding for the temperature sensor.

TRANSMITTER CODING FOR TEMPERATURE

#include <LiquidCrystal.h>
#include <Wire.h>
LiquidCrystal lcd(10, 9, 5, 4, 3, 2);

#include <RH_ASK.h>
#include <SPI.h>
RH_ASK rf_driver;

const int sensorPin = A0; // the pin that the temperature sensor is connected to

const int buttonPin = A2; // the pin that the 'Up' push button is connected to
const int buttonPin1 = A1; // the pin that the 'Down' push button is connected to
int buttonPushCounter = 26; // counter for the number of button presses
int buttonStateA2 = 0; // current state of the 'Up' button
int buttonStateA1 = 0; // current state of the 'Down' button
int lastButtonState = 0; // previous state of the button

const int redLED = 8;  // the pin that the Red LED is connected to
const int greenLED = 7;  // the pin that the Green LED is connected to

void setup(){
Serial.begin(9600); // open a serial port
pinMode(6, OUTPUT); // output of LCD
pinMode(greenLED, OUTPUT); // output of Green LED
pinMode(redLED, OUTPUT); // output of Red LED
pinMode(buttonPin, INPUT); // input from Up push button
pinMode(buttonPin1, INPUT); // input from Down push button
lcd.begin(16,2);
rf_driver.init();
}

void counter(){                             // coding for the 'Up' and 'Down' buttons
buttonStateA2 = digitalRead(buttonPin);

if(buttonStateA2 != lastButtonState){
 if(buttonStateA2 == HIGH){
   buttonPushCounter++;
   Serial.print("counter: ");
   Serial.println(buttonPushCounter);
 }
}
lastButtonState = buttonStateA2;

buttonStateA1 = digitalRead(buttonPin1);

if(buttonStateA1 != lastButtonState){
 if(buttonStateA1 == HIGH){
   buttonPushCounter-=1;
   Serial.print("counter: ");
   Serial.println(buttonPushCounter);
 }
}
lastButtonState = buttonStateA1;
}

void temperature(){
//temperature for TMP36GZ formula can be found on the internet

int sensorVal = analogRead(sensorPin);
Serial.print("sensor Value: ");
Serial.print(sensorVal); 

float voltage = (sensorVal/1024.0) * 5.0;
Serial.print(", Volts: ");
Serial.print(voltage);

float temperature = (voltage - .5) * 100;
Serial.print(", degrees C: "); 
Serial.println(temperature);

Serial.print("counter: ");
Serial.println(buttonPushCounter);

if(temperature < buttonPushCounter){
 digitalWrite(greenLED, HIGH);
 digitalWrite(redLED, LOW);

 lcd.setCursor(0,0);
 lcd.print("Temp = ");
 lcd.print(temperature);
 lcd.setCursor(0,1);
 lcd.print("Temp Set = ");
 lcd.print(buttonPushCounter);
 delay(1000);
 lcd.clear();
 
 lcd.setCursor(0,0);
 lcd.print("Temp is ok");
 delay(1000);
 lcd.clear();
 
 const char*msg = "Patient's temperature is ok!";
 rf_driver.send((uint8_t *)msg, strlen(msg));
 rf_driver.waitPacketSent();
 delay(50);
} 
else if(temperature > buttonPushCounter){
 digitalWrite(greenLED, LOW);
 digitalWrite(redLED, HIGH);
 
 lcd.setCursor(0,0);
 lcd.print("Temp = ");
 lcd.print(temperature);
 lcd.setCursor(0,1);
 lcd.print("Temp Set = ");
 lcd.print(buttonPushCounter);
 delay(1000);
 lcd.clear();
 
 lcd.setCursor(0,0);
 lcd.print("Temp is not ok");
 lcd.setCursor(0,1);
 lcd.print("Pls visit Doctor");
 delay(1000);
 lcd.clear();
 
 const char*msg = "Patient's temperature is not ok!";
 rf_driver.send((uint8_t *)msg, strlen(msg));
 rf_driver.waitPacketSent();
 delay(50);
}
}

void loop(){
counter();
temperature();
}

RECEIVER CODING FOR TEMPERATURE

#include <RH_ASK.h>
#include <SPI.h> 

RH_ASK rf_driver;

void setup() 
{
 rf_driver.init();
 Serial.begin(9600);
}

void loop()
{
 uint8_t buf[32]="";
 uint8_t buflen = sizeof(buf);
 if (rf_driver.recv(buf, &buflen))
 {
   Serial.print("Message Received: ");
   Serial.println((char*)buf);         
 }
}

MedicationArduinoCoding.txt (7.42 KB)

Start off on the right foot, read this: How to use this forum.

I can’t speak to the ESP8266 yet (I do have a ESP8266/UNO on order), but what are your plans for handling the data for the person on the receiving end?

zoomkat: I can't speak to the ESP8266 yet (I do have a ESP8266/UNO on order), but what are your plans for handling the data for the person on the receiving end?

Thank you for replying :) I am not entirely sure what you mean, but based on my understanding of your questions; My plans are for the social worker to understand and keep track of the elderly's conditions ( examples: daily temperature monitoring; scheduled medication, etc). So if the elderly show any abnormal symptoms, the social worker would be able to react promptly as the data is sent whenever the system has collected data.

dougp:
Start off on the right foot, read this: How to use this forum.

Apologies and thank you for telling me how to use the forum. Its my first time.

"My plans are for the social worker to understand and keep track of the elderly's conditions"

So how is the social worker going to get the information? Via web page, text message, email, another Arduino wifi setup?

zoomkat: "My plans are for the social worker to understand and keep track of the elderly's conditions"

So how is the social worker going to get the information? Via web page, text message, email, another Arduino wifi setup?

To receive through another Arduino wifi setup and collated through excel. Thank you

Is all this equipment to be in one location?

Just a bit of FYI, you might consider using MQTT for your data transmissions to a centralized unit. The centralized unit can be used as the MQTT Broker (sever) and, with some code, a message processing center.

I have a Raspberry Pi 4 that runs as my MQTT Broker and message processor. The message processor is a Python program.

I have 4 ESP32's scattered through the house and outside. The ESP32 outside is a weather station. One ESP32 controls my Air conditioner. I can go to my website, get outside weather info and make adjustments to my Air Conditioner unit.