[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 - πŸ™‚


Log in to reply
 

Suggested Topics

  • 3
  • 5
  • 4
  • 2
  • 8
  • 2
  • 3

298
Online

9.0k
Users

9.7k
Topics

101.8k
Posts