-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrawScreen.js
41 lines (35 loc) · 1.02 KB
/
drawScreen.js
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
let wordclockImgPosX = 400;
function drawScreen() {
textSize(18);
textAlign(LEFT, TOP);
background(255);
fill(0);
image(wordclocklogoImg, 0, 0);
if (isConnected) {
//text('Bluetooth Connected :)', 10, 140);
if (newData) {
image(wordclockImg, wordclockImgPosX, 200, 200, 200);
fill(0);
textAlign(LEFT, TOP);
if (wifiConnected) {
textSize(14);
fill(0, 255, 0);
text('WiFi Connected\n', wordclockImgPosX, 420);
fill(0,0,0);
text('WiFi Name: '+connectedSSID+'\n'+'IP: '+ip+'\n' + 'Alexa Status: ' + alexaStatus + '\n' + 'OTAStatus: ' + otaStatus, wordclockImgPosX, 420 + 16);
} else {
fill(255, 0, 0);
text('WiFi not Connected', wordclockImgPosX, 420);
}
if(falseWifiCredentials){
fill(255, 0, 0);
text('WiFi name or password is false.', wordclockImgPosX, 420 + 32);
}
textSize(18);
fill(0);
}
} else {
//text('Bluetooth Disconnected :/', 80, 150);
newData=false;
}
}