Arduinoのお勉強
http://kit.socinno.com/ を買ったので
環境構築
/dev/ttyACM0
とか/dev/ttyUSB0
をsudo無しで開くために・・・sudo gpasswd -a kentac55 uucp
sudo gpasswd -a kentac55 lock
- ログアウト&ログイン
- modprobe
sudo modprobe cdc_acm
- パッケージ追加
sudo pacman -S arduino-cli uucp
- Fritzingあると便利
- 初期設定
- 以下を
~/.arduino15/arduino-cli.yaml
として保存proxy_type: auto sketchbook_path: /home/kentac55/src/github.com/kentac55/arduino-study arduino_data: /home/kentac55/.arduino15 board_manager: additional_urls: - https://dl.espressif.com/dl/package_esp32_index.json
arduino-cli core update-index
arduino-cli core install esp32:esp32
- 以下を
作る
- 回路を設計する
Fritzing
- 回路を実装する
- 作成
arduino-cli sketch new test
cd /home/kentac55/src/github.com/kentac55/arduino-study
vim test/test.ino
- コンパイル
arduino-cli compile --fqbn esp32:esp32:esp32 /test
- こういうトラブルがあるので手動で
partition.bin
を/tmp/arduino-sketch-****
から/home/kentac55/src/github.com/kentac55/arduino-study/test
にコピーするcp /tmp/arduino-sketch-***/test.ino.partitions.bin ./test/test.esp32.esp32.esp32.partitions.bin
- upload
arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:esp32 /home/kentac55/src/github.com/kentac55/arduino-study/test