Files
grbl/platformio.ini
devdesk eddba72e23 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/
2025-12-03 19:08:46 +02:00

42 lines
808 B
INI

; 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