Skip to content

Commit d21e118

Browse files
authored
Update documentation
1 parent 37d38f2 commit d21e118

File tree

1 file changed

+47
-36
lines changed

1 file changed

+47
-36
lines changed

README.md

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,22 @@ or newer).
127127
But, sometimes Arduino online repository for its Library manager takes
128128
time to update to new releases of Pubnub SDK, so, you might want to
129129
install it manually. To do so, download a release from
130-
[Arduino SDK on Github]`https://github.com/pubnub/arduino/` and move
130+
[Arduino SDK on Github](https://github.com/pubnub/arduino/) and move
131131
the contents to your Arduino libraries directory (on Linux, default
132132
would be: `~/sketchbook/libraries/PubNub/`) and restart your Arduino
133133
IDE. Try out the examples!
134134

135+
Keep in mind that if you both install the library via Arduino Library
136+
Manager _and_ manually, and the versions mismatch, Arduino IDE will
137+
issue warnings like:
138+
139+
Invalid version found: x.y.z
140+
141+
Where `x.y.z` would be the version ID ofthe manually installed library.
142+
This is just a warning, the build and upload process is not impacted in
143+
any way by this.
144+
145+
135146
##Supported Hardware
136147

137148
In general, the most widely available Arduino boards and shields are
@@ -155,8 +166,8 @@ please let us know.
155166
For this to work, all you need to do is to include the Ethernet
156167
Shield Arduino library and start your sketch with:
157168

158-
#include <EthernetClient>
159-
#include <Pubnub.h>
169+
#include <EthernetClient>
170+
#include <Pubnub.h>
160171

161172
As `EthernetClient` is the default `Pubnub_BASE_CLIENT`.
162173

@@ -176,16 +187,16 @@ library.
176187

177188
So, for any WiFi101 compatible hardware, you would:
178189

179-
#include <WiFi101.h>
180-
#define Pubnub_BASE_CLIENT WiFiClient
181-
#include <Pubnub.h>
190+
#include <WiFi101.h>
191+
#define Pubnub_BASE_CLIENT WiFiClient
192+
#include <Pubnub.h>
182193

183194
For hadware that doesn't use WiFi101 library, but provides a
184195
`WiFiClient` class, like ESP8266, you would:
185196

186197
#include <ESP8266WiFi.h>
187-
#define Pubnub_BASE_CLIENT WiFiClient
188-
#include <Pubnub.h>
198+
#define Pubnub_BASE_CLIENT WiFiClient
199+
#include <Pubnub.h>
189200

190201
Of course, please keep in mind that you need to initialize your WiFi
191202
hardware, connect to a WiFi network and possibly do some maintenance,
@@ -199,46 +210,46 @@ that, it expects a working network. We provide examples for some HW.
199210
more different files in you project, but only in one file. In all
200211
other source files (if you have them) `#include <PubNubDefs.h>`,
201212
which doesn't define the global `PubNub` object. This shouldn't be
202-
much of an inconvenience, as most Arduino project have only one
213+
much of an inconvenience, as most Arduino projects have only one
203214
file - the sketch itself.
204215

205216
* We don't provide any SSL/TLS support, because of modest resource of
206-
most Arduino compatible boards. But, some shields/boards have SSL
207-
("Secure") clients and you may succeed in using them instead of the
208-
non-secure clients (say `WiFiClientSecure` instead of
209-
`WiFiClient`). How to do that depends on the specific hardware and
210-
library.
217+
most Arduino compatible boards. But, some shields/boards have SSL
218+
("Secure") clients and you may succeed in using them instead of the
219+
non-secure clients (say `WiFiClientSecure` instead of
220+
`WiFiClient`). How to do that depends on the specific hardware and
221+
library.
211222

212223
* We re-resolve the origin server IP address before each request.
213-
This means some slow-down for intensive communication, but we rather
214-
expect light traffic and very long-running sketches (days, months),
215-
where refreshing the IP address is quite desirable.
224+
This means some slow-down for intensive communication, but we rather
225+
expect light traffic and very long-running sketches (days, months),
226+
where refreshing the IP address is quite desirable.
216227

217228
* We let the users read replies at their leisure instead of
218-
returning an already preloaded string so that (a) they can do that
219-
in loop() code while taking care of other things as well (b) we don't
220-
waste precious RAM by pre-allocating buffers that are never needed.
229+
returning an already preloaded string so that (a) they can do that
230+
in loop() code while taking care of other things as well (b) we don't
231+
waste precious RAM by pre-allocating buffers that are never needed.
221232

222233
* If you are having problems connecting, maybe you have hit
223-
a bug in Debian's version of Arduino pertaining the DNS code. Try using
224-
an IP address as origin and/or upgrading your Arduino package.
234+
a bug in Debian's version of Arduino pertaining the DNS code. Try using
235+
an IP address as origin and/or upgrading your Arduino package.
225236

226237
* The optional timeout parameter allows you to specify a timeout
227-
period after which the subscribe call shall be retried. Note
228-
that this timeout is applied only for reading response, not for
229-
connecting or sending data; use retransmission parameters of
230-
the network library to tune this. As a rule of thumb, timeout
231-
smaller than 30 seconds may still block longer with flaky
232-
network.
238+
period after which the subscribe call shall be retried. Note
239+
that this timeout is applied only for reading response, not for
240+
connecting or sending data; use retransmission parameters of
241+
the network library to tune this. As a rule of thumb, timeout
242+
smaller than 30 seconds may still block longer with flaky
243+
network.
233244

234245
* The vendor firmware for the WiFi shield has dubious TCP implementation;
235-
for example, TCP ports of outgoing connections are always chosen from the
236-
same sequence, so if you reset your Arduino, some of the new connections
237-
may interfere with an outstanding TCP connection that has not been closed
238-
before the reset; i.e. you will typically see a single failed request
239-
somewhere down the road after a reset.
246+
for example, TCP ports of outgoing connections are always chosen from the
247+
same sequence, so if you reset your Arduino, some of the new connections
248+
may interfere with an outstanding TCP connection that has not been closed
249+
before the reset; i.e. you will typically see a single failed request
250+
somewhere down the road after a reset.
240251

241252
* In general, there may be many issues with different shields and
242-
Arduino-compatible boards. A common issue is the firmware
243-
version. Please look to the available info on your shield and board
244-
for troubleshooting.
253+
Arduino-compatible boards. A common issue is the firmware
254+
version. Please look to the available info on your shield and board
255+
for troubleshooting.

0 commit comments

Comments
 (0)