Skip to content

Commit 34f2956

Browse files
authored
Update LaunchRandomExample.ino
1 parent b328043 commit 34f2956

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

examples/LaunchRandomExample.ino

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
#include <Arduino.h>
22
#include <WiFi.h>
3-
#include "TapToLaunchApi.h"
3+
#include "ZaparooLaunchApi.h"
44

55
//Config (Update before compile)--------------------------------------------------
66
const char* ssid = "WifiName";
77
const char* password = "WifiPassword";
8-
const String tapToUrl = "ws://tapToIp:7497";
8+
const String zaparooUrl = "ws://tapToIp:7497";
99
//EndConfig-----------------------------------------------------------------------
1010

11-
TapToLaunchApi client(tapToUrl);
11+
ZaparooLaunchApi client;
1212
bool launched = false;
1313

1414
void setup() {
1515
Serial.begin(115200);
16+
client.url(zaparooUrl);
1617
initWiFi();
1718
while (!Serial) {
1819
delay(200);
@@ -21,10 +22,12 @@ void setup() {
2122

2223
void loop() {
2324
if(!launched){
24-
int code = client.launch("**launch.random:snes,nes");
25+
String result = "";
26+
result = result + "**launch.random:snes,nes";
27+
int code = client.launch(result);
2528
launched = code == 0;
2629
if(launched){
27-
Serial.println("Launched TapTo");
30+
Serial.println("Launched Zaparoo");
2831
}else{
2932
Serial.print("Error code ");
3033
Serial.println(code);
@@ -43,4 +46,4 @@ void initWiFi() {
4346
delay(500);
4447
}
4548
Serial.println(WiFi.localIP());
46-
}
49+
}

0 commit comments

Comments
 (0)