-
@Raik, can you please share us the details ( if possible, with the code) ?
Thanks
Navas -
I am able to run the display using arduino using GxEPD2 lib. But I can't get it work with Espruino :(,
this is the code I am using, can some one help me getting the display to work?
var spi; var display; function setupSPI(){ console.log('starting SPI'); spi = new SPI(); spi.setup({ sck:D14, mosi:D13 }); display = require('SSD1606.min').connect({ display: { bpp : 1, displaySizeX : 200, displaySizeY : 200, lutRegisterData : new Uint8Array([0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]), // PARTIAL update lutRegisterData, covered further maxScreenBytes : 5000, // this ramXStartAddress : 0x00, // this ramXEndAddress : 0x18, // this ramYStartAddress : 0xC7, // this ramYEndAddress : 0x00 // and this }, spi : spi, cs1Pin : D15, dcPin : D0, resetPin : D2, busyPin : D4, // powerPin : B15 }); //display.on(); display.hwReset(function(){ display.init( function(err){ display.g.clear(0xFF); display.g.setRotation(1); display.g.setColor(0x00); display.g.setFontVector(20); display.g.drawString('Hello World!', 22, 22); display.g.flip(); display.refreshScreen(function(err){ display.off(); }); }, { clearScreenColor: 0x00 } ); }); } function start() { setupSPI(); } E.on('init', start);
-
-
-
-
-
@furuskog I would recommend you buy preinstalled one. You definitely don't want to go through the troubles which I had.
Thanks
navas -
hi everyone,
Does any know how to capture multiple IR codes through an IR receiver at the same time? My remote seems to send multiple codes on a single press. How do you capture them on times?
This example is good to capture events one code at a time. I can print them to console using
console.log(times.toString());but the problem is it is always printing the last one received.
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"); // Keep somewhere to put the signal times var times = []; // now watch the input 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 = []; }, B6, {repeat:true});
Thanks
Navas -
Looks Great, And yes, like @Gordon said IR would be nice to have it :)
-
Hi @Gordon, I have re-uploaded the attachment from espressif website. This is the one I tested and worked.
I don't think it is the baud rate, I did a few debugging, it seems like it is problem detecting the "ready"
Hope it helps.
-
ok, thanks @Gordon. I will give it a try.
-
Please refer this post
http://forum.espruino.com/conversations/298614/#comment13465701
-
seems like latest esp-01 no longer comes with AT 0.25 / 0.50.
If any stuck then please use the attached firmware and re-flash your esp-01.
use the following commands
Change the port if you have different. Oh, also it is for 1MB flash.
esptool.py -p /dev/tty.SLAB_USBtoUART -b 115200 write_flash 0x00000 eagle.flash.bin 0x10000 eagle.irom0text.bin 0x7E000 blank.bin 0xFE000 blank.bin 0xFC000 esp_init_data_default.bin
-
Yup!, that's what I did for one of my AC. And for another one, I ended up using Arduino.
My budget is tight, so I can't afford to have multiple espruino Wifi :(
I heard there is a way to use IRQ and make it work on esp8266. Is there any work in progress?
I miss RGB Control (not the neo pixel) and IR stuffs since it lacks PWM support. Those are the two things I use mostly.
Thanks
Navas -
Thanks @Gordon.
I ended up using arduino for the IR part. It's so unfortunate that esp8266 on espruino sucks at pwm. Hope it won't be any problem on ESP32.
Thanks
Navas -
Nope :( Ali express auto canceled my shipping since the seller didn't ship the item more than a week after the payment.
But I purchased a few ESP32 from tindie. The seller shipped my item next day with a USPS tracking number. Here is the link if you are interested.
https://www.tindie.com/products/ddebeer/esp-wroom-32/?pt=full_prod_search
-
I have a ESP-01 8Mbit version which comes with AT version 1.3.0.0
OK
AT+GMRAT version:1.3.0.0(Jul 14 2016 18:54:01) SDK version:2.0.0(656edbf) compile time:Jul 19 2016 18:43:55 OK
I tried integrating with Espruino Pico board using shim v2.0. but I am getting "Uncaught No 'ready' after AT+RST" . Is there any way I can fix this?
-
-
Hey @Gordon, is there any update yet? AnalogWrite for 38Khz is feasible in ESP8266?
Thanks
Navas -
Also, I finally figured out the code using espruino. It works with Puck.JS, but ot doesn't work on my Pico, Any ideas?
var on = [4.41455841064,4.36687469482,0.57029724121,1.61373615264,0.56827068328,0.55217742919,0.54073333740,1.62029266357,0.56457519531,1.61266326904,0.56934356689,0.55313110351,0.54073333740,0.55301189422,0.54085254669,1.61361694335,0.56552886962,0.55694580078,0.53882598876,0.55599212646,0.53977966308,1.61743164062,0.56743621826,0.55408477783,0.54073333740,0.55313110351,0.53977966308,1.61361694335,0.56743621826,1.61075592041,0.56934356689,0.55408477783,0.54061412811,1.61945819854,0.56743621826,1.62029266357,0.56743621826,0.55313110351,0.54073333740,1.61647796630,0.56743621826,1.61552429199,0.56648254394,1.61170959472,0.57029724121,1.64043903350,0.54156780242,1.64020061492,0.54180622100,1.61361694335,0.56934356689,0.55611133575,0.54061412811,1.61266326904,0.56838989257,0.55408477783,0.53977966308,0.55313110351,0.54073333740,0.55325031280,0.53966045379,0.55408477783,0.53977966308,0.55408477783,0.53977966308,0.55503845214,0.53977966308,0.55599212646,0.53977966308,1.61457061767,0.56648254394,1.61349773406,0.56755542755,0.55408477783,0.53977966308,0.55408477783,0.53882598876,0.55408477783,0.53977966308,0.55313110351,0.53977966308,0.55599212646,0.53977966308,1.61647796630,0.56648254394,0.55420398712,0.53966045379,0.55313110351,0.53966045379,1.61373615264,0.56743621826,1.61457061767,0.56648254394,1.61647796630,0.56552886962,1.64127349853,0.53977966308,1.61647796630,0.57792663574,5.18798828125,4.41646575927,4.36210632324,0.57125091552,1.64031982421,0.54168701171,0.55217742919,0.54168701171,1.61743164062,0.56648254394,1.61445140838,0.56755542755,0.55408477783,0.53977966308,0.55313110351,0.54073333740,1.61457061767,0.56648254394,0.55599212646,0.53977966308,0.55503845214,0.54073333740,1.64413452148,0.54073333740,0.55313110351,0.54061412811,0.55325031280,0.53977966308,1.61457061767,0.56648254394,1.61552429199,0.56648254394,0.55313110351,0.54073333740,1.61838531494,0.56838989257,1.62124633789,0.56648254394,0.55408477783,0.53882598876,1.64508819580,0.54073333740,1.61266326904,0.56838989257,1.61552429199,0.56648254394,1.61266326904,0.56838989257,1.61361694335,0.56838989257,1.61743164062,0.56552886962,0.55694580078,0.54073333740,1.61552429199,0.56457519531,0.55408477783,0.53977966308,0.55313110351,0.54073333740,0.55408477783,0.53882598876,0.55408477783,0.53977966308,0.55313110351,0.53977966308,0.55599212646,0.53977966308,0.55503845214,0.54073333740,1.61552429199,0.56552886962,1.61361694335,0.56648254394,0.55503845214,0.54073333740,0.55313110351,0.53977966308,0.55408477783,0.53977966308,0.55313110351,0.53977966308,0.55599212646,0.54073333740,1.61457061767,0.56827068328,0.55325031280,0.54073333740,0.52928924560,0.56457519531,1.61361694335,0.56743621826,1.61361694335,0.56838989257,1.61278247833,0.56922435760,1.61361694335,0.56743621826,1.61743164062,0.57792663574]; var off = [4.44984436035,4.37164306640,0.57315826416,1.61933898925,0.56934356689,0.55599212646,0.54168701171,1.62410736083,0.56743621826,1.61933898925,0.56934356689,0.55503845214,0.54168701171,0.55503845214,0.54168701171,1.61743164062,0.57029724121,0.55789947509,0.54073333740,0.55789947509,0.54073333740,1.62220001220,0.56743621826,0.55599212646,0.54073333740,0.55503845214,0.54168701171,1.61743164062,0.56743621826,1.62029266357,0.56648254394,0.55503845214,0.54073333740,1.62410736083,0.56838989257,0.55694580078,0.54073333740,1.61564350128,0.57017803192,1.62029266357,0.56552886962,1.61838531494,0.56838989257,1.61933898925,0.56648254394,0.55503845214,0.54061412811,1.62231922149,0.56743621826,1.64699554443,0.54073333740,1.62410736083,0.56934356689,0.55408477783,0.54073333740,0.55503845214,0.54073333740,0.55503845214,0.54061412811,0.55515766143,0.54073333740,1.61743164062,0.56838989257,0.55503845214,0.54073333740,0.55694580078,0.54073333740,1.62315368652,0.56934356689,1.61647796630,0.56838989257,1.64413452148,0.54275989532,0.55491924285,0.54073333740,0.55408477783,0.54073333740,0.55408477783,0.54073333740,0.55503845214,0.54073333740,0.55694580078,0.54073333740,0.55694580078,0.54061412811,0.55420398712,0.54168701171,0.55503845214,0.54073333740,1.62029266357,0.56838989257,1.61743164062,0.56838989257,1.61933898925,0.56648254394,1.61743164062,0.56838989257,1.61838531494,0.58078765869,5.22613525390,4.41932678222,4.37355041503,0.57125091552,1.61647796630,0.56838989257,0.55599212646,0.54073333740,1.64794921875,0.54168701171,1.61838531494,0.56648254394,0.55503845214,0.54168701171,0.55503845214,0.53977966308,1.61933898925,0.56743621826,0.55599212646,0.54168701171,0.55694580078,0.54073333740,1.62208080291,0.56850910186,0.55408477783,0.54168701171,0.55408477783,0.54073333740,1.61838531494,0.56743621826,1.61743164062,0.56838989257,0.55503845214,0.54073333740,1.64890289306,0.54264068603,0.55694580078,0.54073333740,1.61743164062,0.56743621826,1.61743164062,0.56838989257,1.61743164062,0.56838989257,1.61933898925,0.56743621826,0.55503845214,0.54073333740,1.62220001220,0.56838989257,1.61838531494,0.56934356689,1.62315368652,0.56934356689,0.55503845214,0.54156780242,0.55420398712,0.54073333740,0.55503845214,0.54168701171,0.55408477783,0.54073333740,1.62029266357,0.56648254394,0.55420398712,0.54156780242,0.55706501007,0.54061412811,1.62506103515,0.56743621826,1.61838531494,0.56648254394,1.61743164062,0.56934356689,0.55515766143,0.54061412811,0.55503845214,0.54073333740,0.53119659423,0.56457519531,0.53024291992,0.56457519531,0.53310394287,0.56457519531,0.53215026855,0.56552886962,0.55503845214,0.53977966308,0.55503845214,0.53977966308,1.62315368652,0.56743621826,1.61933898925,0.56636333465,1.61743164062,0.56850910186,1.61743164062,0.56934356689,1.62029266357,0.57983398437]; function ac(cmd){ digitalWrite(LED1,1); analogWrite(A5,0.9,{freq:38000}); digitalPulse(A6, 1, cmd); digitalPulse(A6, 1, 0); digitalRead(A5); digitalWrite(LED1,0); }
-
Hi Gordon,
Thanks for responding. Actually the AirCon. has a longer IR Codes, It has 199 bits. So far I only found appropriate code for OFF :(
Is there any way I can decode longer IR signals, I am always getting memory out of error using Espruino using official decoded method (like the instructions on Youtube)
Thanks
Navas -
Hi,
I was trying to send IR code for my Aircondition unit. Unfortunately, none of the methods (hopefully) listed on the espruino website works for me, I was able to deduct the IR code using Arduino and found the following code.
Hash: FA36E9A0 For IR Scope/IrScrutinizer: +4400 -4350 +550 -1600 +600 -500 +550 -1650 +550 -1600 +550 -550 +550 -550 +550 -1600 +550 -550 +550 -550 +550 -1600 +550 -550 +550 -550 +550 -1600 +550 -1600 +600 -500 +550 -1650 +550 -550 +550 -1600 +550 -1600 +600 -1600 +550 -1600 +550 -550 +550 -1600 +600 -1600 +550 -1600 +600 -500 +550 -550 +550 -550 +550 -500 +600 -1600 +550 -550 +550 -500 +600 -1600 +550 -1600 +600 -1600 +550 -550 +550 -500 +600 -500 +550 -550 +550 -550 +550 -500 +600 -500 +550 -550 +550 -1600 +600 -1600 +550 -1600 +550 -1650 +550 -1600 +550 -127976 For Arduino sketch: unsigned int raw[100] = {4400,4350,550,1600,600,500,550,1650,550,1600,550,550,550,550,550,1600,550,550,550,550,550,1600,550,550,550,550,550,1600,550,1600,600,500,550,1650,550,550,550,1600,550,1600,600,1600,550,1600,550,550,550,1600,600,1600,550,1600,600,500,550,550,550,550,550,500,600,1600,550,550,550,500,600,1600,550,1600,600,1600,550,550,550,500,600,500,550,550,550,550,550,500,600,500,550,550,550,1600,600,1600,550,1600,550,1650,550,1600,550,}; irsend.sendRaw(raw,100,38);
How do I send the equivalent code from Espruino? (there is no pronto code listed on irdb.tk)
Thanks
Navas
@Raik
Thank you so much, I will give it a try ASAP.