ernestum / VSync

Library to synchronize variables between Arduinos and Processing sketches.
http://ernestum.github.io/VSync/
GNU General Public License v3.0
24 stars 4 forks source link

Sending Doubles #4

Open cookn opened 7 years ago

cookn commented 7 years ago

this seems to only work for integers is there a work around to make it work with doubles? i have to send data that is more accurate than the closest whole number

ernestum commented 7 years ago

There is indeed a dirty workaround. Multiply your number by 1000 before you send it and then divide by 1000 again on the receiving side (use floating point division, not integer division)