Arduinoで動くCNCコントローラーの有名どころとしてGRBLというのがあります
Arduino UNOピン数があれば3軸のCNCが動くので趣味プロジェクトでは中々有効かも
ただし、ライセンスはGPLv3なのでよく理解してご利用のこと
実際のところ
導入
Arduino IDE
Releases · gnea/grbl · GitHub
からZIPを確保
解凍し、"「grbl-xxx.yyy」->「grbl」"をライブラリに読み込ませる(ZIPではないがディレクトリでもいける)
Exampleの「grblExample」を読み出す
以下の様にまるで中身がないように見えるが、これをそのまま対象ボードへ
/*********************************************************************** This sketch compiles and uploads Grbl to your 328p-based Arduino! To use: - First make sure you have imported Grbl source code into your Arduino IDE. There are details on our Github website on how to do this. - Select your Arduino Board and Serial Port in the Tools drop-down menu. NOTE: Grbl only officially supports 328p-based Arduinos, like the Uno. Using other boards will likely not work! - Then just click 'Upload'. That's it! For advanced users: If you'd like to see what else Grbl can do, there are some additional options for customization and features you can enable or disable. Navigate your file system to where the Arduino IDE has stored the Grbl source code files, open the 'config.h' file in your favorite text editor. Inside are dozens of feature descriptions and #defines. Simply comment or uncomment the #defines or alter their assigned values, save your changes, and then click 'Upload' here. Copyright (c) 2015 Sungeun K. Jeon Released under the MIT-license. See license.txt for details. ***********************************************************************/ #include <grbl.h> // Do not alter this file!
HEXファイルを直接
Releases · gnea/grbl · GitHub
から最新のHEXを"grbl.hex"としてダウンロード
Windowsの場合はChocolateryで
https://community.chocolatey.org/packages/avrdude
$ choco install avrdude
$ sudo apt install avrdude gcc-avr
その後、Arudino UNOなら
$ avrdude -p m328p -D -P COM10 -c arduino -b 115200 -U flash:w:grbl.hex