Would anyone have any experience on using a cnc shield v3 with esp32 board and using a limit switch? Seems like motors are nice but with limit/end switches calibration could be a lot easier. There seem dedicated ports on the cnc shield for these switches (which makes sense), did anyone ever try these and integrate them into uc2-rest?
Hey Tom, thanks for reaching out again. Indeed there is a function that is called home which can move the motor in a certain direction with an unstop with certain polarity which is then reversing the direction when it reaches the end stop and then stopping when it’s free again footstep I’m walking right now but there is a documentation in the firmware. You should look for home_act this is possible for access one two three. There’s a funny back in the fastl stepper motor library which may cause random direction changes when call for the first time, but in principle it should work
but then nothing happens for both x+ or x-. (or any other axis?), do I need to change something in the software to flash the esp32 board? I am using the UC2 ESP32 Flashing Tool.
Hello again, I finally had some time to test.
So the gpio pins from the cnc shield to the esp32 correspond to the arduino equivalent used in the code, so that should be okay. I am using a pull-up configuration but can’t seem to get it working.
Using ESP32.home.home_x(speed=500) start homing, but does not respond to any of the ports. I tried both 3 way and 2 way switches, the common connected to ground, and the NO connected to a 10k resistor which is connected to the cnc shield 5V and before the resistor to X+ (which should be connected to the gpio pin). I tried both X-, X+, Y- etc, but it does not respond. I also tried connecting to X+ and GND through the switch but that also does not respond. Am I missing something?
can you try this page openUC2 WebSERIAL Demonstration and paste the following line (after connecting to the board): {"task":"/digitalin_get"}
By changing the pins and polling the result, you should see a variation in its response from 0…1
I must admit that the firmware available through openUC2 WebSERIAL Demonstration for the WEMOS is already fairly old. I could initiate a rebuild - should work without major complications, but i haven’T used this PCB for a while now. We only use our UC2v3 PCBs provided by @christiankuttke
–
It prints the same output if I press the limit switch for all inputs. Does this listen to all gpio pins? I don’t think I fully understand, what it is supposed to do, shouldn’t this print specific information per GPIO pin?
But I don’t see a difference between button presses (considering that it requests something from a memory location that is not there, it would be weird if it could find something?)