[Grbl_Esp32 Issue#365] Sending G-code commands from custom_code_template.cpp

未分类 bolang 4个月前 (10-14) 48次浏览

Issue #365 | 状态: 已关闭 | 作者: kolins-cz | 创建时间: 2020-03-26

标签: enhancement


Hi,
I am developing antenna tracker for FPV with stepper motors. Until now I have controlled it by Marlin firmware on old RAMPS. But yesterday I discovered GrblEsp32. I have made board for it and now it works. It works great! I would like put actual antenna tracker code inside grblesp32.

Please describe the feature you would like implemented
I looked trough customcodetemplate.cpp and other custom codes but I have not found example how to send Gcode commands from the inside. It will be really great if you can provide more advanced example for custom code.

Why do you think this would improve Grbl_ESP32?
A little.

What do you need the feature for?
To control motion from the inside. ESP32 should have enough resources to do other tasks

Will this feature appear to a lot of users?
Maybe.


评论 (7)

#1 – MitchBradley 于 2020-03-26

How about using the macro facility in the WebUI to send your custom code?


#2 – kolins-cz 于 2020-03-26

Macro won’t do. I need to calculate azimuth/inclination in real time and update position every say 200ms.
It may be something else than gcode, I can just call some function. But code is very complex and I have hard time to identify which one is the right one.

I have noticed I also need some function which will be called periodically from main code. Also I need access to one serial port.

I know that my idea is kind of wierd. I can always use second microcontroller for tracking stuff and just send Gcode via serial in normal way. But I think ESP32 is powerful enough to calculate some angles and do the usual grbl stuff at same time.

If you say it is generally bad idea I will just place second microcontroller and use Grbl as is.
Thanks Mirek




#6 – bdring 于 2020-03-26

The atari plotter project is another good example of how your machine can control itself through gcode. It implements tool changing and a custom homing sequence.

https://github.com/bdring/GrblEsp32/blob/master/GrblEsp32/Custom/atari_1020.cpp


#7 – kolins-cz 于 2020-03-27

Thank you for your input.


原始Issue: https://github.com/bdring/Grbl_Esp32/issues/365

喜欢 (0)