I was looking at the arduino docs trying to figure out how to use it, all I saw was getting lat and lon, how to write the info from a GPS module? I just got a MKR GPS Shield I was trying to use this.
Get the lat/lon from the GPS, assign the data to cloud variables for a floating-point number. Place those variables on a dashboard. Done.
I wanted to use the CloudLocation variable to get the map widget not just 2 floating-point numbers.
Here's a screenshot of the docs page.
The weird thing is that most of the cloud variables have a Read Value and Set Value but this just says under the Set Value section This variable is ready only, what does that mean? Also I would have used the arduino cloud reference in the cloud editor but that would not work.
I don't see any GPS there; they have some sort of GPS coordinates based on location. Maybe it is not available in all locations.
It’s cloudlocation not gps.
NOTE it says GPS. What do you think CloudLocation is if not GPS?
Hi @isaac_boyd.
If you study the example sketches for the "Arduino_MKRGPS" library, and the library documentation, you will learn how to make your Arduino sketches get the latitude and longitude from the MKR GPS Shield.
Start by writing a simple sketch that only gets the latitude and longitude values from the MKR GPS Shield and prints them to Serial Monitor. Don't include any Arduino Cloud IoT code in that sketch. Then upload that sketch to your board and verify that the basic functionality is working as expected.
After that, you can integrate that functionality into your Arduino Cloud IoT Thing sketch, setting the CloudLocation Variable to the latitude and longitude values from the MKR GPS Shield.
You will find an example sketch where that is done here:
https://docs.arduino.cc/arduino-cloud/features/advanced-map/#example-code
Even though it is in the documentation page for the "Advanced Map" dashboard widget, you can use the same approach even if you instead have the "Map" widget in your Arduino Cloud IoT dashboard.
So give that a good try. If you get stuck or encounter any problems, post your full sketch and a detailed description of the problem you are having and we'll provide further assistance.
The information is incorrect. Please disregard it. You can write to the variable in your Thing sketch program as is shown in the example code I linked above.
I have submitted a report to the Arduino documentation team about the error. I apologize for any confusion this has caused.
Thanks for your report. I confirm the bug of the Arduino Language Reference that is integrated into Cloud Editor being empty. I have submitted a formal report to the Arduino Cloud developers.
For now, please use the reference on the Arduino website:
https://docs.arduino.cc/language-reference/
I'll let you know if I receive any news from the developers regarding a fix for the bug.
Thanks @ptillisch that’s what I needed, also thanks for reporting the issue with the reference.
You are welcome. I'm glad if I was able to be of assistance.
Regards, Per

