7/3/2023 0 Comments Esp8266 serial port com weird![]() Update: You may also want to take a look at my notes on messaging system in the esp8266 SDK, and how it can potentially be used for this application. Or the UART will be configured with 74KBPS (which is a pretty odd value). You can still use the old function to transmit: uart0_tx_buffer(data,strlen(data)) Īs always you need to init the UART in user_init with something like: uart_init(BIT_RATE_9600,BIT_RATE_9600) I’ve only built out reading a single character, but it should be easy to build more general functions on top of that. Or if you just want to echo received characters: int c = uart0_rx_one_char() UART data can then be received as follows: int c = uart0_rx_one_char() (update, I’ve put a tarball which a complete echo example here. Only uart.c has been changed significantly. You can download my update files here: uart.c, I built this out a bit so I could read serial data from the circular buffer. There an example uart.c knocking around, but the receive code is incomplete. The esp8266 SDK manual and examples are pretty poor.
0 Comments
Leave a Reply. |