assign variable for the data read from channel

2 vues (au cours des 30 derniers jours)
Ayesha Madhushani
Ayesha Madhushani le 1 Nov 2019
Hello every one, first of all sorry about my English. I'm doing a project on water consumption and billing system.I got data from flow sensor sent it to thingspeak channel and it worked correctly. I have some trouble in the billing part. I need to assign a variable for the read data by thingspeak channel from a start time to end time.Because water consumption is always calculated within a time period.And it has to be done periodically.I have set time control it worked correctly. But I don't know how to set start time and end time.I need my program to run automatically without setting a specific data and time.Ex: It should run everyday at a specific time(ex:9.00pm) so that i can get water consumption and bill for that day.To do that I need to sustract the water consumption used today from the total value of water used flow through the flow meter.Please help me with this.

Réponse acceptée

Christopher Stapels
Christopher Stapels le 7 Nov 2019
If you have a time control set for a specific time, that should take care of the running at a specific time. You could probably read one day worth of entries at once for your calculation. If you want to read a specific date range, see the thingSpeakRead documentation and look up the daterange name value pair. If you show the code you have so far, or share some data from your channel, we may be able to help better.
  1 commentaire
Ayesha Madhushani
Ayesha Madhushani le 8 Nov 2019
thankyou for your answer.i'll try that way...

Connectez-vous pour commenter.

Plus de réponses (0)

Communautés

Plus de réponses dans  ThingSpeak Community

Catégories

En savoir plus sur Prepare and Analyze Data dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by