Add servo mode support for spindle PWM control
- Implemented USE_SPINDLE_SERVO_MODE configuration option - Changed Timer2 prescaler from 1/8 to 1/1024 for ~50Hz servo frequency - Added configurable servo pulse width range (SPINDLE_SERVO_MIN_PULSE/MAX_PULSE) - M3 S0-S1000 now controls servo position (0-180 degrees) - M5 positions servo to maximum position (pen up) instead of disabling PWM - Default configuration supports pen plotter with reversed pulse values (MIN=31, MAX=16) - Only supports ATmega328p (Arduino Uno) processors Based on: https://www.buildlog.net/blog/2017/08/using-grbls-spindle-pwm-to-control-a-servo/
This commit is contained in:
41
platformio.ini
Normal file
41
platformio.ini
Normal file
@@ -0,0 +1,41 @@
|
||||
; PlatformIO Project Configuration File for Grbl
|
||||
;
|
||||
; This configuration builds Grbl v0.9j for Arduino Uno (ATmega328P)
|
||||
; Based on the original Makefile settings
|
||||
;
|
||||
; Please visit documentation for options and examples
|
||||
; https://docs.platformio.org/page/projectconf.html
|
||||
|
||||
[platformio]
|
||||
src_dir = src
|
||||
lib_dir = .
|
||||
include_dir = grbl
|
||||
|
||||
[env:uno]
|
||||
platform = atmelavr
|
||||
board = uno
|
||||
framework = arduino
|
||||
|
||||
; Build configuration matching Makefile
|
||||
build_flags =
|
||||
-DF_CPU=16000000L
|
||||
-DBAUD_RATE=115200
|
||||
-Wall
|
||||
-Os
|
||||
-ffunction-sections
|
||||
-fdata-sections
|
||||
-Wl,--gc-sections
|
||||
-lm
|
||||
-Igrbl
|
||||
-Igrbl/cpu_map
|
||||
-Igrbl/defaults
|
||||
|
||||
; Add Grbl source files to build
|
||||
build_src_filter =
|
||||
+<*>
|
||||
+<../grbl/*.c>
|
||||
-<../grbl/examples/>
|
||||
|
||||
; Upload configuration
|
||||
upload_speed = 115200
|
||||
monitor_speed = 115200
|
||||
Reference in New Issue
Block a user