Python Forum
How can I add an end line character after every value that I receive?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I add an end line character after every value that I receive?
#8
(Mar-03-2022, 11:04 AM)Larz60+ Wrote: you should only initialize ports once and close at the end of your session.
see: https://pyserial.readthedocs.io/en/lates...intro.html
Hi,

Thanks for the suggestion. But I am a bit confused, I am only initializing the ports once I believe.
By "closing at the end of your session" do you mean after the loop breaks (or after the file is filled with data and closed)?
Or do you mean in general, like at the end of the code, when I am done with everything?
Basically, in my case, I am running the code until the battery pack (power bank connected as power supply to RPi) gets dead, so I believe all the ports get reset when RPi is powered up gain.
Please correct me if I am wrong somewhere. Thanks.
Reply


Messages In This Thread
RE: How can I add an end line character after every value that I receive? - by GiggsB - Mar-06-2022, 07:07 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to receive rtmp video in Python? aksdjfh 0 426 Feb-27-2025, 02:58 PM
Last Post: aksdjfh
  Guidance for the basic concept send/receive a heartbeat signal StefanL38 1 1,713 Jun-09-2024, 05:31 PM
Last Post: Gribouillis
  Receive Input on Same Line? johnywhy 8 2,661 Jan-16-2024, 03:45 AM
Last Post: johnywhy
  How to continuously receive messages until specified to stop using Bleak jacobbreen25 3 4,121 Dec-28-2022, 04:25 PM
Last Post: jacobbreen25
  Writing string to file results in one character per line RB76SFJPsJJDu3bMnwYM 4 3,784 Sep-27-2022, 01:38 PM
Last Post: buran
  How to receive webcam capture on spout? buzzdarkyear 2 3,634 Jan-12-2022, 02:26 PM
Last Post: buzzdarkyear
  [solved] unexpected character after line continuation character paul18fr 4 6,971 Jun-22-2021, 03:22 PM
Last Post: deanhystad
  new line character project_science 3 2,904 Jan-01-2021, 02:32 PM
Last Post: project_science
  SyntaxError: unexpected character after line continuation character siteshkumar 2 4,202 Jul-13-2020, 07:05 PM
Last Post: snippsat
  Regex won't replace character with line break Tomf96 2 3,437 Jan-12-2020, 12:14 PM
Last Post: Tomf96

Forum Jump:

User Panel Messages

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