d4niele / Esp32Sim800L

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Esp32Sim800L

Prototipo per connettere la schedina ESP32 a internet attraverso un modulo SIM800L https://nettigo.eu/system/images/1935/original.jpg?1479816092

Utilizzo il seguente codice per testare:

import gsm
gsm.start(tx=17,rx=16,apn="mobile.vodafone.it") #sostituire eventualmente con i numeri di pin corretti
gsm.ifconfig()
gsm.status()
gsm.connect()
gsm.status()
gsm.ifconfig()

Se invece voglio solo mandare sms lo posso fare anche utilizzando la versione ufficiale di micropython:

from machine import UART
import time
ser = UART(2,  tx=17, rx=16)
ser.init(9600, bits=8, parity=None, stop=1)

def sendsms(to, message):
    ser.write('ATZ\r')
    time.sleep(1)
    ser.write('AT+CMGF=1\r')
    time.sleep(1)
    ser.write('''AT+CMGS="''' + to + '''"\r''')
    time.sleep(1)
    ser.write(message + "\r")
    time.sleep(1)
    ser.write(chr(26))
    time.sleep(1)

Link utili

https://www.treccarichi.net/2016/06/sim800l/
https://www.instructables.com/id/ESP32-SIM800L-and-Barrier-Sensor/
https://articulo.mercadolibre.com.co/MCO-487675426-modulo-celular-gsm-gprs-esp800l-sim800l-sim800-arduino-5v-_JM
https://lastminuteengineers.com/sim800l-gsm-module-arduino-tutorial/
https://randomnerdtutorials.com/power-esp32-esp8266-solar-panels-battery-level-monitoring/ https://randomnerdtutorials.com/esp8266-voltage-regulator-lipo-and-li-ion-batteries/

https://community.hiveeyes.org/t/micropython-libraries-for-the-sim800-module/1492

https://howtoraspberrypi.com/sim800l-gsm-gps-raspberry-2/

About


Languages

Language:Python 100.0%