UART using ESP32 WROOM 32
Posted: Wed Mar 20, 2019 4:03 pm
Hey guys, new to the forum. I'm kinda new regarding the ESP32 so I'm starting the learning curve.
Right now I'm having issues while trying to get communication wit a Ublox 6M GPS. I've already connected everything, however when I try to get a response via UART I'm not getting anything, right now the code looks like this:
#DATA GPS READER
from machine import UART, Pin
import utime
import os
#pin nummber, baud
#Guessing baud rate between GPS, ESP module
uart = UART(1, baudrate=9600, bits=8, parity=None, stop=1, tx=32, rx=33, rts=-1, cts=-1, txbuf=256, rxbuf=256, timeout=500)
now = utime.ticks_ms()
sentence=uart.readline()
#printing machine name...
idName = os.uname().machine
print(idName)
if uart.any():
print("im getting something...")
b = uart.read()
else:
print("nothing yet...")
I keep getting the "nothing yet..." response, so I don't know what may be happening. Also, I doubled checked everything is connected as it should be. Thanks a lot for your help
Right now I'm having issues while trying to get communication wit a Ublox 6M GPS. I've already connected everything, however when I try to get a response via UART I'm not getting anything, right now the code looks like this:
#DATA GPS READER
from machine import UART, Pin
import utime
import os
#pin nummber, baud
#Guessing baud rate between GPS, ESP module
uart = UART(1, baudrate=9600, bits=8, parity=None, stop=1, tx=32, rx=33, rts=-1, cts=-1, txbuf=256, rxbuf=256, timeout=500)
now = utime.ticks_ms()
sentence=uart.readline()
#printing machine name...
idName = os.uname().machine
print(idName)
if uart.any():
print("im getting something...")
b = uart.read()
else:
print("nothing yet...")
I keep getting the "nothing yet..." response, so I don't know what may be happening. Also, I doubled checked everything is connected as it should be. Thanks a lot for your help