Skip to content

Instantly share code, notes, and snippets.

View xpj's full-sized avatar

expee xpj

View GitHub Profile
@xpj
xpj / sim800l.ino
Last active June 12, 2022 19:02
Arduino Mega with SIM800L
#include <SoftwareSerial.h>
/* Tutorial link: https://pijaeducation.com/arduino/gsm/send-receive-messages-using-sim800l-with-arduino/
Create software serial pins: pin 2 as RX & 3 as TX
Connect SIM800L module Rx to Pin 3 (Tx) of Arduino & Tx to Pin 2 (Rx) of Arduino
*/
/*
Not all pins on the Mega and Mega 2560 boards support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). Not all pins on the Leonardo and Micro boards support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
*/
#define rx 10