Quick update, since all usb types that support Touchscreen don't have a Serial option i added
Code:
Keyboard.print("Hello World ");
just before
i noticed a weird behavior like the Teenssy become non-responsive for couple of seconds and it write something like this
Hello WWWWWWWWWWWWWWWHello WWWWWWWWWWWWWWHeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeello WHello WWWWWWWWWWWWWWWHello WWWWWWWWWWWWWWWH
first thoughts was that the delay might be blocking something so i tried it with millis()
Code:
int yoffset = 500;
unsigned long lastDebounceTime = 0;
unsigned long debounceDelay = 5000;
void setup() {
TouchscreenUSB.begin();
}
void drawline(int x, int y) {
lastDebounceTime = millis();
for (int i=0; i < 1000; i += 10) {
TouchscreenUSB.press(0, x + i, y + i/13);
delay(10);
}
TouchscreenUSB.release(0);
}
void loop() {
if ((millis() - lastDebounceTime) > debounceDelay) {
drawline(600, yoffset);
yoffset += 120;
if (yoffset > 1000) yoffset = 500;
Keyboard.print("Hello World ");
lastDebounceTime = millis();
}
}
unfortunally that did not change anything, still i'm getting something like:
Hello WWWWWWWWWWWWWWWHello WWWWWWWWWWWWWWWHello WWWWWWWWWWWWWWWHello WWWWWWWWWWWWWWWHello WWWWWWWWWWWWWWWH