Updating Latitude and Longitude from ThingSpeak Communication Library for Arduino | Arduino | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Updating Latitude and Longitude from ThingSpeak Communication Library for Arduino
No permission to create posts
May 15, 2016
11:18 am
New Member
Forum Posts: 1
Member Since:
May 15, 2016
sp_UserOfflineSmall Offline

The ThingSpeak Communication Library for Arduino has location functions:

ThingSpeak KEYWORD1
begin KEYWORD2
writeField KEYWORD2
setField KEYWORD2
setLatitude KEYWORD2
setLongitude KEYWORD2
setElevation KEYWORD2
writeRaw KEYWORD2
writeFields KEYWORD2
readFloatField KEYWORD2
readIntField KEYWORD2
readLongField KEYWORD2
readStringField KEYWORD2
readRaw KEYWORD2
getLastReadStatus KEYWORD2

I am unable to get these to work.

int setLatitude(float latitude)
Serial.print("ts::setLatitude(latitude: "); Serial.print(latitude,3); Serial.println("\")");
this->nextWriteLatitude = latitude;
return OK_SUCCESS;

* @brief Set the longitude of a multi-field update.
* To record latitude, longitude and elevation of a write, call setField() for each of the fields you want to write, setLatitude() / setLongitude() / setElevation(), and then call writeFields()
* @param longitude Longitude of the measurement (degrees E, use negative values for degrees W)
* @return HTTP status code of 200 if successful. See getLastReadStatus() for other possible return values.
* @see setField(), setLatitude(), setElevation(), writeFields()
* @code
void loop() {
int sensor1Value = analogRead(A0);
float sensor2Voltage = analogRead(A1) * (5.0 / 1023.0);
String sensor3Meaning;
int sensor3Value = analogRead(A2);
if (sensor3Value < 400) {
sensor3Meaning = String("Too Cold!");
} else if (sensor3Value > 600) {
sensor3Meaning = String("Too Hot!");
} else {
sensor3Meaning = String("Just Right");
long timeRead = millis();

ThingSpeak.setField(1, sensor1Value);
ThingSpeak.setField(2, sensor2Voltage);
ThingSpeak.setField(3, sensor3Meaning);
ThingSpeak.setField(4, timeRead);
ThingSpeak.writeFields(myChannelNumber, myWriteAPIKey);
* @endcode

The example from the library however does not work and setLatitude() will not compile

any help with this would be appreciated


Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
18 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

MiguelWap, JamesdinnA, ScottTug, ThomasApesy, RicardoVeque, AlbertRop

Administrators: Hans: 387, lee: 457