Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reading text Data from a USB Serial Device in Python on a raspberry pi.

vrdriver/Serial-PI-thon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“‘ Raspberry Pi Serial to Web Poster

This Python script runs on a Raspberry Pi (or any Linux system) and:

  1. Reads incoming text data from a serial port (e.g. a USB-connected device such as a pager, sensor, or microcontroller).
  2. Detects when the incoming data changes.
  3. Saves each unique line to a local CSV log file.
  4. Sends each unique line as an HTTP POST request to a remote web server for further processing.

πŸ›  Features

  • βœ… Works with /dev/serial/by-id/... or /dev/ttyUSB0
  • βœ… Filters out duplicate lines (only sends new data)
  • βœ… Logs timestamped entries to test_data.csv
  • βœ… Sends data to a remote PHP/HTTP endpoint via requests.post()
  • βœ… Handles serial decoding issues gracefully
  • βœ… Recovers from most runtime errors without crashing

🧰 Requirements

  • Python 3.x
  • Installed Python packages:
    pip install pyserial requests

About

Reading text Data from a USB Serial Device in Python on a raspberry pi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages