Skip to content

Commit ccaa903

Browse files
update some wifi config instructions
1 parent 21fd184 commit ccaa903

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

examples/StandardFirmataWiFi/StandardFirmataWiFi.ino

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
2323
See file LICENSE.txt for further informations on licensing terms.
2424
25-
Last updated by Jeff Hoefs: April 10th, 2016
25+
Last updated by Jeff Hoefs: April 17th, 2016
2626
*/
2727

2828
/*
2929
README
3030
31-
StandardFirmataWiFi is a WiFi server application. You will need a Firmata client library with
32-
a network transport in order to establish a connection with StandardFirmataWiFi.
31+
StandardFirmataWiFi enables the use of Firmata over a TCP connection. It can be configured as
32+
either a TCP server or TCP client.
3333
3434
To use StandardFirmataWiFi you will need to have one of the following
3535
boards or shields:
@@ -49,10 +49,10 @@
4949
- ESP8266 requires the Arduino ESP8266 core which can be obtained here:
5050
https://github.com/esp8266/Arduino
5151
52-
In order to use the WiFi Shield 101 with Firmata you will need a board with at least
53-
35k of Flash memory. This means you cannot use the WiFi Shield 101 with an Arduino Uno
54-
or any other ATmega328p-based microcontroller or with an Arduino Leonardo or other
55-
ATmega32u4-based microcontroller. Some boards that will work are:
52+
In order to use the WiFi Shield 101 with Firmata you will need a board with at least 35k of Flash
53+
memory. This means you cannot use the WiFi Shield 101 with an Arduino Uno or any other
54+
ATmega328p-based microcontroller or with an Arduino Leonardo or other ATmega32u4-based
55+
microcontroller. Some boards that will work are:
5656
5757
- Arduino Zero
5858
- Arduino Due
@@ -87,8 +87,7 @@
8787

8888
/*
8989
* Uncomment the following include to enable interfacing with Serial devices via hardware or
90-
* software serial. Note that if enabled, this sketch will likely consume too much memory to run on
91-
* an Arduino Uno or Leonardo or other ATmega328p-based or ATmega32u4-based boards.
90+
* software serial.
9291
*/
9392
//#include "utility/SerialFirmata.h"
9493

@@ -921,10 +920,10 @@ void setup()
921920
DEBUG_PRINT(".");
922921
streamConnected = stream.maintain();
923922
}
924-
if (streamConnected) {
923+
if (streamConnected) {
925924
DEBUG_PRINTLN( "TCP connection established" );
926925
} else {
927-
DEBUG_PRINTLN( "failed to establish TCP connection" );
926+
DEBUG_PRINTLN( "failed to establish TCP connection" );
928927
}
929928
printWifiStatus();
930929

examples/StandardFirmataWiFi/wifiConfig.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
*
44
* You must configure your particular hardware. Follow the steps below.
55
*
6-
* Currently StandardFirmataWiFi is configured as a Wi-Fi server. An option to
7-
* configure as a Wi-Fi client will be added in the future.
6+
* By default, StandardFirmataWiFi is configured as a TCP server, to configure
7+
* as a TCP client, see STEP 2.
88
*============================================================================*/
99

1010
// STEP 1 [REQUIRED]
1111
// Uncomment / comment the appropriate set of includes for your hardware (OPTION A, B or C)
12-
// Option A is enabled by default.
12+
// Arduino MKR1000 or ESP8266 are enabled by default if compiling for either of those boards.
1313

1414
/*
1515
* OPTION A: Configure for Arduino MKR1000 or Arduino WiFi Shield 101
@@ -75,8 +75,8 @@
7575
* The appropriate libraries are included automatically when compiling for the ESP8266 so
7676
* continue on to STEP 2.
7777
*
78-
* IMPORTANT: You must have the esp8266 board support installed. To easily install this board, open
79-
* see the instructions here: https://github.com/esp8266/Arduino#installing-with-boards-manager.
78+
* IMPORTANT: You must have the esp8266 board support installed. To easily install this board see
79+
* the instructions here: https://github.com/esp8266/Arduino#installing-with-boards-manager.
8080
*/
8181
//do not modify the following 14 lines
8282
#ifdef ESP8266
@@ -108,12 +108,18 @@
108108
//#define HUZZAH_WIFI
109109

110110

111-
// STEP 2 [REQUIRED for all boards and shields]
111+
// STEP 2 [OPTIONAL for all boards and shields]
112+
// If you want to setup you board as a TCP client, uncomment the following define and replace
113+
// the IP address with the IP address of your server.
114+
//#define SERVER_IP 10, 0, 0, 15
115+
116+
117+
// STEP 3 [REQUIRED for all boards and shields]
112118
// replace this with your wireless network SSID
113119
char ssid[] = "your_network_name";
114120

115121

116-
// STEP 3 [OPTIONAL for all boards and shields]
122+
// STEP 4 [OPTIONAL for all boards and shields]
117123
// If you want to use a static IP (v4) address, uncomment the line below. You can also change the IP.
118124
// If the first line is commented out, the WiFi shield will attempt to get an IP from the DHCP server.
119125
// If you are using a static IP with the ESP8266 then you must also uncomment the SUBNET and GATEWAY.
@@ -122,11 +128,6 @@ char ssid[] = "your_network_name";
122128
//#define GATEWAY_IP_ADDRESS 0,0,0,0 // REQUIRED for ESP8266_WIFI, optional for others
123129

124130

125-
// STEP 4 [OPTIONAL for all boards and shields]
126-
// uncomment and replace with the IP address of your server if the Arduino is the TCP client
127-
//#define SERVER_IP 10, 0, 0, 15
128-
129-
130131
// STEP 5 [REQUIRED for all boards and shields]
131132
// define your port number here, you will need this to open a TCP connection to your Arduino
132133
#define SERVER_PORT 3030
@@ -214,7 +215,7 @@ char wep_key[] = "your_wep_key";
214215
#else
215216
WiFiServerStream stream(SERVER_PORT);
216217
#endif
217-
218+
218219
/*==============================================================================
219220
* PIN IGNORE MACROS (don't change anything here)
220221
*============================================================================*/

0 commit comments

Comments
 (0)