Welcome to Our Community

Some features disabled for guests. Register Today.

Questions on modifying grblHAL ESP32 for testing purposes.

Discussion in 'Other Software' started by gclayton, Oct 23, 2024.

  1. gclayton

    gclayton New
    Builder

    Joined:
    Nov 3, 2016
    Messages:
    8
    Likes Received:
    0
    So, I am new to the CNC environment but have some software development experience. I want to setup my own little test lab using 2 ESP32 devices for testing my code.

    I want to see if I can enable ESP-NOW in the existing ESP32 driver for the BlackboxX32 and set it up to communicate with the other ESP32 device.

    I want to monitor the gcode as it is being processed and send info to the second ESP32 based on what the code is and have the second ESP32 execute a function based on that info.

    I have been able to build the ESP32 code and flash it to an ESP32 but how do I make sure the code is built for the BlackboxX32? Where/How do you control which board the ESP32 driver is being built for? The ESP32 device I have is the same type as the BlackboxX32 uses.

    Another question is how I can specify in the ESP32 driver, the GPIO pin that I want to use on my test ESP32 devices for the servo that is normally used on the in the BlackboxX32. What is the GPIO pin number and where is it specified in the driver code. I have looked at the driver code and just have not been able to figure this out.

    Hopefully, my explanation is understandable as to what I'm wanting to do.
     
  2. gclayton

    gclayton New
    Builder

    Joined:
    Nov 3, 2016
    Messages:
    8
    Likes Received:
    0
    Ok, looks like I have ESP32 building with the BlackboxX32 board after changing the CMakeLists.txt and my_machine.h files and rebuilding. However, for a quick test of controlling a servo off of one of the GPIO pins on my test ESP32 device I want to define/enable the PWM_SERVO_ENABLE in my_machine.h but when building I get an error.

    I am missing something to enable the servo and define an GPIO pin to use.
     
  3. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,041
    Likes Received:
    4,312
    Might be better to check in at https://github.com/grblHAL/ESP32/issues especially because it's not BlackBox, but also a little more advanced that standard customer support type work, this involves development so you might want to see how you can help out the grblHAL project too (sponsor, etc)
     
  4. gclayton

    gclayton New
    Builder

    Joined:
    Nov 3, 2016
    Messages:
    8
    Likes Received:
    0
    Sorry, I don’t understand your comment that it is not BlackBox. I am looking for info specifically for the BlackboxX32 and how to configure it so that it works as delivered.

    I have been there looking for info but was thinking that Openbuilds would be the place to get specific info on how to configure the board configuration for use with their BlackboxX32 controller.

    Ideally, I would like to get access to the source code that Openbuilds uses to build their firmware for the X32. That way I could experiment with adding the features that I want to try and not have to worry about all the configuration options to make the X32 perform as usual.

    That way, I could try my chanes and then flash directly to the X32 for testing instead of using separate ESP32 devices.
     
  5. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,041
    Likes Received:
    4,312
    "It" (your question) is a grblHAL firmware development question, not a hardware problem :) (this forum won't be of much help)

    Terjeio (grblHAL) handles the firmware for us, but that said your addition is not in scope for the arrangement we have with him (so please be nice to him, as this is new work you are working on, not for OpenBuilds, but for yourself) - just noting the scope change from "OpenBuilds" is asking for it, versus someone private is asking for it (from the grblHAL teams limited time resources etc)

    We just go to Web Builder and use it: http://svn.io-engineering.com:8080/?driver=ESP32&board=BlackBox X32

    We have no interest in espNOW, we use Interface over UART https://docs.openbuilds.com/doku.php?id=docs:interface:start
     
  6. gclayton

    gclayton New
    Builder

    Joined:
    Nov 3, 2016
    Messages:
    8
    Likes Received:
    0
    Ok, thanks for your help.
    I think I have it working on my ESP32 device now so I can do some experimenting.

    At least I can load my firmware build and connect via Openbuilds Control and control a servo with it. I don't need steppers right now.

    What I needed to know was found in the BlackBoxX32_map.h file. I was looking for a GPIO pin relating to the Servo but what I actually needed was the GPIO pin for the DRIVER_SPINDLE_PWM_ENABLE!
     
    #6 gclayton, Oct 24, 2024
    Last edited: Oct 24, 2024

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice