-
• #2
Found a few pins from a lookalike project that seems to work.
let ResetPin = 0;
let LedPin = 16;
let DHTpin = 22;
let SOILpin = 32;
let LIGHTpin = 34;Problem now is that i try to use the DHT11 module do get the correct values but it throws a nasty looking error:
>Guru Meditation Error of type InstrFetchProhibited occurred on core 0. Exception was unhandled. Register dump: PC : 0x0d160a16 PS : 0x00060031 A0 : 0x80082c7a A1 : 0x3ffb05c0 A2 : 0x00000017 A3 : 0x00000000 A4 : 0x00400000 A5 : 0x3ff44024 A6 : 0x3ffb7048 A7 : 0x00000016 A8 : 0x80082b79 A9 : 0x3ffca468 A10 : 0x00000000 A11 : 0x00000017 A12 : 0x0000ff91 A13 : 0x00000029 A14 : 0x00000000 A15 : 0x3ffd4aa0 SAR : 0x00000016 EXCCAUSE: 0x00000014 EXCVADDR: 0x0d160a14 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000 Backtrace: 0x0d160a16:0x3ffb05c0 0x40082c77:0x3ffb05e0 0x40081715:0x3ffb0600 ================= CORE DUMP START ================= dBkAAAgAAAB0AQAA GP36P3DS/D/c0/w/ cNL8P3DT/D945NPslCf7P5Qn+z8Y/fo/jCf7PxkAAAD0XKtwsRm3OBj9+j8AAAAA AAAAAODP/D9JRExFABf6CkLVuO7D988AAAAAANzT/D8AAAAAIQAGAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFjj+j/A4/o/KOT6PwAAAAAAAAAA AQAAAAAAAABQKUA/AAAAAEgdAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAA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/g5fo/ GAAAABDm+j9pcGMwADbWN1Aq930z/XkAAAAAAAzq+j8AAAAAIQAGABgAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFjj+j/A4/o/KOT6PwAAAAAAAAAA AQAAAAAAAABQKUA/AAAAAEgdAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJjXI 2BQIQEVRCEAwAAYA7xEIgEDp+j+85fo/AAAAAATm+j8AAAAAAQAAAAAAAAAQUgiA IOn6P9wA8D8BAAAAgCn7P2A7/j8MC/s/AgAAAAAAAAClpaWlpaWlpQAAAAAAAAAA AAAAANUWCEBgO/4/AGoIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgOn6PwAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAKDp+j8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB6DgiAEDz+Pwwn+z+c+/o/ AAAAAAAAAACs6fo/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAA ================= CORE DUMP END ================= E (93442) esp_core_dump: Skipped 1 tasks with bad TCB! E (93487) esp_core_dump: Crashed task has been skipped! Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0x00 clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0008,len:8 load:0x3fff0010,len:1932 ho 0 tail 12 room 4 load:0x40078000,len:10012 load:0x40080000,len:252 entry 0x40080034 _____ _
Any thoughts ?
-
• #3
See here
http://forum.espruino.com/conversations/316733/
You might have an earlier firmware that had an issue.
-
• #4
I tried with both 1v95 and 1v94 and none worked. I tried just choosing a different pin aswell, and then i got
{"err":true,"checksumError":false,"raw":"","temp":-1,"rh":-1}
And if i do a normal analogRead on pin 22
>analogRead(22) E (221702) RTC_MODULE: /mnt/c/Users/rhys/esp32/edge/EspruinoBuildTools/esp32/build/esp-idf/components/driver/./rtc_module.c:554 (adc1_config_channel_atten):ADC Channel Err E (221707) RTC_MODULE: /mnt/c/Users/rhys/esp32/edge/EspruinoBuildTools/esp32/build/esp-idf/components/driver/./rtc_module.c:581 (adc1_get_voltage):ADC Channel Err =0.06298828125
-
• #5
Sorry - your information is a little vague if you want help with this!
I tried with both 1v95 and 1v94 and none worked.
Did you get the crash with 1v95?
Posting your code might help.
I tried just choosing a different pin aswell, and then i got
Ok. What pin and did yout try? What are you testing?
For the
analogRead
see here:http://www.espruino.com/ESP32#gpio-pins
http://www.espruino.com/ESP32#analog-read-write-example
You should refer to the pins at the D numbers. The pins on the board may be numbered differently. Espruino uses the chip pin numbering for the esp32.
To read ADC0:
>analogRead(D35); =0
-
• #6
I got the same error with both versions of Espruino.
My code isvar dht = require("DHT11").connect(D22); function onInit() { setInterval(function () { dht.read(function (a) { console.log(JSON.stringify(a)); }); }, 3000); } onInit();
When a try pin D22 i get the error that i posted in the top post. Guru meditation.. When i try randomly reading pin D17 with the DHT11 module i get the answer
{"err":true,"checksumError":false,"raw":"","temp":-1,"rh":-1}
When i do a analogRead() On pin D22 i get
E (221702) RTC_MODULE: /mnt/c/Users/rhys/esp32/edge/EspruinoBuildTools/esp32/build/esp-idf/components/driver/./rtc_module.c:554 (adc1_config_channel_atten):ADC Channel Err E (221707) RTC_MODULE: /mnt/c/Users/rhys/esp32/edge/EspruinoBuildTools/esp32/build/esp-idf/components/driver/./rtc_module.c:581 (adc1_get_voltage):ADC Channel Err =0.06298828125
Sadly i cannot follow the actual pin to the sensor premounted on the board.. But from a look at other projects they use pin 22.
-
• #7
What is the output of
analogRead(D35);
This should read the ADC which will be contected to the soil probe.
-
• #8
analogRead(D35) reads 0, but from what i know the soil pin is D32 and it works, displays 0.8, when i hold my fingers around it displays around 0.4 so it works.
-
• #9
@Gordon
In debug mode build, an Assert is failing here:>setWatch(function() {console.log('bang!')}, D22, {repeat:true}); ASSERT(channel>=EV_EXTI0 && channel<=EV_EXTI_MAX) FAILED AT src/jsdevices.c:706 #1[r2,l2] Object { #2[r1,l2] Name String [1 blocks] "\xFF" #3[r1,l2] Object { #6[r1,l2] Name String [2 blocks] "timers" #8[r2,l1] Array(0) [ ] #9[r1,l2] Name String [2 blocks] "watches" #11[r2,l1] Array(0) [ ] #13[r1,l2] Name String [1 blocks] "net" #14[r1,l2] String [1 blocks] "\x05\x00\x00\x00\x00\xFF\xFF\xFF" #25[r1,l2] Name String [2 blocks] "modules" #27[r1,l1] Object { #29[r1,l2] Name String [1 blocks] "Wifi" #28[r1,l1] NativeFunction 0x400ea898 (0) { } } } } HALTING.
https://github.com/espruino/Espruino/blob/master/src/jsdevices.c#L706 ( line 6 below)
void jshSetEventCallback( IOEventFlags channel, //!< The event that fires the callback. JshEventCallbackCallback callback //!< The callback to be invoked. ) { // Save the callback function for this event channel. assert(channel>=EV_EXTI0 && channel<=EV_EXTI_MAX); jshEventCallbacks[channel-EV_EXTI0] = callback; }
EV_EXTI_MAX is defined as: https://github.com/espruino/Espruino/blob/e609b94f83f665c26cf4f86acac068c396427e99/src/jsdevices.h#L54
EV_EXTI15, // External Interrupt 15 EV_EXTI_MAX = EV_EXTI15,
@JumJum did the setwatch code for ESP32 - so I'm unsure how pin numbers (D22 in this case) is mapping to a channel?
-
• #10
Thanks - let's figure this one out in the issue you filed on GitHub?
https://github.com/espruino/Espruino/issues/1346 -
• #11
Great job guys ! no more Meditation error ! but now i get:
{"err":true,"checksumError":false,"raw":"","temp":-1,"rh":-1}
When trying to read D22 ? thoughts.. why isnt it recieving any data..
// Edit
Tried with another Dht11 standalone board on pin D22, works like a charm.. You think my onboard sensor is broken ? -
• #12
Did you pull the latest firmware and build?
Thanks to @Gordon, there is now a fix on the ESP32 if the pin > D15, so this should now work for D22.
The firmware bin file can be fetched here:
This is now working:
setWatch(function(e) {console.log("Button pressed",e);}, D22, { repeat: true, edge: 'rising' });
Just got myself this badboy: https://www.aliexpress.com/item/higrow-ESP32-WiFi-Bluetooth-Battery-DHT11-Soil-temperature-and-humidity-sensor-module/32818803204.html
Flashing worked perfect and wifi connection no problems. But now i wonder how am i going to find the pin to read the Temp and humidity from the dht11 ? anyone had this board before? Same as finding the correct pin to read the soil..