From 34f295693210f2f5fce75149ec9112dbe895e3e5 Mon Sep 17 00:00:00 2001 From: v1605 <55302877+v1605@users.noreply.github.com> Date: Sat, 16 Nov 2024 19:13:25 -0500 Subject: [PATCH] Update LaunchRandomExample.ino --- examples/LaunchRandomExample.ino | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/LaunchRandomExample.ino b/examples/LaunchRandomExample.ino index b898511..df91ca4 100644 --- a/examples/LaunchRandomExample.ino +++ b/examples/LaunchRandomExample.ino @@ -1,18 +1,19 @@ #include #include -#include "TapToLaunchApi.h" +#include "ZaparooLaunchApi.h" //Config (Update before compile)-------------------------------------------------- const char* ssid = "WifiName"; const char* password = "WifiPassword"; -const String tapToUrl = "ws://tapToIp:7497"; +const String zaparooUrl = "ws://tapToIp:7497"; //EndConfig----------------------------------------------------------------------- -TapToLaunchApi client(tapToUrl); +ZaparooLaunchApi client; bool launched = false; void setup() { Serial.begin(115200); + client.url(zaparooUrl); initWiFi(); while (!Serial) { delay(200); @@ -21,10 +22,12 @@ void setup() { void loop() { if(!launched){ - int code = client.launch("**launch.random:snes,nes"); + String result = ""; + result = result + "**launch.random:snes,nes"; + int code = client.launch(result); launched = code == 0; if(launched){ - Serial.println("Launched TapTo"); + Serial.println("Launched Zaparoo"); }else{ Serial.print("Error code "); Serial.println(code); @@ -43,4 +46,4 @@ void initWiFi() { delay(500); } Serial.println(WiFi.localIP()); -} \ No newline at end of file +}