-
• #2
Hi Maarten,
Sorry about that... I think I might have noticed something not behaving quite right with
digitalPulse
on the 1v85 firmware.Do you think you could try flashing the 1v84 firmware? Copy and paste
http://www.espruino.com/binaries/espruino_1v84_pico_1r3_wiznet.bin
into the 'advanced flash' box in the Web IDE settings.It's not ideal, but it might help to solve your problems for now. I'll look into this and see if I can reproduce/fix it in the mean time.
-
• #3
Hi Gordon,
Thanks for your reply. Unfortunately the problem persists on 1v75/1v79/1v85. I just tried with another (single) led controller and it worked flawlessly. The latter outputs a steady 100000000111111110000000011111111 while the former looks like this:
100000000111111110000001011111101 100000000111111110000001011111101 1 100000000111111110000001011111101 1 100000000111111110000001011111101
Some recordings of the same signal appears to have higher success rate than other recordings. Strange.
-
• #4
Strange - so it's the recordings that are wrong, rather than the playback?
You could check
E.getErrorFlags()
- it should return[]
, but if there have been so many transitions that it couldn't record all of them, you'll get a message shown... I guess that could be it?The other thing is the code you're showing doesn't output all the codes it receives, as if there's a gap it'll delete them. You could try:
function startWatching() { currentWatch = setWatch(function(e) { var pulseLen = 1000 * (e.time - e.lastTime); if (pulseLen < 1000) { times.push(pulseLen); } else { console.log(times); //<----- added times = []; } }, A5, {repeat:true}); }
-
• #5
Hi Gordon,
Thanks for your efforts. Unfortunately I wasn't able to achieve an improved success rate for my two RGBW and RGB controllers, but I had some newbie luck discovering another solution (direct wiring). I cut off the IR receiver from the controller and connected its IR-input wire directly to the Pico IR LED output pin and wired the grounds together. I then removed the line analogWrite(B8,0.9,{freq:38000}); and changed the next line to *digitalPulse(B9, 0, times);*. After this the previously recorded times works like magic: ~100% success rate. I don't need the wireless feature for this application.
-
• #6
Ahh - it's possible that you wired the IR LED around the wrong way? Then it would be on when it should be off, and vice-versa. Depending on the signal it might have explained why it worked the first time and not others.
Glad it works reliably when connected directly though!
-
• #7
Well, the IR did work reliably with a single-color controller. Let's assume it's my hardware for now. If anyone else experience this, we'll look into it deeper.
Cheers.
Hi everyone!
I'm trying to control this RGBW LED driver over IR from an Espruino Pico. I'm using the record-replay code provided in the tutorial, but it works only occasionally. Sometimes it works multiple times in a row, then nothing for another 100 attempts (spamming the command). Both the remote and the Pico generates the output 100000000111111110000001011111101 repeatedly. Below is the recorded times.
Pico code:
Any suggestions?
Thanks and best regards,
Maarten