hello
please i need code to turn on and off my led with sim800L/arduino
i use many source code but not working with me
my RX in 10
my Tx in 11
My pin led 5V in 13
i have this code but i havent TX AND RX
and my led turn on 20s and turnoff 20s automatic so i need one led control with message text like ON for TURN ON and OFF for TURN OFF
استخدم مترجم جوجل. اكتب وصفك لما تريد القيام به باللغة العربية ودع جوجل يترجم النص العربي. ستحصل على إجابات أسرع وأفضل بكثير إذا كتبت وصفًا تفصيليًا ودقيقًا باللغة العربية ثم تركت ترجمة جوجل تقوم بالترجمة.
i use Google translate. Write your description of what you want to do in Arabic and let Google translate the Arabic text. You will get much faster and better answers if you write a detailed and accurate description in Arabic and then let Google Translate do the translation.
upload this code and test if the initialisation is working.
This code is doing a most basic check if the communication works at al
and it will print the content of received SMS-messages
So as a first step lets see if this is wokring
/* Copyright to AyushMarsian(Ankit Ghevariya)
* Licence GNU GPL V3
*
* Example for read SMS from perticular location of memory
* Written by Ankit Ghevariya, public domain
*
* You have to connect pin as written below
* (GSM) --------- (Arduino)
* Vcc --------> 3.8v to 4.2v (Do not give 5v(Damage) or 3.3v(Under voltage))
* RST --------> Digital 9 (Optional, only if you want to perform hardware reset)
* TxD --------> Digital 10
* RxD --------> Digital 11
* Gnd --------> Gnd
*/
#include <SIM800L.h>
#include <SoftwareSerial.h>
SoftwareSerial GSMserial(10, 11); // RX, TX
SIM800L gsm;
String message="";
void setup()
{
Serial.begin(9600);
GSMserial.begin(9600);
if(gsm.begin(GSMserial)) // Will return 1 if GSM responds and SIM card inserted then
{
Serial.println("GSM Initialized");
}
else
{
Serial.println("GSM not responding");
while(1); // Infinite loop, code will not execute other stuff
}
message=gsm.readSMS(1); // Read a SMS from location 1 and store content into message variable.
if(message.length()==0)
{
Serial.println("Message is Empty");
}
else
{
Serial.print("Message :");
Serial.println(message);
}
}
void loop()
{
}
not working bro
but i cant find output for give 5v to my LED ? and messages too like if i send ON my led turn ON or when i send OFF my led will turn off
ما هي صعوبة استخدام مترجم جوجل ؟؟؟؟؟ إذاً ، كفرصتك الأخيرة: اكتب بالعربية العربية العربية واكتب وصفًا طويلًا جدًا جدًا لما تريد القيام به وما اختبرته حتى الآن
السلام عليكم
شكرا لك على مجهودك يا أخي
أنا أتوفر على قطعة
arduino uno+ sim800l
أريد إرسال رسالة نصية من الهاتف بها كلمة تشغيل ON
ليشتغل المصباح
و لا ينطفى حتى أرسل رسالة بها كلمة إيقاف off
عندما يشتغل المصباح أتوصل برسالة في رقمي الحاص به لقد إشتغل المصباح و عند التوقف أتوصل برسالة بها لقد توقفت
AH OK I UNDERSTAND NOW THANK YOU
Thank you for your effort, brother
I have a piece
arduino uno+ sim800l
I want to send a text message from the phone with the word ON
To turn on the lamp
And it does not turn off until I send a message with the word “off”
When the lamp turns on, I receive a message in my number. The lamp is on, and when I stop, I receive a message saying it has stopped.
this code NOT WORKING because if i use it my relay Turns on automatically after every 20 seconds and turns off after 20s all times without any message from my phone
thank you stefan my friend help me for fix it
btw my problem not in code
my problem is my power source in sim800L i need to power of 5V 2A but me im using 5v 0.5A