You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
608 B
30 lines
608 B
|
|
#include "config.h"
|
|
|
|
TTGOClass *ttgo;
|
|
|
|
void setup()
|
|
{
|
|
Serial.begin(115200);
|
|
ttgo = TTGOClass::getWatch();
|
|
ttgo->begin();
|
|
ttgo->openBL();
|
|
|
|
//! begin motor attach to 33 pin , In TWatch-2020 it is IO4
|
|
ttgo->motor_begin();
|
|
|
|
ttgo->tft->fillScreen(TFT_BLACK);
|
|
ttgo->tft->setTextColor(TFT_WHITE, TFT_BLACK);
|
|
ttgo->tft->drawString("Please touch screen", 50, 100, 2);
|
|
|
|
//attach touch screen interrupt pin
|
|
pinMode(TP_INT, INPUT);
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
if (digitalRead(TP_INT) == LOW) {
|
|
ttgo->motor->onec();
|
|
delay(200);
|
|
}
|
|
}
|