Home / Expert Answers / Computer Science / i-am-in-need-of-a-python-code-that-deals-with-the-rohs-28byj-48-5vdc-stepper-motor-that-is-connected-pa972

(Solved): I am in need of a PYTHON CODE that deals with the ROHS 28BYJ-48 5VDC Stepper motor that is connected ...



I am in need of a PYTHON CODE that deals with the ROHS 28BYJ-48 5VDC Stepper motor that is connected to a raspeberry pi pico h and a limit switch. I need this code to move a certain amount of steps clockwise (preferably have a command to input the number of steps), then once the limit switch is activated I need it to move off of the limit switch slightly and wait for another command before it moves back counter clockwise to its original position. A homing code essentially. Below I have attach a icture of my set up. If I need to make any adjustments please let me know. To clarify the limit switch is set up on two of the same pins that the motor is connected to (where the blue and white wire are GPIO pin 4 and 5).



We have an Answer from Expert

View Expert Answer

Expert Answer



Step 1:

where the limit switch is connected to GPIO pins 4 and 5. The code below takes the number of ...
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe