File tree 1 file changed +15
-24
lines changed
1 file changed +15
-24
lines changed Original file line number Diff line number Diff line change 8
8
#endif
9
9
#endif
10
10
11
- #define COL 12
12
- #define ROW 4
13
-
14
- String str;
15
- float myfloat[COL][ROW];
16
- int idx;
17
11
12
+ #include < IPAddress.h>
13
+ #include < WiFiGeneric.h>
14
+ #include < WiFi.h>
18
15
19
16
void setup () {
20
- idx = 0 ;
21
17
Serial.begin (115200 );
22
- for (int i = 0 ; i < COL; ++i) {
23
- for (int j = 0 ; j < ROW; ++j) {
24
- ++idx;
25
- myfloat[i][j] = 1 .0f * idx;
26
- }
27
- }
18
+ Serial.setDebugOutput (true );
19
+
20
+
21
+ IPAddress apIP (192 ,168 ,4 ,1 );
22
+ IPAddress gwIP (192 ,168 ,4 ,1 );
23
+ IPAddress subnet (255 ,255 ,255 ,0 );
24
+
25
+ WiFi.softAPConfig (apIP, gwIP, subnet);
26
+
27
+
28
+
29
+
28
30
}
29
31
30
32
void loop () {
31
- ++idx;
32
- if (idx >= (COL*ROW)) {
33
- idx = 0 ;
34
- }
35
-
36
- str = myfloat[idx / ROW][idx % ROW];
37
- Serial.print (F (" str: '" ));
38
- Serial.print (str);
39
- Serial.print (F (" ' '" ));
40
- Serial.print (String (myfloat[idx / ROW][idx % ROW], 2 ));
41
- Serial.println (' \' ' );
42
33
delay (1000 );
43
34
}
You can’t perform that action at this time.
0 commit comments