最終更新:2024-12-09 (月) 11:44:05 (136d)
ATOMS3 Lite
Top / ATOMS3 Lite
https://docs.m5stack.com/en/core/AtomS3 Lite
チップ
Arduino IDE
ライブラリ
ピン配置
- 左
3V3 G5 TCH5 CH4 G6 TCH6 CH5 G7 TCH7 CH6 G8 TCH8 CH7
- 右
G39 CLK_OUT3 G38 5V GND
- 下 (左から)
GND 5V G2 ACH1 TCH2 G1 ACH0 TCH1
例
#include <M5AtomS3.h> void setup() { AtomS3.begin(true); // ledEnable=trueを渡すとLEDが有効化される(=Lite) AtomS3.dis.setBrightness(100); AtomS3.dis.drawpix(0x00ff00); } void loop() { AtomS3.update(); if (AtomS3.BtnA.wasPressed()) { AtomS3.dis.drawpix(0xff0000); AtomS3.update(); } if (AtomS3.BtnA.wasReleased()) { AtomS3.dis.drawpix(0x00ff00); AtomS3.update(); } }
M5Stack/キーボード
- Apple Keyboardをエミュレート
#include <M5AtomS3.h> #include <USB.h> #include <USBHIDKeyboard.h> USBHIDKeyboard Keyboard; void setup() { AtomS3.begin(true); USB.VID(0x05AC); USB.PID(0x021F); USB.productName("Apple Keyboard Emulator (ATOMS3 Lite as A1242 JIS)"); USB.manufacturerName("tokkyo"); // USB.firmwareVersion(0x0070); // USB.usbPower(20); Keyboard.begin(); USB.begin(); AtomS3.dis.setBrightness(100); AtomS3.dis.drawpix(0x00ff00); AtomS3.update(); } void loop() { }