Skip to content

Commit ee4ed57

Browse files
authored
Merge pull request #30 from arduino/sebromero/catm1-small-changes
Small rephrasings in CatM1 cheat sheet
2 parents f3061dc + 7939d98 commit ee4ed57

File tree

1 file changed

+15
-17
lines changed
  • content/hardware/04.pro/shields/portenta-cat-m1-nb-iot-gnss-shield/tutorials/cheat-sheet

1 file changed

+15
-17
lines changed

content/hardware/04.pro/shields/portenta-cat-m1-nb-iot-gnss-shield/tutorials/cheat-sheet/cheat-sheet.md

+15-17
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,13 @@ To check if our setup it's working we can open an example sketch from the GSM li
6363

6464
Make sure you go to the `arduino_secrets.h` tab and:
6565
* 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.
6769

6870
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.***
7073

7174
### API
7275

@@ -92,7 +95,7 @@ This library contains some commands that are quite different, that's because it
9295
#### Connect to Your Provider
9396

9497
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.
9699

97100
This sketch will initialize the SIM card and connect to your provider's network
98101

@@ -183,7 +186,7 @@ void loop() {
183186
184187
### Requirements
185188
186-
The GSM Feature requires:
189+
The GPS Feature requires:
187190
* 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.
188191
* 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)
189192
@@ -193,7 +196,7 @@ Make sure you go to the `arduino_secrets.h` tab and:
193196
* introduce the PIN of the SIM card you are using and store it at `SECRET_PIN`.
194197
* Browse to your IT provider and check the mobile APN link, e.g "online.provider.com" save it inside the `SECRET_APN`
195198
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.***
197200
198201
### API
199202
@@ -211,12 +214,10 @@ Make sure you go to the `arduino_secrets.h` tab and:
211214
212215
#### Get GPS Data
213216
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`
216218
Open the example by going to **Examples > GSM > GNSSClient**
217219
218-
The sketch:
219-
```cpp
220+
```arduino
220221
#include <GPS.h>
221222
#include <GSM.h>
222223
@@ -241,42 +242,39 @@ The sketch:
241242
}
242243
243244
void loop() {
244-
if(GPS.available()){
245+
while(GPS.available()){
245246
Serial.print((char) GPS.read());
246247
delay(1);
247248
}
248249
249250
delay(1000);
250251
}
251252
```
252-
***As you previously done, you need to set up the GSM info and fill the `arduino_secrets.h`***
253253

254254
***Remember to connect to the GSM provider and secondly connect to the GNSS (mandatory).***
255255

256-
You will see the **NMEA** data on the Serial monitor.
256+
You will see the **NMEA** data in the Serial monitor.
257257
![NMEA log example Serial Monitor](assets/NMEA_output.png)
258258

259259
#### Low Power GPS
260260

261261
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:
265263

266264
```cpp
267265
//Start the GPS module
268266
GPS.begin();
269267

270268
// Print data
271-
if(GPS.available()){
269+
while(GPS.available()){
272270
Serial.print((char) GPS.read());
273271
delay(1);
274272
}
275273

276274
//stop and disable the GNSS engine
277275
GPS.end();
278276
```
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()`.
280278
281279
## Conclusion
282280

0 commit comments

Comments
 (0)