You are reading a single comment by @KFK-mpg and its replies. Click here to read the full conversation.
  • Hi,

    thanks for your answer. It was very helpful. Now i tested with the follow code:

    Transmitter:

    digitalWrite(B7, 0);
    digitalWrite(A8, 1); 
    pinMode(B6,"input_pullup");
    
    setInterval(function(){
      
      var gap = 0.5;
      var pulse = [1.0, gap, 1.0, gap, 0.6, gap, 1.0];
      
      digitalWrite(LED1,1);
      
      analogWrite(A5, 0.9,{freq:38000});
      
      digitalPulse(A6, 1, pulse);
      
      digitalPulse(A6, 1, 0);
      
      digitalWrite(LED1,0);
    },1000);
    
    

    and Receiver code:

    digitalWrite(B7, 0); 
    digitalWrite(A8, 1); 
    
    require("IRReceiver").connect(B6, function(code) {
    
      console.log(code);
      
      if(code === '0010') digitalWrite(LED2, 1);
      
    });
    

    I get every time a '000' in the console and no LED will be switched on. Sometimes an '0001'. Is there way to transmit correctly or did i something wrong?

    Sry.

    best regards
    Daniel

About

Avatar for KFK-mpg @KFK-mpg started