In the pinconfig I changed the last line to: const UC2_WEMOS pinConfig;
Flashing seems to work since it I get the ‘hard resetting’. In python if I connect it gives the exact same output (Using API Version 2 etc.) as it would with a UC2 board. In the _state it does nicely state: pindef: UC2_WEMOS. But If I sent any commands such as ESP32.motor.move_x(steps=10000, speed=10000, is_blocking=True), it does not move. The motor is the NEMA motor also used in the motorized Z-stages.
Using the code given here:
The motor moves normally and it works. The pins are the same as in the WEMOS Pinconfig. I measured the voltage on the boards and that is as expected.
Thanks @tomvh for reporting this. What’s your python script you’re using if I may ask? How did you install UC2-REST (Python)? Can you check if the following website enables you to run the motors? openUC2 WebSERIAL Demonstration
Thanks for the prompt reply! I think I have an idea. So I tried the webserial demonstration and nothing happened either. But once I pressed auto enable the motor works. Also after pressing auto enable off. Once I power everything and from the webserial demonstration enable Auto Enable, in python it also works. So in my python code I now also sent the auto enable command and then it works.
for testing this is my code: #Import necessary libraries
import uc2rest as uc2
import numpy as np
import time
serialport = “COM4” # for Windows - change accordingly
if ‘ESP32’ not in locals():
ESP32 = uc2.UC2Client(serialport=serialport)
_state = ESP32.state.get_state()
print(_state)