Quantcast
Channel: ThingSpeak IoT Community - Forum: Arduino
Viewing all 172 articles
Browse latest View live

Mahathirz on Upload two values to ThingSpeak with a Arduino GSM Module?

$
0
0

Hi Icar, 

Can I have your email cause I wanna do the same project like you but know nothing. Seems like your coding used some Deutsch language which I kinda not understood. Confused


beingakash on Sending Data from SD Card to Thing Speak in Batches

$
0
0

Hello Everyone,

I want to send the data stored in SD card in batches to thing speak channels but I am not able to figure out how to send it.

Please help me in sharing a code or information so that I have a brief idea of the connectivity operation.

Help in this regard would be really appreciated.

Cheers

Akash Gupta

cstapels on Sending Data from SD Card to Thing Speak in Batches

$
0
0

Have a look at the getting started tutorial, it will take you through the process step by step of setting up a channel, getting data from another channel, and then processing and visualizing that data. After that short study, you should be ready to check out the device examples for an example based on the hardware you want to use.  You will need some kind of device to read from the SD card, such as an Arduino, RPi, or some other processor.

The bulk update will let you send larger batches of data in one REST API call.

rico72 on Read back status of ThingSpeak with Arduino

$
0
0

Hi,

 

I'm using a Arduino Mega with a Ethernet Shield. The last 10 months it worked great. But this month data is missing in the graphs. I've reset-ed the Arduino and updated the ThingSpeak library to 1.2.1. and now it only sends a very limited number of data points and then stops.

Is there a method/command to put a read-back in the Arduino code to see on the Serial.plotter how ThingSpeak response to my write action?

(I have put the data I'm sending to ThingSpeak on the Serial.plotter and it seems the right values).

cstapels on Read back status of ThingSpeak with Arduino

$
0
0

The thingSpeak communication library function ThingSpeak.writeField will return the HTTP status 200 if the transaction was successful.  See the example for Arduino prototyping in the examples section.  You can use a separate function for writing such as the one below.  Then output the value of writeSuccess that is returned by this function to your serial monitor.  If returns 200 or 202, you are good.  

int writeTSData(long TSChannel,unsigned int TSField,float data,char* ReadAPIKey){
int writeSuccess = ThingSpeak.writeField(TSChannel, TSField, data, writeAPIKey); //write the data to the channel
return writeSuccess;
}

What library are you using for your wifi connection?

rico72 on Read back status of ThingSpeak with Arduino

$
0
0

Thank you for the response. I will try this.

Today just a few fields of a single channel were filled. Which is strange because I'm sending all eight fields of a single channel at once.

And to answer your question: I'm not using Wifi but just a wired connection. My Arduino is located next to my router so that was the easiest.

Vinod on Read back status of ThingSpeak with Arduino

$
0
0

You may also want to look at the memory occupied by your code on the Arduino. If your code, or one of the libraries you use, is leaking memory or doing dynamic memory allocation, and the code is already occupying a high percentage of available memory, the allocation of memory at runtime can overwrite the program and result in behavior like this.

One way to check this is to run your code on an Arduino compatible device that has more memory such as the MKR1000. If you see that the code behaves correctly on a device with more memory, I believe there is a high chance that your code is overwriting program memory at runtime.

rico72 on Read back status of ThingSpeak with Arduino

$
0
0

I just opened the log file it shows 3 things:

1) At start (first few minutes) I see on one channel WriteSuccess = -401 instead of 200

2) One channel is giving regular writeSuccess = -302 instead of 200

3) The channels that report back 200 do not always update all 8 fields. Some times half of them are updated.

 

Vinod I looked at the MKR1000 but to use that one I have to change my sensor inputs. At this moment I'm using 12 analog inputs. Sadly the MKR1000 has only 7 inputs.Is there another way to see if I have a problem with the memory? At this moment I dump the data also to the serial output just as commond before I send it to ThingSpeak, and it shows the right values on the Serial-monitor, but not in ThingSpeak.

 

I'm trying now to remember what I have changed (it worked great for almost a year)... the one thing that pops up is that I have added a serial-sensor as well. Directly connected to one of the serial inputs of the Mega. Is the ThingSpeak Arduino library using serial bus somewhere?


JasonW on Read back status of ThingSpeak with Arduino

$
0
0

That is a very odd problem you are having.  I second Vinod's idea about running out of resources.  Because the write operation occurs at the same time for all the fields, it is puzzling how some fields are getting updated and others aren't.  A corrupted string could be the reason.

Vinod on Read back status of ThingSpeak with Arduino

$
0
0

rico72 said

I'm trying now to remember what I have changed (it worked great for almost a year)... the one thing that pops up is that I have added a serial-sensor as well. Directly connected to one of the serial inputs of the Mega. Is the ThingSpeak Arduino library using serial bus somewhere?  

Can you try reverting to your old Arduino sketch (without changing any hardware connections) and seeing if the problem still occurs. That will help isolate if it is a software issue. Next step would be then to go to a setup without the new sensor and seeing if that configuration of old hardware + old software gets you the correct behavior. The only reason I suggest this is to rule out hardware interrupts from the newly added sensor messing with the data transmission to ThingSpeak.

rico72 on Read back status of ThingSpeak with Arduino

$
0
0

So the first results seems to be indeed pointing to a memory problem.

During one day I have left out the serial sensor. And it reported to ThingSpeak without any problems.

And the second day I have connected only the serial sensor and I logged also on Thingspeak the free Ram available in the Arduino memory. And that last logging was interesting. Over roughly one hour the free RAM in the Arduino went down from 3500 bytes to 200 bytes. And at that moment the sensor data was no longer visible on ThingSpeak (only empty fields were available in the downloaded CSV file).

 

So I have to check the library of the serial sensor to see what happens there.

 

Thank you very much for your support.

JasonW on Note for WiFi101 and MKR1000 users

$
0
0

Yes it should work continuously. I had it running for a few hours.

Viewing all 172 articles
Browse latest View live