Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to clean UART string
#3
>>> foo = b' All is well '
>>> foo.decode()
' All is well '
>>> str(foo, encoding='utf8')
' All is well '

bytes.decode() docs
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
How to clean UART string - by Joni_Engr - Dec-03-2021, 11:36 AM
RE: How to clean UART string - by BashBedlam - Dec-03-2021, 12:27 PM
RE: How to clean UART string - by buran - Dec-03-2021, 12:27 PM
RE: How to clean UART string - by DeaD_EyE - Dec-03-2021, 02:02 PM
RE: How to clean UART string - by deanhystad - Dec-03-2021, 05:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  UART write binary code trix 3 381 Apr-28-2024, 04:57 PM
Last Post: deanhystad
  UART & I2C slow down a loop trix 4 702 Dec-28-2023, 05:14 PM
Last Post: trix
  Can i clean this code ? BSDevo 8 1,027 Oct-28-2023, 05:50 PM
Last Post: BSDevo
  Clean Up Script rotw121 2 1,056 May-25-2022, 03:24 PM
Last Post: rotw121
  UART Serial Read & Write to MP3 Player Doesn't Work bill_z 15 5,967 Jul-17-2021, 04:19 PM
Last Post: bill_z
Smile send hexadecimal package variable UART santos20 2 2,224 Oct-30-2020, 11:40 AM
Last Post: Larz60+
  wrong data reading on uart fahri 6 3,451 Sep-29-2020, 03:07 PM
Last Post: Larz60+
  How to clean session mqtt SayHiii 0 2,042 Dec-09-2019, 07:56 AM
Last Post: SayHiii
  how to clean up unstarted processes? Skaperen 2 2,282 Aug-27-2019, 05:37 AM
Last Post: Skaperen
  sched.scheduler -> clean denisit 1 2,917 Nov-28-2018, 09:52 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020