Example Code for Arduino-Send SMS (Library)

Last revision 2026/01/24

The article provides a comprehensive guide on how to send SMS using Arduino with the SIM808 library. It covers hardware and software preparations, including installation steps, and offers a detailed explanation of the function commands to send SMS effectively.

Hardware Preparation

Software Preparation

Preparations

  1. Install library to Arduino-1.5.*\libraries (not Documents\Arduino\Library)
  2. Upload sample sketch File > Examples > SIM808 > SendSMS
  3. Open Serial Monitor (9600 baud, Newline)
  4. Send the receiver number after you see the message GSM initialized
  5. Send a message after you see the message Now, enter SMS...
  6. After a while the receiver will receive the message

Result

DFR0355_send_sms_serial_sender

DFR0355_send_sms_serial

Function Explanation

  • sms.beginSMS(): Send the transformed number to SIM808 module
  • sms.print(): Print the message to be sent, and it will send the message into SIM808 module
  • sms.endSMS(): Finish the message-delivering task

Was this article helpful?

TOP