Geen idee of ik op de goede weg ben ben totaal nieuw en weet nog niet veel over codering
maar ik wil een model snelweg voorzien van matrix borden die aangestuurd worden via blynk op mijn tablet
ik wil ongeveer 10 bruggen maken met elke brug 3 matrix borden
ik selecteer bij blynk een brug (1t/m10) dit nummer moet gebruikt worden om de brug actief te zetten
ik kies een symbool uit de dropdown V3 dit wordt screen 1
ik kies een symbool uit de dropdown V4 dit wordt screen 2
ik kies een symbool uit de dropdown V5 dit wordt screen 3
dit doe ik per brug
als het ongeluk is opgeruimd of weg gerepareerd is druk ik op button V6 om alle matrix borden op elke brug Off te zetten
...
Blynk
V2 Slider (1t/m10)
V3 Dropdown(Closed[1],Arrowdown[2],Arrowleft[3],Arrowright[4],Fifty[5],Seventy[6],Ninety[7],Clear[8],Off[9])
V4 Dropdown(Closed[1],Arrowdown[2],Arrowleft[3],Arrowright[4],Fifty[5],Seventy[6],Ninety[7],Clear[8],Off[9])
V5 Dropdown(Closed[1],Arrowdown[2],Arrowleft[3],Arrowright[4],Fifty[5],Seventy[6],Ninety[7],Clear[8],Off[9])
V6 Button (all Off)
Wemos D1
Arduino Uno
30x 8x8 led matrix met max7219
...
nog niks want ik krijg een foutmelding en van daar dus deze post
...
maar ik wil een model snelweg voorzien van matrix borden die aangestuurd worden via blynk op mijn tablet
ik wil ongeveer 10 bruggen maken met elke brug 3 matrix borden
ik selecteer bij blynk een brug (1t/m10) dit nummer moet gebruikt worden om de brug actief te zetten
ik kies een symbool uit de dropdown V3 dit wordt screen 1
ik kies een symbool uit de dropdown V4 dit wordt screen 2
ik kies een symbool uit de dropdown V5 dit wordt screen 3
dit doe ik per brug
als het ongeluk is opgeruimd of weg gerepareerd is druk ik op button V6 om alle matrix borden op elke brug Off te zetten
...
Blynk
V2 Slider (1t/m10)
V3 Dropdown(Closed[1],Arrowdown[2],Arrowleft[3],Arrowright[4],Fifty[5],Seventy[6],Ninety[7],Clear[8],Off[9])
V4 Dropdown(Closed[1],Arrowdown[2],Arrowleft[3],Arrowright[4],Fifty[5],Seventy[6],Ninety[7],Clear[8],Off[9])
V5 Dropdown(Closed[1],Arrowdown[2],Arrowleft[3],Arrowright[4],Fifty[5],Seventy[6],Ninety[7],Clear[8],Off[9])
V6 Button (all Off)
Wemos D1
code:
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
| ////////////////////////////////Wemos D1 Code///////////////////////// /* Comment this out to disable prints and save space */ #define BLYNK_PRINT Serial #include <ESP8266WiFi.h> #include <BlynkSimpleEsp8266.h> int strsym3 ; int strsym4 ; int strsym5 ; // You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "xxx"; // Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "xxx"; char pass[] = "xxx"; BLYNK_WRITE(V2)//selecting balk { int pinValue = param.asInt(); // assigning incoming value from pin V2 to a variable int str2 = pinValue ; } BLYNK_WRITE(V3) { int pinValue = param.asInt();// assigning incoming value from pin V3 to a variable int str3 = strsym3; if (pinValue = 1) { strsym3 = "Closed" ; } else if (pinValue = 2) { strsym3 = "Arrowdown" ; } else if (pinValue = 3) { strsym3 = "Arrowleft" ; } else if (pinValue = 4) { strsym3 = "Arrowright" ; } else if (pinValue = 5) { strsym3 = "Fifty" ; } else if (pinValue = 6) { strsym3 = "Seventy" ; } else if (pinValue = 7) { strsym3 = "Ninety" ; } else if (pinValue = 8) { strsym3 = "Clear" ; } else if (pinValue = 9) { strsym3 = "Off" ; } } BLYNK_WRITE(V4) { int pinValue = param.asInt();// assigning incoming value from pin V3 to a variable int str4 = strsym4 ; if pinValue = 1 { strsym4 = "Closed" ; } else if (pinValue = 2) { strsym4 = "Arrowdown" ; } else if(pinValue = 3) { strsym4 = "Arrowleft" ; } else if (pinValue = 4) { strsym4 = "Arrowright" ; } else if (pinValue = 5) { strsym4 = "Fifty" ; } else if (pinValue = 6) { strsym4 = "Seventy" ; } else if (pinValue = 7) { strsym4 = "Ninety" ; } else if (pinValue = 8) { strsym4 = "Clear" ; } else if (pinValue = 9) { strsym4 = "Off" ; } } BLYNK_WRITE(V5) { int pinValue = param.asInt();// assigning incoming value from pin V3 to a variable int str5 = strsym5 ; if (pinValue = 1) { strsym5 = "Closed" ; } else if (pinValue = 2) { strsym5 = "Arrowdown" ; } else if (pinValue = 3) { strsym5 = "Arrowleft" ; } else if (pinValue = 4) { strsym5 = "Arrowright" ; } else if (pinValue = 5) { strsym5 = "Fifty" ; } else if (pinValue = 6) { strsym5 = "Seventy" ; } else if (pinValue = 7) { strsym5 = "Ninety" ; } else if (pinValue = 8) { strsym5 = "Clear" ; } else if (pinValue = 9) { strsym5 = "Off" ; } } BLYNK_WRITE(V6) { turn off all 8x8 matrix boards (geen idee hoe ik dit nog moet uitwerken) } void setup() { // Debug console Serial.begin(9600); Blynk.begin(auth, ssid, pass); } void loop() { Blynk.run(); Serial.write(str2); Serial.write(str3); Serial.write(str4); Serial.write(str5); } ///////////////End Wemos Code/////////////////////// |
Arduino Uno
code:
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
| //////////////arduino uno code //////////////////// #include "LedControl.h" int Balk = SerialRead(str2) int symbol1 = SerialRead(str3) int symbol2 = SerialRead(str4) int symbol3 = SerialRead(str5) LedControl lc=LedControl(12,10,11,2); // Pins: DIN,CLK,CS, # of Display connected unsigned long delayTime=200; // Delay between Frames // Put values in arrays byte Closed[] = { 0x7e,0xbd,0xdb,0xe7,0xe7,0xdb,0xbd,0x7e }; byte Arrowdown[] = { 0xe7,0xe7,0xe7,0xe7,0x66,0xa5,0xc3,0xe7 }; byte Arrowleft[] = { 0xfe,0xfd,0xfb,0x77,0x6f,0x5f,0x3f,0x07 }; byte Arrowright[] = { 0x7f,0xbf,0xdf,0xee,0xf6,0xfa,0xfc,0xe0 }; byte Fifty[] = { 0x18,0x7a,0x7a,0x3a,0x9a,0xda,0xda,0x18 }; byte Seventy[] = { 0x08,0xea,0xea,0xea,0xca,0x9a,0xba,0xb8 }; byte Ninety[] = { 0x18,0x5a,0x5a,0x5a,0x1a,0xda,0xda,0x18 }; byte Clear[] = { 0xc3,0xbd,0x7a,0x76,0x6e,0x5e,0xbd,0xc3 }; byte Off[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; void matrixon() if Balk = 1 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 2 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 3 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 4 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 5 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 6 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 7 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 8 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 9 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } else if Balk = 10 { Screen1(symbol1); Screen2(symbol2); Screen3(symbol3); } void setup() void loop() /////////////end arduino code///////////// |
30x 8x8 led matrix met max7219
...
nog niks want ik krijg een foutmelding en van daar dus deze post


...
[Voor 0% gewijzigd door evinx op 17-09-2018 21:36. Reden: foute url image]