-
Thanks for your informative reply. There sure are lots of factors worth considering. But what I ment by "old module" was the old version of the software module for Espruino. My sensors are actually 26ft/8m away and connected through common telephone cable. They work flawlessly with the old software. Why it doesn't work with the new software is beyond my competence in electronics. Regarding long distance TTL signals I also have relay modules and IR signal LEDs connected 8 meter away. It works well but sometimes the IR signals doesn't get interpreted by the receiving end. I wonder if the long distance TTL signals will harm the output pins of the board though (given the current spikes).
-
I'm running three DHT22. Most of the readings are erroneous, returning -1,-1 (no checksum error). My sensors are several meters away and the supply voltage is 5v. It works flawlessly with an old module I found online. I also tried some DHT11's and couldn't get them to work at all with the current module.
-
-
Test performed on Espruino Original Board and STM F4 with 1v85.
var pins = [C7,C8]; digitalWrite(pins,0); // Sets both pins to low digitalWrite(pins,1); // Only sets C8 to high digitalWrite(pins[0],0);digitalWrite(pins[1], 0); // Works as expected digitalWrite(pins[0],1);digitalWrite(pins[1], 1); // Works as expected
Best regards,
Marten -
-
-
-
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.
-
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.
-
-
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.
var remoteTimes = [ 9.19055938720, 4.59480285644, 0.49400329589, 0.66375732421, 0.51665306091, 0.61249732971, 0.51975250244, 0.63776969909, 0.51999092102, 0.60963630676, 0.51832199096, 0.66399574279, 0.51784515380, 0.58650970458, 0.54264068603, 0.63991546630, 0.49114227294, 0.66661834716, 0.49209594726, 1.76048278808, 0.54454803466, 1.73950195312, 0.62084197998, 1.71089172363, 0.54550170898, 1.73473358154, 0.49304962158, 1.78909301757, 0.51975250244, 1.76239013671, 0.51879882812, 1.78813934326, 0.54359436035, 1.73664093017, 0.54454803466, 0.58555603027, 0.51689147949, 0.63896179199, 0.54836273193, 0.60939788818, 0.51784515380, 0.61225891113, 0.57125091552, 0.58460235595, 0.51879882812, 0.63800811767, 0.54550170898, 1.76048278808, 0.49591064453, 0.63610076904, 0.48923492431, 1.79100036621, 0.49018859863, 1.81484222412, 0.49114227294, 1.76525115966, 0.57220458984, 1.73377990722, 0.51593780517, 1.76620483398, 0.53882598876, 1.74140930175, 0.54454803466, 0.63610076904, 0.51879882812, 1.76239013671, 0.51784515380, 40.56835174560, 9.18006896972, 2.31838226318, 0.54264068603, 97.63717651367, 9.23538208007, 2.25925445556, 0.51975250244, 97.62954711914, 9.23728942871, 2.26211547851, 0.51784515380 ]; var picoTimes = [ 9.33551788330, 4.55093383789, 0.36334991455, 0.69141387939, 0.49662590026, 0.65827369689, 0.47397613525, 0.68569183349, 0.47302246093, 0.65898895263, 0.44536590576, 0.71907043457, 0.46825408935, 0.63633918762, 0.49567222595, 0.66280364990, 0.46825408935, 0.71430206298, 0.44631958007, 1.84535980224, 0.47492980957, 1.79195404052, 0.55408477783, 1.76715850830, 0.49591064453, 1.79862976074, 0.41198730468, 1.87301635742, 0.44441223144, 1.84631347656, 0.44631958007, 1.84535980224, 0.47397613525, 1.81770324707, 0.47302246093, 0.60939788818, 0.49495697021, 0.68855285644, 0.49972534179, 0.65803527832, 0.47492980957, 0.63514709472, 0.52356719970, 0.63610076904, 0.46825408935, 0.71430206298, 0.47302246093, 1.82437896728, 0.44059753417, 0.68569183349, 0.44631958007, 1.84822082519, 0.41484832763, 1.90162658691, 0.41770935058, 1.84631347656, 0.50163269042, 1.76811218261, 0.44250488281, 1.87015533447, 0.44631958007, 1.79672241210, 0.49495697021, 0.68664550781, 0.47206878662, 1.84822082519, 0.44441223144, 41.44477844238, 8.44764709472, 2.25925445556, 0.44631958007, 99.74384307861, 7.26509094238, 2.18200683593, 0.46825408935, 99.71523284912, 7.28607177734, 2.20584869384, 0.44441223144 ];
Pico code:
pinMode(A5,"input_pullup"); var times = []; /* The ID of the watch we're using to record IR. We want to turn it off while we transmit in case we record outselves! */ var currentWatch; function startWatching() { currentWatch = setWatch(function(e) { // work out how long the pulse was, in milliseconds var pulseLen = 1000 * (e.time - e.lastTime); // then save it, if it was less than 1 second if (pulseLen < 1000) { times.push(pulseLen); } else { times = []; } }, A5, {repeat:true}); } startWatching(); function stopWatching() { clearWatch(currentWatch); currentWatch = null; } function replay() { //Stop timer if(currentWatch !== null) stopWatching(); //Light up LED1 digitalWrite(LED1,1); // Start the 38kHz square wave analogWrite(B8,0.9,{freq:38000}); // Send the pulses digitalPulse(B9, 1, times); // Wait until pulsing is finished digitalPulse(B9, 1, 0); // Turn LED1 off digitalWrite(LED1,0); }
Any suggestions?
Thanks and best regards,
Maarten
Now it works with the new software module - with the DHT22 connected 9 meters away!