4) playing with stepper motors - Python
I first mimicked the bonescript to us the GPIO pins to run the stepper 
motor.  I noticed I could run it faster than I could with bonescript, but 
would still get the same issues just at better speeds. I then tried setting 
the pin to run as a PWM output. 

ISSUES FOUND:
USING GPIO is not a good solution for running stepper motors.

Issuing the mrraa.write(0.xx) would cause a buffer overrun when setting the 
PWM duty cycle and crash the program, 
Using pin.pulsewidth_us(xxx), pulsewidth_ms(xxx), or pulsewidth(x.xx) to 
set the duty cycle directly would work, but when values got out of range 
the pwm chip would become locked requiring the BBG to have to be reset..

SOLUTION:

1) false trail. Upgrade the mraa library (the BBG  came with v 0.95) to 
version 1.5.x. this was pretty tough for an absolute beginner like me. 
Needed swig3.0, which can be installed using debians dpkg. Need Cmake which 
was somewhat difficult to get an image of with out having an sd card. it 
took some time to get it installed. mraa installs files in sys/local/lib vs 
sys/lib like cloud9 expects to see. Once mrraa was installed, i had to 
correct ly place a few files to get it to work, but mraa 1.5 would fail to 
initalize pwm on the pins, I dont know why as using mraa commands to check 
the pins always returned correct values, but it still failed.

2) current state.  I bought a micro SD card and installed the latest BBG 
image on the eprom. This came with mraa1.0.  Still all the BBIO python 
examples are junk. You no longer get a buffer overrun using mraa.write(), 
but you can still lock up the pwm.

End entry 4


On Sunday, November 13, 2016 at 4:09:06 PM UTC-6, Chris M wrote:
>
> Some thoughts and findings as I begin to learn the BBG (Beaglebone Green) 
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6611fa64-374e-48ae-b64b-5b41d749592e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to