Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. peashooter
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by peashooter

    • RE: Controlling Blinds.com RF Dooya Motors with Arduino and Vera

      Thanks!!! this was such a great help in getting my dooya blinds from aliexpress working over network.

      I couldn't get the test code above to work and my sequence was 40 bits, so i modified the code quite a bit and made it much more efficient. Here is the code if anyone needs to test their code on arduino.

      //Define Variables
      #define SEND_DATA 4 //Data pin for RF Transmitter
      #define ZERO_HIGH 363 //Delay for the high part of a 0 in microseconds
      #define ZERO_LOW 726 //Delay for the low part of a 0 in microseconds
      #define ONE_HIGH 726 //Delay for the high part of a 1 in microseconds
      #define ONE_LOW 363 //Delay for the low part of a 1 in microseconds
      
      void setup() {
        // put your setup code here, to run once:
      Serial.begin(9600);
      
      String code = "1100111101000001000111011011000100010001";  // Change your blinds code here
      Serial.println(code);
      
      Serial.println();
      
      for (int i=0; i <= 10; i++) {
      
        int delayTime;
        for(int k=0;k<40;k++) {                  //Change k max value here (40) is mine
          char code1 = code.charAt(k);
          int highTime;
          int lowTime;
          delayTime = ((int) code1) -48;        // 48 is zero in ASCII, so 48-48 = 0 as a number.
              if (delayTime == 1){
              highTime = ONE_HIGH;
              lowTime = ONE_LOW;
            }
            else {
              highTime = ZERO_HIGH;
              lowTime = ZERO_LOW;
            }
              digitalWrite(SEND_DATA, HIGH);
              delayMicroseconds(highTime);
              digitalWrite(SEND_DATA, LOW);    
              delayMicroseconds(lowTime);
      
        }
        Serial.println();
        Serial.print("Round:");
        Serial.print(i);
        Serial.println();
        delay(50);
      }
      
      
      }
      
      void loop() {
      
      }
      
       
      
      posted in My Project
      peashooter
      peashooter