gnea / grbl-Mega

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on an Arduino Mega2560
https://github.com/gnea/grbl/wiki
Other
495 stars 230 forks source link

Sg90 on mks base 1.6 with grbl #166

Open alexc57 opened 2 years ago

alexc57 commented 2 years ago

Impossible to do moving the servo with many different firmware. Anybody can help. Maybe a bad configuration because I have plus the 3 pin in the corner (servo pin). Thks

fra589 commented 2 years ago

Grbl doesn't have code to drive servo. You need to use another firmware like Marlin to do this. @++; Gauthier.

alexc57 commented 2 years ago

It s strange I see many informations about that.

fra589 commented 2 years ago

Some modified versions exist to use servo (https://github.com/robottini/grbl-servo, https://github.com/cprezzi/grbl-servo, ...), but they are no servo function in the original (this one) Grbl version.

Another infos here:

@++; Gauthier.

alexc57 commented 2 years ago

I have try this also, google is my friend... but all it s for ATmega328p, but not for my board. if you had another idea ;)

fra589 commented 2 years ago

I don't know if they work, but try this: https://github.com/botio/grbl-Mega-servo Or this: https://github.com/alnwlsn/grbl-Mega-5X-alnwlsn

@++; Gauthier.

alexc57 commented 2 years ago

thanks a lot but doesn't work, it is not the same board

fra589 commented 2 years ago

You can remap the IO pins to make the soft suitable to your board... https://github.com/fra589/grbl-Mega-5X/wiki/Pinout-mapping-in-cpu_map.h

alexc57 commented 2 years ago

Thanks a lot for that. In my mks base I don't have pin (I/o) for spindle! To you think a can attribute another pin as you explain? Like (OC1A/PCINT5)PB5? For example ? Thks