Last active
March 7, 2023 15:12
-
-
Save katsuyoshi/4bc97c14b89f97c42e8521642c4e8016 to your computer and use it in GitHub Desktop.
M5AtomS3でソニーテレビの赤外線リモコン信号を送信
This file contains 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 <IRremoteESP8266.h> | |
#include <IRsend.h> | |
#include <M5Unified.h> | |
const uint16_t kIrLed = 4; | |
IRsend irsend(kIrLed); | |
void setup() { | |
M5.begin(); | |
USBSerial.begin(115200); | |
irsend.begin(); | |
} | |
void loop() { | |
M5.update(); | |
if (M5.BtnA.wasClicked()) { | |
USBSerial.println("Power off"); | |
irsend.sendSony(0xa90, 12, 3); // 12 bits & 3 repeats | |
//irsend.sendNEC(0x00FFE01FUL); | |
delay(2000); | |
} | |
} |
This file contains 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
[env:ATOMS3] | |
platform = espressif32@5.2.0 | |
framework = arduino | |
platform_packages = platformio/framework-arduinoespressif32@^3.20005.220925 | |
board = esp32-s3-devkitc-1 | |
lib_ldf_mode = deep | |
monitor_speed = 115200 | |
upload_speed = 1500000 | |
board_build.f_cpu = 240000000L | |
board_build.f_flash = 80000000L | |
board_build.flash_mode = dio | |
build_flags = | |
-DCORE_DEBUG_LEVEL=3 | |
-Iinclude | |
lib_deps = | |
crankyoldgit/IRremoteESP8266@^2.8.4 | |
m5stack/M5Unified@^0.1.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment