-
-
Looking here https://forum.wemos.cc/topic/8/d1-to-arduino-uno-pinout-associations/2
The pinouts are no clearer!
I would try all the combinations - D5, nodemcu:D5 and work your way through the range.
You can paste in the left side of the ide, and press the button and see if you have output - if not use the up arrow and then back arrow and change to D6, and hit return. Very quickly you can go through the whole range...
-
-
-
-
-
-
-
-
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' });
-
Thanks to @Gordon, there is now a fix on the ESP32 if the pin > D15, so this should now work for D16 or D22, which ever pin you have connected too.
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' });
-
-
@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?
-
Looking at the wiring here: http://randomnerdtutorials.com/esp32-dht11-dht22-temperature-humidity-web-server-arduino-ide/
There are wiring to io16. so you would use D16.
-
-
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
-
See here
http://forum.espruino.com/conversations/316733/
You might have an earlier firmware that had an issue.
-
Where did you get D17 from?
A quick google here:
https://github.com/search?utf8=%E2%9C%93&q=higrow&type=
The mongoose project uses D22. It could be the same - no way of knowing without trying ...
You might need to trace from the dht11 to see what pin it is connected to.
-
http://forum.espruino.com/comments/13155158/
Perhaps the difference is due to pull ups on the pins?
Try an external resistor?
-
-
This has come up before...
Please see:
https://github.com/espruino/Espruino/issues/1168
It was deemed no longer an issue...
You could try the disconnected event mentioned in the link above, echo the details, and then attempt to reconnect.
-
The esp32 esp-idf provides a function to write x bytes, but the espruino code calls it in a loop a single byte at a time, so this would have to be rewritten to support mutli byte sends.
I'm sure it would be faster then!