最終更新:2024-11-09 (土) 20:35:17 (28d)
ATOMS3 Lite
Top / ATOMS3 Lite
https://docs.m5stack.com/en/core/AtomS3 Lite
Arduino IDE
ライブラリ
例
#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() { }