From 1de3c787cf338b41eac23c3cdddb135660db2ef9 Mon Sep 17 00:00:00 2001 From: Norman Bos Date: Sat, 20 Jul 2024 10:45:24 +0200 Subject: [PATCH] add more control buttons for testing --- arduino-sony-minidisc-ir-remote.ino | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/arduino-sony-minidisc-ir-remote.ino b/arduino-sony-minidisc-ir-remote.ino index 1b12005..56de543 100644 --- a/arduino-sony-minidisc-ir-remote.ino +++ b/arduino-sony-minidisc-ir-remote.ino @@ -16,7 +16,7 @@ Circuit: * LED attached to pin 13 (optional) - * IR Transmitter attached to pin 4 + * IR Transmitter attached to pin 4 (needs 5v) * SD-Module to load HTML and CSS from SD-card developed for the ESP32vn IoT Uni board 2024 @@ -89,7 +89,12 @@ void loop() { // the content of the HTTP response follows the header: client.print("Click here to turn the LED on pin 13 on.
"); client.print("Click here to turn the LED on pin 13 off.
"); + client.print("power
"); client.print("play
"); + client.print("pause
"); + client.print("stop
"); + client.print("previous track
"); + client.print("next track
"); client.print("

"); client.print("

"); @@ -111,12 +116,24 @@ void loop() { if (currentLine.endsWith("GET /L")) { digitalWrite(LED_PIN, LOW); // GET /L turns the LED off } + if (currentLine.endsWith("GET /power")) { + sendButton(POWER); + } if (currentLine.endsWith("GET /play")) { - //Serial.println("MD play"); - //Serial.flush(); - //IrSender.sendSony(0xF, PLAY, 2, 12); sendButton(PLAY); } + if (currentLine.endsWith("GET /pause")) { + sendButton(PAUSE); + } + if (currentLine.endsWith("GET /stop")) { + sendButton(STOP); + } + if (currentLine.endsWith("GET /prev")) { + sendButton(PREV); + } + if (currentLine.endsWith("GET /next")) { + sendButton(NEXT); + } if (currentLine.endsWith("POST /api/control-deck")) { Serial.println("POST");