What if you are out of your home (and/or in another country) and suddenly realise that you have forgotten to turn off the geyser, lights and other electrical appliances? This costly mistake can increase the electricity bill as well as put your and others lives in danger.Â
Fear not. We are going to make an IoT-based cellular device for home automation, which will help you in controlling your home appliances, no matter where you are.
Bill Of Material
Coding
Install the Adafruit Fona library in Arduino IDE. Inside this library, set the serial and reset pins for the SIM 800L module, and after that, set its baud rate to 4800 in the setup function.Â
Now, we will create a loop where we check the incoming message and with the help of the if condition, we will set a function for the command to be sent from message. (Refer Fig 2,3,4,5).
Now, we will upload the code to Arduino IDE and connect the components as given in the circuit diagram.
Connection
Now connect the components as in pic below
Testing
Insert any SIM card (that supports 2G network) in the SIM800L module and connect any appliance through a relay. Now, send the message consisting of commands to the phone number (of the SIM card).Â
Here, I have used the lights on/off command for turning the lights on or off. You can set any command in the code, which you can control using SMS.
plz send me how many resent work existing on this topic
and advantage &disadvantage
Can I use this code for stm32 bluepill.
You need to do some changes as per your STM32 blue pill Pinouts