Search found 23 matches
- Mon Jul 25, 2022 2:42 pm
- Forum: General Discussion and Questions
- Topic: UART reading data issue
- Replies: 8
- Views: 12830
Re: UART reading data issue
Check your ground connection as this can sometimes cause issues. Looking at your code, is it possible you are reading data from the buffer before the full 9 bytes are available? Have you tried reading exactly 9 bytes with: res = uart.read(9) or if the data from your sensor has a carriage return you...
- Mon Jul 25, 2022 11:59 am
- Forum: General Discussion and Questions
- Topic: UART reading data issue
- Replies: 8
- Views: 12830
Re: UART reading data issue
Check your ground connection as this can sometimes cause issues. Looking at your code, is it possible you are reading data from the buffer before the full 9 bytes are available? Have you tried reading exactly 9 bytes with: res = uart.read(9) or if the data from your sensor has a carriage return you...
- Sun Jul 24, 2022 5:15 am
- Forum: General Discussion and Questions
- Topic: UART reading data issue
- Replies: 8
- Views: 12830
UART reading data issue
Hi, I use UART 1(GPS Uart) to communicate with RS485 Modbus. It works fine on REPL(Run the code line by line) But in main.py, It cannot read data properly(some bytes are missing and some are corrupt except the first 2 bytes) even though I put sleep before reading or use while-loop. uart.any() return...