Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我有一个带有 Adafruit TFT 触摸屏的 Arduino mega 2560,我现在正在使用 tft 库来写我的东西。我想知道是否有关闭屏幕(省电)的功能,然后实现一个物理按钮重新打开它?我该怎么做呢?谢谢。
您无法直接开箱即用地控制背光。查看 AdaFruit 网站上的链接:
控制背光
您将需要用刀和烙铁对您的 TFT 屏蔽进行物理更改(但焊接工作应该很容易)。
至于使用物理按钮唤醒它——是的。对您来说还有好消息,因为您使用的是 Mega,您可以连接到 I/O 引脚!(使用 UNO 会更困难)。
因此,您可以添加一个按钮开关接地并将 pinMode 设置为 INPUT_PULLUP。