Answered step by step
Verified Expert Solution
Question
1 Approved Answer
the codes here does not work properly by sending the message to a dedicated phone number , how can i make them to work properly
the codes here does not work properly by sending the message to a dedicated phone number how can i make them to work properly by instantly sedn a message when specified conditions are met
#include
SoftwareSerial mySerialTXRX;
int msensor A;
int mvalue ;
int relay;
int LED;
int LED;
void wait
delay;
void SendInformation
Serial.begin;
Serial.printlnAT;
wait;
Serial.printlnATCMGFr;configure SIM to TEXT mode
wait;
Serial.printlnATCMGS;
wait;
Serial.printlnHabari Shamba lako linamwagiliwa lipo salama.";
wait;
Serial.printlnchar; End AT command with a Z ASCII code
Serial.flush;
void SendMessage
Serial.begin;
Serial.printlnAT;
wait;
Serial.printlnATCMGFr;configure SIM to TEXT mode
wait;
Serial.printATCMGS;
Serial.println;
wait;
Serial.printlnHabari shamba lako lishamwagiliwa lipo salama kuwa na
Amani.";
wait;
Serial.printlnchar; End AT command with a Z ASCII code
Serial.flush;
void setup
Serial.begin;
Serial.printlnKaribu Drip Irrigation"; Test the serial monitor
pinModemsensor INPUT;
pinModerelay OUTPUT;
pinModeLED OUTPUT;
pinModeLED OUTPUT;
mySerial.begin; Setting the baud rate of GSM Module
Serial.begin; Setting the baud rate of Serial Monitor Arduino
delay;
void loop
mvalue analogReadmsensor;
Serial.printlnmvalue;
Serial.printUnyevuMoisture:;
if mvalue
digitalWriterelay LOW;
digitalWriteLED HIGH;
digitalWriteLED LOW;
SendInformation;
else
SendMessage;
digitalWriterelay HIGH;
digitalWriteLED LOW;
digitalWriteLED HIGH;
delay;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started