hairu / freelss

FreeLSS is a laser scanning program for the Raspberry Pi. It allows a Raspberry Pi to function as the core to a complete turn table laser scanning system.
GNU General Public License v3.0
279 stars 133 forks source link

No acces to GPIO #36

Open DidierD238 opened 4 years ago

DidierD238 commented 4 years ago

Hello, i just installed the 1.22 release. During the compilation, i had some warnings but i was able to start it. The application seems to not have access to the GPIO (i made tests on lasers and motor : nothing happened). I tested the motor and the lasers with a python code and they are working fine.

Did i miss something ?

Can you help me ?

Thanks in advance

Didier

Arusikhov commented 4 years ago

Were you able to resolve this? If so, please let me know how you did it.

Arusikhov commented 4 years ago

Ok, I found out that the pinout was changed after they started using WiringPi. The pins work, they're just at different locations.

Use this link as reference to find out their location http://wiringpi.com/pins/ The pins are assigned in Setup.cpp

DidierD238 commented 4 years ago

Hi.Yes i found the mistake. I wasn't using the wiringpi pin numbers.ThanksDidier Envoyé depuis mon smartphone Samsung Galaxy. -------- Message d'origine --------De : Arusyak Hovhannesyan notifications@github.com Date : 13/09/2020 02:58 (GMT+01:00) À : hairu/freelss freelss@noreply.github.com Cc : DidierD238 didierjanique.dubois@free.fr, Author author@noreply.github.com Objet : Re: [hairu/freelss] No acces to GPIO (#36) Were you able to resolve this? If so, please let me know how you did it.

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

IgnatiousPei commented 3 years ago

Hello, I am still facing this issue. I checked whether the pins are assigned to the correct ones in Setup.cpp also, but still it doesn't work. Can anyone help me out?

Arusikhov commented 3 years ago

https://github.com/Arusikhov/freelss

Try my build

Arusikhov commented 3 years ago

Actually I don't remember if I changed it in the code or physically so if it doesn't work, google wiringpi and get the right pinout

IgnatiousPei commented 3 years ago

Thanks for your help, I'm ashamed to say this, but my lasers decided to comply with the software spontaneously. I have no idea why it didn't work the first 10 times I tried it. Maybe it helped that I rebooted my Pi after updating the libraries for WiringPi.

May I know whether you got your stepper working? I'm still in the shade on that part. I have a NEMA 17 stepper motor but upon checking the code in Setup.cpp I'm not sure whether I have the correct sort. Here's my motor: https://my.cytron.io/p-nema-17hs4401-bipolar-stepper-motor?search=nema%2017&description=1&src=search.list

BTW I'm assembling this with completely off the shelf components as the kit doesn't deliver.

Arusikhov commented 3 years ago

Motor looks right. How is the motor driver? I'd recheck the wiring.

IgnatiousPei commented 3 years ago

I don't have the DRV8834 driver yet so I used a chip that was supposed to be a drop-in replacement for it, the A4988 chip. I'm not sure my stepper motor is correct as it seems to be of the type that accept the two phases input " A+ A- B+ B-" and not "ENABLE STEP DIR" like the one that Setup.cpp is programmed for. I'm not an expert on steppers so feel free to correct my misconceptions.

IgnatiousPei commented 3 years ago

I see that the "ENABLE STEP DIRECTION" commands are actually for the driver and not for the stepper motor itself. My bad. So most 4-wire stepper motors accept the input of "A+ A- B+ B-" from the stepper driver.

IgnatiousPei commented 3 years ago

I seem to have found the problem, the stepper motor probably doesn't work as the current stepper driver (A4988) needs a supply of 8V minimum and the power supply only provides 5V. The one in the schematics was a DRV8834 stepper driver, that accepts 2.5V minimum voltage. Thus I think after I get a DRV8834 driver the circuit should work as intended.

Why I didn't order a DRV8834 in the first place was because they are hard to come by where I live and shipping it is a giant pain and also expensive.

Anyway I hope that this is the issue after all and the kit just works after I swap in the new driver.