An archive of community.esquilo.io as of Saturday January 26, 2019.

# IDE disconnects if I am using the UART

dimovi

Any time I try to write to any of the UARTs, the IDE looses connection.
The only way for me to connect again is to remove the sd card where the nut is.
Is this a known issue or am I doing something wrong?
By the way, everything is displayed correctly on the LCD.

This is my current config:
System ID: 000b6c421c09
Hardware: Esquilo Air
EOS version: 0.3.1

Below is the basic code I am running

local lcd = UART(1);
lcd.speed(9600);
lcd.mode(UART_MODE_8N1);

const cmd = 0xFE;
const clr = 0x01;

lcd.write(cmd);
lcd.write(clr);

lcd.write(0x30);
lcd.write(0x31);
lcd.write(0x32);
lcd.write(0x33);
lcd.write(0x34);
lcd.write(0x35);
lcd.write(0x36);
lcd.write(0x37);
lcd.write(0x38);
lcd.write(0x39);

patrick

Is this all of your code, or are you do a background loop?

A long-running loop will starve the IDE if there isn't something like a delay call so the IDE can be serviced. If you do have such a loop, please try adding a delay(100) to it.

dimovi

Thanks a lot!
Adding a delay fixed it. That must have been the issue.