Replies: 1 comment 8 replies
-
@theproff The string e.g. strMsg = uart_meter.read()
decoded = bytes.fromhex(strMsg)
value = float(decoded)
print(value) FYI Please see Welcome (Please read before posting) for how to insert code snippets in posts. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
hi, My name is Tony, im very new to Python.
my problem is im reading data into an esp32 via Uart, the data i get is a string of ascii characters that represent a floating point number.
im trying to convert that string to a physical number to pass onto adafruit via mqtt.
the string consists of: 3735352e3030 this is 755.00 and i cannot get it as a variable, ive tried various ways shown in examples on google but non work
can anyone please help
im using Thonny
this is my code
thanks for any help
Beta Was this translation helpful? Give feedback.
All reactions