[SOLVED] V_VOLTAGE
-
When I try to send V_VOLTAGE as a 'long' it works. But, I would prefer to send a float and every time I try this it fails with a compilier warning.
Is there a list of data types that can be sent as V_VOLTAGE?
I am using S_MULTIMETER if that helps at all......
-
@skywatch Perhaps your sketch would have helped see what is going wrong, but here is an abstract from mine, hope this helps:
voltread = analogRead(BatteryIn); float voltage = (7.272 * voltread) / 1024; sleep(5); send(msg3.set(voltage,2));
It is declared as V_VOLTAGE and S_MULTIMETER as yours, but the float is sent to 2 decimal places, as in voltage,2
-
@zboblamont Thank you! - I didn't know if it was possible to send as a float or not.
Now it is working as expected -
1 out of 3
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
Meet in Malmö, Summer 2016?
General Discussion • 1 Feb 2016, 15:34 • bjacobse 4 Mar 2025, 00:29 -
is this project dead?
General Discussion • 7 days ago • perfectom 7 days ago -
Code Garage to the rescue.
General Discussion • 11 Jan 2025, 11:25 • skywatch 7 days ago -
ESP-NOW
General Discussion • 22 Apr 2018, 05:58 • NeverDie 17 Feb 2025, 22:24 -
Is it possible to extract child ID from a just sent message?
General Discussion • 8 Nov 2021, 09:21 • Nigel31 18 days ago