Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

alvarodecadiz9 on Simulator in Java to send datas to ThingSpeak

$
0
0

Hello everyone.

I am developing a simulator in Java for send datas to ThingSpeak (this simulator aims to generate some behaviors when students lead a good way to study).To do this, I have chosen to send ThingSpeak values such as zero or one to indicate that person is studying or sleeping for a certain time.

The problem is that in the second iteration of ScheduledFuture gives me a value other than the first. For example, if the first iteration I get:

  • Student "Pablo Ruiz" will study for 6 minutes -> ThingSpeak Value = 1
  • Student "Luisa Aguilar" will study for 3 minutes -> ThingSpeak Value = 1

In the second iteration, I get:

  • Student "Pablo Ruiz" will study for 3 minutes (when it should have a value of 6) -> Thingpeak Value = 1
  • Student "Luisa Aguilar" will study for 3 minutes -> ThingSpeak Value = 1

How could I fix this?

The code is the following: http://bit.ly/25FBDsi

Thank you very much in advance.


Viewing all articles
Browse latest Browse all 1833

Latest Images

Trending Articles



Latest Images