c_cpp esp8266.tv.ino

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp esp8266.tv.ino相关的知识,希望对你有一定的参考价值。


#define SYNC_PIN 16
#define SIGNAL 5
#define PIN13 13

void setup() {

  pinMode(SYNC_PIN, OUTPUT);
  pinMode(SIGNAL, OUTPUT);
  pinMode(PIN13, OUTPUT);
  digitalWrite(PIN13, LOW);
  //  Serial.begin(250000);
  wdt_disable();


}

void loop() {


  for (int i = 0; i < 262; i++) {
    digitalWrite(SYNC_PIN, HIGH);
    digitalWrite(SIGNAL, LOW);
    delayMicroseconds(1);

    digitalWrite(SYNC_PIN, LOW);
    delayMicroseconds(3);

    digitalWrite(SYNC_PIN, HIGH);
    delayMicroseconds(7);

    digitalWrite(SIGNAL, HIGH);
    delayMicroseconds(22);

    digitalWrite(SIGNAL, LOW);
    delayMicroseconds(23);

  }

  //V-SYNC
  digitalWrite(PIN13, HIGH);
  for (int i = 0; i < 4; i++) {
    digitalWrite(SIGNAL, LOW);
    digitalWrite(SYNC_PIN, LOW);
    delayMicroseconds(28);

    digitalWrite(SYNC_PIN, HIGH);
    delayMicroseconds(4);
  }

  for (int i = 0; i < 4; i++) {
    digitalWrite(SIGNAL, LOW);
    digitalWrite(SYNC_PIN, LOW);
    delayMicroseconds(60);

    digitalWrite(SYNC_PIN, HIGH);
    delayMicroseconds(4);
  }


  for (int i = 0; i < 4; i++) {
    digitalWrite(SIGNAL, LOW);
    digitalWrite(SYNC_PIN, LOW);
    delayMicroseconds(28);

    digitalWrite(SYNC_PIN, HIGH);
    delayMicroseconds(4);
  }


  digitalWrite(PIN13, LOW);
}

以上是关于c_cpp esp8266.tv.ino的主要内容,如果未能解决你的问题,请参考以下文章

c_cpp ESP8266GCodeSender

c_cpp esp8266-webserver.ino

c_cpp esp8266oled.ino

c_cpp sprintf.esp8266.ino

c_cpp ESP8266使用Web服务器或MQTT进行ESP-01继电器控制

c_cpp ESP32-后Data.ino