You are reading a single comment by @Adam and its replies. Click here to read the full conversation.
  • Hello :)

    I'm having a bit of trouble with the Espruino Wifi pwm pins. My aim is to control my TV via infrared.

    Running the code below with the same LED on a Pico has a 100% success rate of powering on my TV, however the Wifi is only able to work 3/10 times.

    As far as I can tell from the board pinout, A5 and A6 have the same features for both the pico and wifi.

    Both boards are running 1v87.

    function on() {
      var command = new Float32Array(
        [
          3.502,
          1.75,
          0.502
          ...etc
        ]
      );
    
      emit(command, A5, A6);
    }
    
    function emit(command, pinOne, pinTwo) {
      analogWrite(pinOne,0.9,{freq:35000});
      digitalPulse(pinTwo, 1, command);
      digitalPulse(pinTwo, 1, 0);
      analogWrite(pinOne,0,{freq:35000});
    }
    

    Is it possible that the faster cpu in the wifi is breaking the PWM timings?

About

Avatar for Adam @Adam started