Can the feed accept decimals?
Moderators: adafruit_support_bill, adafruit
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- kampto
- Posts: 100
- Joined: Sun Feb 21, 2016 12:51 pm
Can the feed accept decimals?
I have set up a feed and it sends integers fine and they are fed. But Adafruit IO will not display decimals numbers.. Is this correct?
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Can the feed accept decimals?
you can send any string, the library may have to format it into a string and that may require some noodling
- kosmonooit
- Posts: 4
- Joined: Thu Nov 12, 2015 2:43 pm
Re: Can the feed accept decimals?
But what does the mqtt broker expect to see, and what gets displayed in the Ada IO feeds?
I had the same questions trying to get my feed to work, but could not find any specs in this regard.
I had the same questions trying to get my feed to work, but could not find any specs in this regard.
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Can the feed accept decimals?
it just sees a raw 'string' of data
- kampto
- Posts: 100
- Joined: Sun Feb 21, 2016 12:51 pm
Re: Can the feed accept decimals?
Im using REST API method with Feather ESP8266 board and Arduino IDE. Why do I need a string to get a floated value to display in the AIO?
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Can the feed accept decimals?
not sure about REST but as for MQTT, the client sends a string, and then its up to the server to parse that out. if you graph the data, the string will be parsed for graphing
- kampto
- Posts: 100
- Joined: Sun Feb 21, 2016 12:51 pm
Re: Can the feed accept decimals?
But what does a string have to do with the AIO not displaying floated (decimal) values? So in conclusion the AIO can only display integers and not decimals? Which is not going to work if your monitoring LiPo battery voltage that range between 3 to 4 Volts.
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Can the feed accept decimals?
not sure of what you're asking but you could always send the data in millivolts, then you range from ~2500 to 4300
- kampto
- Posts: 100
- Joined: Sun Feb 21, 2016 12:51 pm
Re: Can the feed accept decimals?
I can ask it in a more simple way. Can Adafruit IO dashboard plots display numbers with decimals, Yes or No?
My finding suggest No and you previous Answer suggests no as well.
My finding suggest No and you previous Answer suggests no as well.
- adafruit2
- Posts: 22200
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Can the feed accept decimals?
not sure about the plots, but the *feed* should be able to store decimal. I'll ask the maintainer
- uniontownlabs
- Posts: 112
- Joined: Wed Dec 17, 2014 10:56 pm
Re: Can the feed accept decimals?
you should be able to graph any decimal values. see attached image:
- Attachments
-
- decimal.png (103.77 KiB) Viewed 400 times
- Karl33to
- Posts: 2
- Joined: Mon Jan 11, 2016 3:37 pm
Re: Can the feed accept decimals?
Kampto, the rest library has a bug with float values, if you look in the git issues there has been a fix posted which seems to work well.
https://github.com/adafruit/Adafruit_IO ... ll/2/files
https://github.com/adafruit/Adafruit_IO ... ll/2/files
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.