Hot answers tagged

7

All Atmel MCU, on which Arduino models are based, include special hardware for serial communication; this part of the MCU is called USART (stands for Universal Synchronous/Asynchronous Receiver/Transmitter). Based on the Arduino model you have, you may have only one (eg on UNO) or more USART (leonardo, mega...) on the board MCU. Each MCU USART is mapped to ...


6

What have you researched so far? Following the link you have given for the shield, about the third line of the description is a reference to the AT Command Set used by the chip. I just did a couple of quick searches through it and found: 2.2.4 ATD><n> Originate phone call to number in memory 3.2.26 AT+CPBF Find phone book entries 3.2.27 AT+CPBR ...


6

Photo by John Boxall Which pins do they use? To determine if two shields are compatible, you have to read the specifications of both shields. The best source for this information is the data sheets supplied with the shields. However there is also this Shield List Can you reassign pins? Some shields provide a means to alter which pins are used for ...


6

There is a simple way of power the module without pressing the button. There is pin call D9 at the bottom right corner of the module. Just power the pin by Arduino digital pin or 5v pin around 3, 4 seconds. Then it will power the whole module. No need to press the press switch. Make sure you connect power(9V-12V) to the board and provide 5V and GND to the ...


6

The best choice for serial communications is obviously the HardwareSerial object, Serial, on pins 0 & 1. However, it is really dedicated to the USB connection (via the onboard Serial-to-USB adapter). There are ways to connect other devices to these pins, but it is an advanced topic, and should not be attempted by beginners. The second best choice ...


5

Unfortunately, no, as the FT232 would have to act as a USB host device. A USB host shield might work if someone has written driver code to support 3G modems.


5

SerialGSM is designed to work with software serial, as you can see that from the class declaration in the SerialGSM.h header: class SerialGSM : public SoftwareSerial { ... }; Unfortunately, changing it to use hardware serial is more complicated than it looks. There are two potential ways you could go about it: Derive from HardwareSerial instead of ...


5

I'll tell you what worked for me, because I didn't find the schematics of this board. But your board may work differently, so it is always good to check the datasheet and the schematic (if you have one). Power Be sure to use an external 5V source that can supply up to 2A without dipping significantly. Code #include <SoftwareSerial.h> ...


4

First of all, you have a typo: You need the double-equals operator in if (c == 'off') { But more importantly, you can't use a char variable to hold or compare more than one character at a time. I don't know the details of the Arduino GSM library, but if sms.read() returns a string, then you'll need a string variable or an array of char to hold the result.


4

If you are finding Cheapest and working module you can you SIM800L less then 4$. aliexpress.com/item/Free-Shipping-Smallest-SIM800L-GPRS-GSM-Module-MicroSIM-Card-Core-BOard-Quad-band-TTL-Serial-Port/32708504554.html You can find many other cheap alternative but they does not work properly. Sim800 have good support and you can find many examples to use ...


4

You have a version2 module. Use AT+CGNSxxx instead of AT+CGPSxxx


4

Its not just a question of the stackability of the shields and the clash of pins you also need to consider what the shields do. Stacking the GSM shield under the LCD is going to restrict is tx/rx power unless you have an external aerial. The LCD will require a large amount of memory and processing power, a 3.5" inch display is really going to push an Uno ...


3

First of all: what is the intention of your setup? What are you trying to measure, what do you want to do with the data? Where is the bucket located, in your backyard or miles away in a forest? I foresee some problems with your current setup. First of all, you need a enclosure that keeps your 'duino and other components dry and at a comfortable temperature....


3

Looking at the PDF for the Adafruit GPS shield, pin 7 is indeed hard wired to Rx and pin 8 is hard wired to Tx. These can not be changed. Looking at the guide for the Arduino GSM shield pin 7 is indeed reserved for modem reset: Digital pins 2, 3 and 7 are reserved for communication between the Arduino and modem and cannot be used by your sketches. ...


3

I would recommend the official Arduino GSM shield.


3

That library should work with pretty much anything that has the M10 module on it. I only have experience with the SIM900 modules. Found the cheapest one on EBay. While interfacing with these things can be a challenge at first, you really just need to read the manual for all the AT commands and execute them. I've written a couple of functions that may help: ...


3

Not many possibilities (for the phone part, I suggest a GPRS/3G shield), but not wanting to discourage you, if you are thinking about "a fleet", forget about: low power (the phone radio needs power, some say you need > 1A for both Arduino plus the shield, depending on your distance to the antenna). you must add the GPS part. Even if you communicate just a ...


3

MQTT Library for SIM800 GSM Modem is available at ElementzTechBlog, ElementzGithubRepository Functionalities: Auto connect Automatically connect to TCP and to MQTT server. connect function This function can be used to connect your client to MQTT broker. Use only if you do not use Auto connect functionality. Optionally you can use username, ...


3

Basically the formatting and layout of your program is completely wrong. You haven't actually defined this smsReceivingFunction anywhere. You have created a prototype to it part way through your loop() function, but not created the actual function. You should learn to strictly indent your program properly. It is important, since by doing so you can ...


3

Send sms when motion is detected by a PIR sensor Yes, write a function that does this. Basic support functions in libraries will help you send the sms and detect the PIR. You need to provide the logic. Send sms to only a particular group of cell phones. If the question is if the GSM module supports group send the answer is no. You will have to ...


3

Yes, you can. There is two methods of making shields stackable: Use the quite hard to source extra long pinned headers to go right through and down (such as these https://www.adafruit.com/products/85) , or Use separate headers and pins and (if you are using through hole) offsetting them. Your shield uses the second method, but the descending pins haven't ...


3

There are 3 possible causes that I can think of (it's difficult to say more without further details): SW bug: this is hard to confirm without actually finding the bug, but it might cause a lock-up and trigger a watchdog reset (do you have a watchdog running?) or a pointer error cause a jump to some memory location along the boot path (not so likely, I ...


3

The code appears to be looking for an SMS that says #a0 or #a1. The logic doesn't look very robust, though. It reads a character, then waits 10ms and tries to read another. What does SIM900.read() do if there is no next character? Will it return something? Or wait until there is another? If it waits, the code can get out of sync with incoming, badly-formed ...


3

It can take a while for a modem to register on the network - sometimes several minutes. Turning on CREG URCs can help you monitor what is happening: AT+CREG=1 You should now start getting +CREG notifications as the network status changes. Before using AT+COPS? you should really select a reporting mode so you know what you are looking at. I prefer ...


3

I am 90% sure it's a power issue. Not sure on what board/module you're using but the SIM800L/SIM900 needs a burst of current of 2 A during 577 µS (See the manual). Try using 4700 µF and a 10 µF capacitor in parallel with the module. Powering it with a proper power source instead of the Arduino wouldn't hurt too.


3

If serial data is coming in, and your code is doing a delay, the incoming data is stored in a buffer (of 64 bytes). But if you wait too long, the buffer will fill-up. Once it's full, any further incoming serial data isn't stored, and will be lost. In your third output example, you get exactly 63 characters. Which is the maximum size a 64-byte cyclic buffer ...


3

You should consider connecting one Arduino to the GSM module, and connect the 4 Arduinos together using SPI, I2C, or any other inter-hardware comms protocol. Before I knew these options existed, I once wrote a bit of code to send data between Arduinos by having one pin represent the data being sent and another pin changing every time a new bit was available. ...


2

Before we start, note that it might not be the right pinout for the GSM shield to use a hardware serial port on the Mega. Beware of some nasty wiring. Poking around on Github, I found this is the directory for the GSM library. Ladies and gentlemen, it's time to break something important get our hands dirty! Draw your chairs close for a tale of touching ...


2

Here is what I found: You need to have a special character like "*" (a delimiter), from which important data will flow through. char z = '*'; int s=0; void setup() { // usual initialization } void loop() { if (client.available()) { char c = client.read(); // Serial.print(c); if (z == c) { s=1; } if(s == 1) { ...


2

After you send the GET request, you read the response to fill the char result [20] variable you declared: int i=0; ... if (client.connect(server, port)) { client.print("GET /locator.php?"); ... Serial.println("\nCOMPLETE!\n"); // Read response from server i=0; while (client.available()) { result[i] = client.read(); Serial.print(result[...


Only top voted, non community-wiki answers of a minimum length are eligible