You are reading a single comment by @KFK-mpg and its replies. Click here to read the full conversation.
  • Hey,
    thanks for your really good support. The LED is connected in right way. That was the first, what i checked. But it was a really nice thinking :)
    Yesterday, i tested a little bit and solve the problem. The solution is (for me) confusing and i don`t know the technical details.

    Sending a zero:

    [1.0, gap]
    

    Sending a 1:

    [gap, 1.0]
    

    and as last bit for end of transmitting:

    [gap]
    

    If you send no 'gap' as last, it won`t be shown the string in the console.

    Complete code for sending '101001':

    digitalWrite(B7, 0); // Set B7 to GND
    digitalWrite(A8, 1); // Set A8 to 3.3V
    // Because we're not using the module, we have to manually pull up the data pin
    pinMode(B6,"input_pullup");
    
    setInterval(function(){
      
      var gap = 0.5;
    //  var pulse = [0.6, gap, 0.6, gap, gap, 2.0, gap, gap, 0.6];
        var pulse = [gap, 1.0, 1.0, gap, gap, 1.0, 1.0, gap, 1.0, gap, gap, 1.0, gap];
    
      digitalWrite(LED1,1);
      
      analogWrite(A5, 0.9,{freq:38000});
      
      digitalPulse(A6, 1, pulse);
      
      digitalPulse(A6, 1, 0);
      
      digitalWrite(LED1,0);
    },1000);
    

    best regards

About

Avatar for KFK-mpg @KFK-mpg started