You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/04.pro/shields/portenta-cat-m1-nb-iot-gnss-shield/tutorials/cheat-sheet/cheat-sheet.md
+15-17
Original file line number
Diff line number
Diff line change
@@ -63,10 +63,13 @@ To check if our setup it's working we can open an example sketch from the GSM li
63
63
64
64
Make sure you go to the `arduino_secrets.h` tab and:
65
65
* Enter the PIN of your SIM card and store it at `SECRET_PIN`.
66
-
* Check the mobile APN of your SIM card provider, e.g "online.provider.com" and save it inside the `SECRET_APN`
66
+
* Check the mobile APN of your SIM card provider, e.g "online.provider.com" and save it inside the `SECRET_APN` You can find it by searching Google for APN + provider name.
67
+
68
+
APN stands for 'Access Point Name'. An APN is a gateway between a cellular network and the Internet.
67
69
68
70
After finishing this setup compile and upload the program. If everything went fine you should see the HTML content of the web page printed in the serial monitor.
69
-
***Note: Sometimes it takes time to connect to the provider's APN, please be patient, it can take up to 30 minutes. If you cannot connect after that time, make sure you entered the correct SIM pin and the APN. If the issue persists, contact your provider and make sure they have CAT M1 enabled on your SIM card.***
71
+
72
+
***Sometimes it takes time to connect to the provider's APN, please be patient, it can take up to 30 minutes. If you cannot connect after that time, make sure you entered the correct SIM pin and the APN. If the issue persists, contact your provider and make sure they have CAT M1 enabled on your SIM card.***
70
73
71
74
### API
72
75
@@ -92,7 +95,7 @@ This library contains some commands that are quite different, that's because it
92
95
#### Connect to Your Provider
93
96
94
97
You need to enter the Pin code and the APN link of your provider.
95
-
The user name and password depends on the provider you have.
98
+
The user name and password depend on your provider. They are required to authenticate with the APN gateway. The values can usually be found by searching Google for APN crediantials + provider name. Sometimes they can be left blank.
96
99
97
100
This sketch will initialize the SIM card and connect to your provider's network
98
101
@@ -183,7 +186,7 @@ void loop() {
183
186
184
187
### Requirements
185
188
186
-
The GSM Feature requires:
189
+
The GPS Feature requires:
187
190
* A GPS active antenna (e.g [GPS active antenna 28dB](https://www.digikey.com/en/products/detail/adafruit-industries-llc/960/5353630)) at the **GNS ANT** antenna connector on the Top side of the shield.
188
191
* You may need a connector converter from the active GPS antenna, we used this one [Coaxial to SMA](https://www.digikey.com/en/products/detail/taoglas-limited/CAB.719/3664639)
189
192
@@ -193,7 +196,7 @@ Make sure you go to the `arduino_secrets.h` tab and:
193
196
* introduce the PIN of the SIM card you are using and store it at `SECRET_PIN`.
194
197
* Browse to your IT provider and check the mobile APN link, e.g "online.provider.com" save it inside the `SECRET_APN`
195
198
196
-
>**Note:** Sometimes it needs time to connect to the provider's APN, please be patient, it can take up to 30 minutes. If you can not connect after that time, make sure you introduced the correct SIM pin and the APN, if the issue continues, contact with your provider and make sure they have CAT M1 enabled on your SIM card.
199
+
***Sometimes it takes time to connect to the provider's APN, please be patient, it can take up to 30 minutes. If you can not connect after that time, make sure you introduced the correct SIM pin and the APN, if the issue continues, contact with your provider and make sure they have CAT M1 enabled on your SIM card.***
197
200
198
201
### API
199
202
@@ -211,12 +214,10 @@ Make sure you go to the `arduino_secrets.h` tab and:
211
214
212
215
#### Get GPS Data
213
216
214
-
We included an example inside the GSM example that connects to the GSM provider, then initialize the GPS antenna, gets the data and print it out on the Serial monitor.
215
-
217
+
The following example connects to the GSM provider, then initialize the GPS antenna, gets the data and print it out on the Serial monitor. As you previously done, you need to provide the GSM data by filling in the secrets in `arduino_secrets.h`
216
218
Open the example by going to **Examples > GSM > GNSSClient**
217
219
218
-
The sketch:
219
-
```cpp
220
+
```arduino
220
221
#include <GPS.h>
221
222
#include <GSM.h>
222
223
@@ -241,42 +242,39 @@ The sketch:
241
242
}
242
243
243
244
void loop() {
244
-
if(GPS.available()){
245
+
while(GPS.available()){
245
246
Serial.print((char) GPS.read());
246
247
delay(1);
247
248
}
248
249
249
250
delay(1000);
250
251
}
251
252
```
252
-
***As you previously done, you need to set up the GSM info and fill the `arduino_secrets.h`***
253
253
254
254
***Remember to connect to the GSM provider and secondly connect to the GNSS (mandatory).***
255
255
256
-
You will see the **NMEA** data on the Serial monitor.
256
+
You will see the **NMEA** data in the Serial monitor.
257
257

258
258
259
259
#### Low Power GPS
260
260
261
261
The GPS antenna is active, that means that it needs power to function as it has electronics inside of it.
262
-
One way to save power on your project is enabling only the GPS module when it is needed to read the data.
263
-
264
-
You can do so as follows:
262
+
One way to save power on your project is to enable the GPS module only when it is needed to read the data:
265
263
266
264
```cpp
267
265
//Start the GPS module
268
266
GPS.begin();
269
267
270
268
// Print data
271
-
if(GPS.available()){
269
+
while(GPS.available()){
272
270
Serial.print((char) GPS.read());
273
271
delay(1);
274
272
}
275
273
276
274
//stop and disable the GNSS engine
277
275
GPS.end();
278
276
```
279
-
***By using this method, you don't need to initialize the GPS inside the `setup()`***
277
+
By using this method, you don't need to initialize the GPS inside the `setup()`.
0 commit comments