Last active
August 5, 2025 03:49
-
-
Save dewomser/0d0b32d880582f841473cfcc050c9095 to your computer and use it in GitHub Desktop.
Multimeter PDM-300-C2 von Parkside Lidl und die serielle Schnittstelle als Durchgangsprüfer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Mehr Info: https://www.mikrocontroller.net/articles/Multimeter_PDM-300-C2_Analyse | |
| import serial | |
| # Modify the port name to match your serial port | |
| port = serial.Serial('/dev/ttyUSB0', 2400, timeout=1, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE) | |
| # Read data from the serial port | |
| while True: | |
| # Read 2-byte preamble | |
| preamble = port.read(2) | |
| # Check if the preamble is correct | |
| if preamble == b'\xdc\xba': | |
| # Read the 6th byte | |
| data = port.read(10) | |
| sixth_byte = data[5] | |
| # Print the 6th byte | |
| print(f"The 6th byte is {sixth_byte}") |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ist ein einfaches Beispiel . Dieses Script funktioniert nur mit dem Durchgangsprüfer. Werte 0 und 255 .
Bing-Chat hat dabei geholfen.