Avatar for SimonGAndrews

SimonGAndrews

Member since Aug 2021 • Last active Sep 2023
  • 5 conversations
  • 55 comments

Retired Solution Architect (Xerox - Imaging Services)
Working on implementing Xstate
https://xstate.js.org/docs/packages/xsta­te-fsm/
on Microcontrollers for improving Service Delivery

Most recent activity

  • in ESP32
    Avatar for SimonGAndrews

    Further to above, after a few builds of Espruino ( with make clean && BOARD=ESP32 make) having added some console prints to /targets/esp32/jshardwarePulse.c I am pretty sure that this code is not executed on a digitalPulse function call.

    With similiar tests it does look like the function is built in src/jswrap_io.c and the function jswrap_io_digitalPulse() is used to execute the call..

    Looking though this code I can not see any special treatment for the ESP32.

    My C skills are at the 'cut and paste level', so It will take me allot more time to try to figure out the issue (pulse period not varying) in that code and the risk is this method hasnever beentestd and just does not work on the ESP32.

    Im going to raise an issue just in case, but I dont think I can take this much further.

    Please bring on a supported Espruino WIFI option (with lower overhead than a an Espruino Pico with ESP83266 he says with tears in his eyes. :)

  • in ESP32
    Avatar for SimonGAndrews

    @user156239 Hello,
    Im 90% sure the issue is in the implementation of the digitalPulse function for the ESP32.

    Im having very similiar issues with trying to drive a servo(LDX218) with ESP32 and Espruino. Im using the Espruino servo tutorial here . Having tried the servo module and using the digitalPulse command directly on its own and in setInterval().

    Im 90% sure the issue is in the implementation of the digitalPulse function for the ESP32. I have put a logic analyser on the pulsed pin and it seems the pulse width is always about 600us in response to a digitalPulse(D4,1,x) command no matter what the value of x. Where x should be the length of the pulse in milli seconds. I should really compare to the output of digitalpulse on an espruino Pico to be 100%.

    Ive also put the anayser on a servo test board, so can compare to a pulse signal that works.

    @JumJum explains, at the time of implementation, in the docs here, that the function was not 100% tested. So maybe never worked or something has changed.

    Any way it needs further investigation. The digitalPulse function code is here. And the ESP32 RTM functionality the code uses is described here . This RTM doc may be better explainations with examples than was available at the original implementation so maybe comparing to examples would find the issue. (also theres a risk examples may not be applicable in our older ESp32 sdk version. )

    Any help appreciated, I was trying to sort out what I thought was a relatively easy WIFI servo driver for a PTZ streaming camera for a charity .

  • in ESP32
    Avatar for SimonGAndrews

    PS also this may help
    https://www.espruino.com/ESP32
    section Espruino Web IDE

  • in ESP32
    Avatar for SimonGAndrews

    I suspect
    1) that you do not have the correct drivers installed on the PC for the UART to USB connection you are using. or
    2) maybe not using the correct com port.

    Regarding (1) The ESP UART to USB connection will need to use a chip (in the cable or on the board) that needs the correct driver. Eg FTDI chip neeeds drivers from here https://ftdichip.com/drivers/

    I you need more help, please explain , How are you making the connection between the board and the PC. Share a picture of the CABLE between the board and the PC which shows how the cable is connectedto the ESP32 board and describe ESP32 board you are using.

    regarding (2) it looks like from your picture the WebIDE thinks it is connected to a com port. If the Baud rate is correct then the IDE is still not receiving ESPRUINO response on the com port. Are you sure Com8 is the correct COM port? Maybe something else is on Com8 (not esp32). Use device manager to see what com ports are active. But if the drivers are not corrrect then the com port may not be assigned (visible in device manager) or it may be assigned and show an error in device manager.

    Good luck,

  • in ESP32
    Avatar for SimonGAndrews

    Thanks @MaBe , your phases make sense and I see your good work on #2370;
    Its not easy, I am sure, very tricky stuff.

    Any help understanding on exacly which scripts are run to make the the travis and release builds would be appreciated. I suppose they are some of the scripts in EspruinoBuildTools but which ones are used? Its background infor for me to understand when the idf build output (stored in the deploy zips) is being updated in these production builds. For example they could run from EspruinoBuildTools: build-idf.sh then build-tgz .sh or maybe just build-tgz.

  • in ESP32
    Avatar for SimonGAndrews

    Hello,
    Could someone help me please understand exactly what scripts are executed to build the Espruino ESp32 bins found at https://www.espruino.com/binaries/travis­? Also is that the same scripts building released versio bins at //www.espruino.com/binaries/.
    Are the scripts visible somewhere??

    Im still trying to understand better the ESP32 build. The reason is:
    Im having some success building it in windows / VScode with the ESP-IDF tools (V3.3.6) using cmake - actually flashed a working V18 version today.
    Im going to have a go at modifying this to try and build in ESP-IDF (V4.x) to contribute in that direction . (tricky stuff for me .. no one hold breath please).

  • in ESP32
    Avatar for SimonGAndrews

    Hello,
    I was getting similiar issues.
    There was a fix deployed in v 2v17.74 on the May 5 which may fix this. You can find the bins in the travis/master directory. http://www.espruino.com/binaries/travis/­master/
    Maybe try again with the new version.

  • in ESP32
    Avatar for SimonGAndrews

    Hi,
    Find attached a visual of the ESP32 build script process. It shows the build scripts and how they interact with the build files you get from a clone of
    git clone --recursive https://github.com/espruino/EspruinoBuil­dTools.git .

    I did it to try and understand the process myself , sharing in case usefull to anyone. As alway im open to any corrections or feedback. If PDF, Visio source or JPG is more usefull. Let me know.

  • in ESP32
    Avatar for SimonGAndrews

    Hello,
    I was getting similiar issues.
    There was a fix deployed in v 2v17.74 on the May 5 which may fix this. You can find the bins in the same travis/master directory you referecne above. Maybe try again with the new version.

Actions