divide the sent data by 100

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.
Locked
weal
 
Posts: 87
Joined: Sun Sep 29, 2019 12:30 am

divide the sent data by 100

Post by weal »

Is there any way to divide the sent data by 100?
I use Sigfox.and I have sent data as int16_t.

User avatar
eherrada
 
Posts: 161
Joined: Thu Jan 04, 2018 4:59 pm

Re: divide the sent data by 100

Post by eherrada »

I don't think so, although I may be completely wrong. If I were you I'd just divide it by 100 before you send it.

User avatar
sj_remington
 
Posts: 997
Joined: Mon Jul 27, 2020 4:51 pm

Re: divide the sent data by 100

Post by sj_remington »

Have you thought about actually dividing by 100?

e.g.

Code: Select all

x_data = x_data/100;

weal
 
Posts: 87
Joined: Sun Sep 29, 2019 12:30 am

Re: divide the sent data by 100

Post by weal »

Thank you for your replies.
In some platforms allow dividing/100 or do some coding on their platform to decode the data (especially if you using Lora and Sigfox).

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: divide the sent data by 100

Post by brubell »

weal wrote:Thank you for your replies.
In some platforms allow dividing/100 or do some coding on their platform to decode the data (especially if you using Lora and Sigfox).
Yep - platforms like TheThingsNetwork allow a device to encode data prior to sending to the platform, and then the platform provides a scriptable decoder to handle decoding. Adafruit IO does not implement a decoder, the value field must be processed before it is sent to IO.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”