Skip to content

Commit e5582d0

Browse files
default config to MKR1000 / Arduino WiFi Shield 101
1 parent 9f476ad commit e5582d0

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

examples/StandardFirmataWiFi/wifiConfig.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,7 @@
1212
// Option A is enabled by default.
1313

1414
/*
15-
* OPTION A: Configure for Arduino WiFi shield
16-
*
17-
* This will configure StandardFirmataWiFi to use the original WiFi library (deprecated) provided
18-
* with the Arduino IDE. It is supported by the Arduino WiFi shield (a discontinued product) and
19-
* is compatible with 802.11 B/G networks.
20-
*
21-
* To configure StandardFirmataWiFi to use the Arduino WiFi shield
22-
* leave the #define below uncommented.
23-
*/
24-
#define ARDUINO_WIFI_SHIELD
25-
26-
//do not modify these next 4 lines
27-
#ifdef ARDUINO_WIFI_SHIELD
28-
#include "utility/WiFiStream.h"
29-
WiFiStream stream;
30-
#endif
31-
32-
/*
33-
* OPTION B: Configure for WiFi 101
15+
* OPTION A: Configure for Arduino MKR1000 or Arduino WiFi Shield 101
3416
*
3517
* This will configure StandardFirmataWiFi to use the WiFi101 library, which works with the Arduino WiFi101
3618
* shield and devices that have the WiFi101 chip built in (such as the MKR1000). It is compatible
@@ -42,14 +24,32 @@ WiFiStream stream;
4224
* IMPORTANT: You must have the WiFI 101 library installed. To easily install this library, opent the library manager via:
4325
* Arduino IDE Menus: Sketch > Include Library > Manage Libraries > filter search for "WiFi101" > Select the result and click 'install'
4426
*/
45-
//#define WIFI_101
27+
#define WIFI_101
4628

4729
//do not modify these next 4 lines
4830
#ifdef WIFI_101
4931
#include "utility/WiFi101Stream.h"
5032
WiFi101Stream stream;
5133
#endif
5234

35+
/*
36+
* OPTION B: Configure for Arduino WiFi shield
37+
*
38+
* This will configure StandardFirmataWiFi to use the original WiFi library (deprecated) provided
39+
* with the Arduino IDE. It is supported by the Arduino WiFi shield (a discontinued product) and
40+
* is compatible with 802.11 B/G networks.
41+
*
42+
* To configure StandardFirmataWiFi to use the Arduino WiFi shield
43+
* leave the #define below uncommented.
44+
*/
45+
//#define ARDUINO_WIFI_SHIELD
46+
47+
//do not modify these next 4 lines
48+
#ifdef ARDUINO_WIFI_SHIELD
49+
#include "utility/WiFiStream.h"
50+
WiFiStream stream;
51+
#endif
52+
5353
/*
5454
* OPTION C: Configure for HUZZAH
5555
*
@@ -148,7 +148,7 @@ char wep_key[] = "your_wep_key";
148148

149149
// ignore SPI pins, pin 5 (reset WiFi101 shield), pin 7 (WiFi handshake) and pin 10 (WiFi SS)
150150
// also don't ignore SS pin if it's not pin 10
151-
// TODO - need to differentiate between Arduino WiFi1 101 Shield and Arduino MKR1000
151+
// Not needed for Arduino MKR1000.
152152
#define IS_IGNORE_WIFI101_SHIELD(p) ((p) == 10 || (IS_PIN_SPI(p) && (p) != SS) || (p) == 5 || (p) == 7)
153153

154154
// ignore SPI pins, pin 4 (SS for SD-Card on WiFi-shield), pin 7 (WiFi handshake) and pin 10 (WiFi SS)

0 commit comments

Comments
 (0)