Introduction: Arduino and SIM900 Shield. User-friendly.
This tutorial is just an example of adding some user-friendly features to projects based on SIM900 shields. It could be used either for testing a new board or as a part of some other Arduino-project.
The idea came to me when I was playing around with my new SIM900 shield. I tried some sketches that I could find on the Internet. All was fine except there were fixed or predefined phone numbers, messages, etc. in them. I needed more flexibility. What if I plug in the "SIM900+Arduino" sandwich to my netbook and communicate with it by means of the serial monitor, giving commands and receiving answers after SIM900 has done some actions?
So, I began to experiment with chars and strings and finally got a working sketch.
Step 1: Prepare the SIM900 Board
A detailed description for the shield could be found here:
First of all, to use software power on/off management for our board, we have to solder two JP pads, that are very close to D9. After that, SIM900 will automatically start when it's powered without any need for pressing the power button. Furthermore, we can check the state of the board using AT-command from time to time and keep it working in case it will hang and not respond.
Step 2: Load the Sketch and Go!
To have some interactivity we need Arduino to listen both to SIM900 serial output and the serial input from the user. If SIM900 outputs something, Arduino will process the output and decide what to send to the serial monitor. If the user types some predefined command with parameters (e.g. 'sms +79123456789 test message' Arduino will transform this into SIM900 command to send it to someone). Furthermore, there is an RTC clock on the SIM900 shield. It's good to be able to receive the time from it and to change it just typing 'set time=15/04/15,20:12:00'.
OK, we can also provide an option to program some parameters in EEPROM (as Arduino UNO has 512 bytes of it). So, when we cut the power, Arduino will remember these parameters to use them as some constant values or triggers.
In fact, I just composed 2 different sketches, one for SIM900 operation, another one to demonstrate EEPROM trick.
So load the sketches and enjoy!
YliasE made it!
We have a be nice policy.
Please be positive and constructive.