-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathesp8266_pvoutput.ino
50 lines (38 loc) · 929 Bytes
/
esp8266_pvoutput.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifdef TESTER
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>
#include "pvoutput.h"
const char* ssid = "HackerHotel-pub";
const char* password = "";
void setup() {
delay(100);
Serial.begin(115200);
delay(100);
Serial.println("Start");
// Connect to WiFi network
WiFi.begin(ssid, password);
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(200);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
PvStats stats;
PVOutput.begin("5cfebf9e2e47b7fd69cebd5993f1a7f10effe510", "20235");
if(!PVOutput.getStats(&stats)) {
Serial.println("erroroororor");
return;
}
Serial.println(stats.date);
Serial.println(stats.time);
Serial.println(stats.len);
}
void loop() {
}
#endif