ESP-WebOTA/examples/Chargen/Chargen.ino

38 lines
771 B
Arduino
Raw Normal View History

2019-03-17 23:54:43 +00:00
const char* host = "ESP-OTA"; // Used for MDNS resolution
2019-03-14 04:38:11 +00:00
const char* ssid = "ssid";
const char* password = "password";
#include <WebOTA.h>
void setup() {
Serial.begin(115200);
init_wifi(ssid, password, host);
// Defaults to 8080 and "/webota"
//init_webota(80, "/update");
2019-03-14 04:38:11 +00:00
}
int offset = 0;
void loop() {
// Whatever string we want to spit out
const char* str = "abcdefghijklmnopqrtuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()";
int len = strlen(str);
for (int i = 0; i < len; i++) {
int char_num = i + offset;
char_num = char_num % len; // Roll around the end if we go to far
char c = str[char_num];
Serial.print(c);
}
Serial.print("\r\n");
offset++;
if (offset >= len) { offset = 0; }
handle_webota();
2019-03-14 04:38:11 +00:00
}