DWIN Box

Программа DWIN Box - http://ardublock.ru/dwin/
   #include <Arduino.h>
   #ifdef ARDUINO_ARCH_ESP32
   #include "designerDWIN.h"
   #else
   #include "arduinoDWINbox.h"
   #endif

void setup() {
  #ifdef ARDUINO_ARCH_ESP32
  #else
    dwinSerial.begin(115200);
    ClearDisplayDwin();
  #endif
    setBtnDwin(2, 9, 118, 4, "OFF");
    setBtnDwin(1, 10, 7, 4, "ON");
}

void loop() {
    ReadSerial();
        setBtnActivDwin(7, 2, 9, 118, 4, "OFF");
        static bool last_bt7;
          if (stek_bool_bt[7] && !last_bt7)
          {
           last_bt7 = true;
          pinMode(13, OUTPUT);
          digitalWrite(13, 0);
          cutBuzzerDwin(5);
         }
         else  if (!stek_bool_bt[7] && last_bt7){
           last_bt7 = false;
          }
        setBtnActivDwin(8, 1, 10, 7, 4, "ON");
        static bool last_bt8;
          if (stek_bool_bt[8] && !last_bt8)
          {
           last_bt8 = true;
          pinMode(13, OUTPUT);
          digitalWrite(13, 1);
          cutBuzzerDwin(5);

         }
         else  if (!stek_bool_bt[8] && last_bt8){
           last_bt8 = false;

          }
} 

Открыть пример: Online ArduBlock



Видеоурок:


56 839 просмотров