IOT-MCU/ESP-12S-A9-A9G-GPRS-Node-v1.0 ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple Arduino sketch for an ESP 12S board connected to an A9 or A9G GSM GPRS module.

I want it to power up, talk to the modem with AT commands, check that the module is working, read GPS location when it has a fix, and be able to send that location by SMS. If possible, also include a basic way to send the same data to an MQTT server over GPRS.

Please keep it practical and easy to upload in the Arduino IDE, with clear setup values at the top for phone number, APN, MQTT info, and serial pins. It should print useful status messages to the serial monitor so I can see what is happening during startup and while it is trying to get a GPS fix or connect to the network.

If you need to, look up the current AT command docs online and make the code tolerant of the A9 and A9G differences.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab