0 votes
by (280 points)

I am trying to get the display to dim between 10:00 pm and 7:00 am. I tried the following code to no avail. What am i missing??

 if(hour()> =7 && hour()<=10) {
      analogWrite(TFT_LED,255);
      } else {
      analogWrite(TFT_LED,40);      //dim backlight between 10:00pm and 7:00am
  }

1 Answer

+1 vote
by (9.6k points)
selected by
 
Best answer
I'm afraid that our displays don't support back light dimming. This has todo with the inner workings of the TFT_LED pin...

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...