-
Notifications
You must be signed in to change notification settings - Fork 3
/
blynk_old.h
55 lines (49 loc) · 1.32 KB
/
blynk_old.h
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
51
52
53
54
55
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
BLYNK_WRITE(V0)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
patternIndex = param.asInt();
Serial.print("V0 Slider value is: ");
Serial.println(pinValue);
}
BLYNK_WRITE(V1)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
paletteIndex = param.asInt();
Serial.print("V1 Slider value is: ");
Serial.println(pinValue);
}
BLYNK_WRITE(V2)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
g_hueTempo = param.asInt();
Serial.print("V2 Slider value is: ");
Serial.println(pinValue);
}
BLYNK_WRITE(V3)
{
int pinValue = param.asInt(); // assigning incoming value from pin V1 to a variable
// You can also use:
// String i = param.asStr();
// double d = param.asDouble();
g_brightness = param.asInt();
Serial.print("V3 Slider value is: ");
Serial.println(pinValue);
}
BLYNK_WRITE(V5)
{
g_hueTempo = 0;
g_hueShift = 0;
Serial.println("V5 Button Pressed");
}