Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using LED's instead of Motor for test purpose #15

Open
Ralfhgw opened this issue May 25, 2019 · 1 comment
Open

Using LED's instead of Motor for test purpose #15

Ralfhgw opened this issue May 25, 2019 · 1 comment

Comments

@Ralfhgw
Copy link

Ralfhgw commented May 25, 2019

i need some support for the Motor Shield which hardware is installed on Raspi now.
According to the first instruction the test script fort he stepper motor is Stepper_Test.py.

Currently i don’t have a motor and want use the LED’s to see the proper functionality of the code. Can you help please to find the right syntax for enabling the LED’s please?

The used Stepper_Test.py looks like:

import PiMotor
import time
import RPi.GPIO as GPIO

m1 = PiMotor.Stepper("STEPPER1")
try:
while True:
m1.forward(0.1,10) # Delay and rotations
time.sleep(2)
m1.backward(0.1,10)
time.sleep(2)
except KeyboardInterrupt:
GPIO.cleanup()

@sbcshop
Copy link
Owner

sbcshop commented May 27, 2019

Hello Ralfhgw,

Yes, you can test the Motor Shield with LED also. But this is a bit difficult to test with a stepper motor program. Because the stepper motor works on 1000 and 1010 logics, so you have to take care of LED connections with Motor Connectors.

Simple connect 5V to motor supply connector and connect LED's with Motor Connectors with resistance (300ohm - 1Kohm)

I hope this will help you to test the stepper motor code with LED's.

Regards,
SB Team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants