PickyBiker
Well-known member
The following code blinks the led in the teensy 4.0 once per second but if the TFT.Begin() command is executed, the LED won't blink. The Teensy is still running because the Serial print keeps going, but no blink and no change of status in the LED pin.
What is going on?
What is going on?
Code:
// The display uses hardware SPI, plus #9 & #10
#define TFT_RST -1 // dont use a reset pin, tie to arduino RST if you like
#define TFT_DC 9
#define TFT_CS 10
unsigned long t, prevT;
Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC, TFT_RST);
/***************************************************************************************************************/
void setup(void)
{
Serial.begin(115200);
delay(250);
pinMode(LED_BUILTIN, OUTPUT);
// tft.begin();
// tft.setRotation(1);
// tft.fillScreen(0xff00);
// tft.setTextColor(0xffff);
// tft.setTextSize(3);
}
void loop()
{
t = millis();
if (t - prevT >= 1000)
{
Serial.println(digitalRead(LED_BUILTIN));
if (digitalRead(LED_BUILTIN) == HIGH)
digitalWrite(LED_BUILTIN, LOW);
else
digitalWrite(LED_BUILTIN, HIGH);
prevT = t;
}
}