• In the spirit of the season, let's take a look at the issue at hand:

    • 1. Pin mapping from Espruino PICO to ESP8266 ESP-12E
    • 2. Figuring out if ESP8266 ESO-12E GPIO pins can provide enough sink and source current
    • 3. ESP8266 Wifi stack irq requirements not violated

    Re 1: Take a look at GPIO Pin BTN LED naming conventions specific to ESP8266. The code is done so smart that when you put the right pins in line 43 and 44 (in your screenshot), you are good to go.

    Re2: I/O pins of the ESP8266 ESP-12E are the pins of the ESP8266EX chip. According to data sheet - for example, from https://cdn-shop.adafruit.com/product-fi­les/2471/0A-ESP8266__Datasheet__EN_v4.3.­pdf under 2.2. Electrical Characteristics
    Table 3 ESP8266EX Electrical Characteristics on page 13, I max that can be drawn(sourced/sunk) is 12mA within specified levels of LOW and HIGH, did though not find the LOW and HIGH it is specified for. STM32 chips specify it... but it is for sure not 0V and 3.3V. For thoughts about this take a look at GPS powered by Espruino pin(s). There you also find the comment about the max power a chip can manage because of overall dissipation, which is a fraction of what the sum of what each individual pin can handle. The ESP8266EX chip has an additional challenge compared to the STM32 chips: it also does all the RF on / in the same chip which is usually worse in regard of heat creation. (It's though nice to have Wifi on the same chip). If power is pulled to low within the chip, it browns out and resets... worst case it burns up and goes lala land for ever.

    Re3: Described in many places, including the conversation referred to in my first link of this post, ESP8266 Wifi stack has hard requirements of getting control of the CPU every so much ms for number of ms. If someone else - the soft PWM / Espruino / JavaScript execution task is not done within the remaining time (window), ESP8266 panics and does a restart. For that reason, it is always good to have a processor for less time critical high/application level control and a separate processor for time low level - HW oriented things - that have their time critical requirements met in regard of available resources - interrupts, interrupt service times, etc.

    Try with various pins in that you have available on your ESP8266 ESP12E. This https://randomnerdtutorials.com/esp8266-­pinout-reference-gpios/ may help you. I searched for free pins... because many pins require to be at a certain state on power-on and some others are reserved for the operation mode / life cycle control.

    If you ran out of power, you may add FET transistors to increase transmission power of the IR LED. A quick look at the code runs the IR LED between two pins, one it emits a continuous PWM signal, and with the other it turns it on and off.

    PS:

    It is very sad that I spent so much time studying the documentation and writing other espruino libraries for my personal project (smart home system), and now I have to abandon the use of espruino at all because I see no reason to continue without this part

    ooops... Espruino consists of two parts: The targeted hardware - Espruino boards - and the firmware - Espruino binary... and Espruino (firmware) makes life so ease in the application realm - and that was exactly the motivation why it was created (the major point; others were more computing power - 32 vs 8 bit as Arduino - and with less current power - interrupt driven with sleep and deep sleep vs continuous run as Arduino's main loop. Going bare metal hardware and C - even with nice support, such as Arduino - life is quite different... It is your choice: usually a nut and a bolt have to match and go and together to do what is expected from the concept they implement. Choosing one part and avoiding the other one and then complaining seems to me unfair - or to say the least - unbalanced. It is the community - and the the smart choice of @Gordon regarding software/firmware architecture, implementation, and choice of processor - ARM3/4 - that brought it so far that Espruino is available on other than Espruino financing - lit.: @Gordon salary paying - hardware...

    ain't no free lunch? ...may be once in a while... after all - being within the season - it is Christmas!

    @user107037, you mentioned all the libraries and other things you developed and that you now have to abandon if ESP8266 does not make it: may be you pay forward in the spirit of open software and hardware as Espruino lives - in sharing in the Espruino forum - so others can enjoy as well as you can enjoy Espruino and the attention you get - for free.

About

Avatar for allObjects @allObjects started