1
0
forked from tanchou/Verilog

Refactor UART testbench and top-level modules; remove old testbench files, enhance UART communication in top_ultrason_uart, and implement LED control via UART in top_led_uart. Add Python scripts for UART communication and data reading.

This commit is contained in:
Gamenight77
2025-04-17 18:00:54 +02:00
parent 897f829e40
commit 65cf0e8232
13 changed files with 142 additions and 39776 deletions

View File

@@ -0,0 +1,15 @@
import serial
import time
ser = serial.Serial('COM6', 115200)
ser.timeout = 1
# Boucle pour lire les données du port série
while True:
if ser.in_waiting > 0:
data = ser.read(1)
distance = int.from_bytes(data, byteorder='little')
print(f'Distance reçue : {distance} cm')
ser.close()