Last active
July 1, 2024 06:34
-
-
Save mongonta0716/ec0eb578f7bee595e84d2d7a9b60c1ce to your computer and use it in GitHub Desktop.
AtomS3Liteで、Windowsログインするプログラム(セキュリティには注意しましょう)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include "USB.h" | |
#include "USBHIDKeyboard.h" | |
#include "USBHIDMouse.h" | |
#include <M5Unified.h> | |
#include <FastLED.h> | |
USBHIDKeyboard keyboard; | |
USBHIDMouse mouse; | |
void setup() { | |
M5.begin(); | |
keyboard.begin(); | |
mouse.begin(); // Mouse Without Bordersで物理マウスが無いとカーソルが表示されない件に対応 | |
USB.begin(); | |
} | |
void loop() { | |
M5.update(); | |
if (M5.BtnA.wasClicked()) { | |
Keyboard.print(" "); | |
delay(2000); | |
Keyboard.println("YOUR_PIN"); // YOUR_PINを置き換えてください。 | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; PlatformIO Project Configuration File | |
; | |
; Build options: build flags, source filter | |
; Upload options: custom upload port, speed and extra flags | |
; Library options: dependencies, extra library storages | |
; Advanced options: extra scripting | |
; | |
; Please visit documentation for the other options and examples | |
; https://docs.platformio.org/page/projectconf.html | |
[platformio] | |
default_envs = m5stack-atoms3 | |
[env] | |
platform = espressif32 @ 6.5.0 | |
framework = arduino | |
upload_speed = 1500000 | |
monitor_speed = 115200 | |
board_build.f_flash = 80000000L | |
board_build.filesystem = spiffs | |
board_build.partitions = default_8MB.csv | |
build_flags = -DCORE_DEBUG_LEVEL=4 | |
lib_deps = | |
m5stack/[email protected] | |
lib_ldf_mode = deep | |
[env:m5stack-atoms3] | |
board = m5stack-atoms3 | |
build_flags = -DARDUINO_USB_MODE=1 | |
-DARDUINO_USB_CDC_ON_BOOT=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment