Home | pfodApps/pfodDevices | WebStringTemplates | Java/J2EE | Unix | Torches | Superannuation | | About Us
 

Forward Logo (image)      

pfod™ Parser Library
for Arduino/non-Arduino microprocessors

by Matthew Ford 20th October 2016 (originally posted 4th January 2015)
© Forward Computing and Control Pty. Ltd. NSW Australia
All rights reserved.

pfod™ Parser Libraries V2.39
(Protocol For Operations Discovery)
Libraries for Arduino/non-Arduino to parse pfodApp messages.

This page describes the library for Arduino/non-Arduino microprocessors which you can use to parse pfod messages sent from the pfodApp.
The code generated by pfodDesignerV2 V2.0.2090+ needs pfodParser library V2.35+. pfodApp V2.0.213+ needs pfodParser examples in library V2.35+

For Arduino based microprocessors, e.g. UNO, ESP8266 etc, use the pfodParser library as described below.

For BBC micro:bit use the pfodParserMicroBit library. That page describes how to install the library.

For non-Arduino based microprocessors, e.g. PIC etc, use the pfodParserC library. That page has detailed installation instructions and examples.

For ESP8266 use there is additional special pfodESP8266BufferedClient library (V2.2) which provides buffering TCP writes to WiFi clients and some utility methods.
See the SimplifiedUARTtoWiFiBridge example included. This this library is used for the pfodDesigner ESP8266 generated code. You need to install the pfodESP8266BufferedClient library, as well as the pfodParser.zip, in order to compile the ESP8266 code generated by pfodDesignerV2. See the Installation instructions below. The pfodESP8266BufferedClient library is also used in the Cheap/Simple Wifi Shield and ESP8266-01 Wifi Shield
Note: If you have previously installed the pfodESP8266WiFi library, delete that library directory completely as it is not compatible with ESP8266.com IDE plugin V2.0+
There is also a pfodLinkIt library available here for the LinkIt ONE card.

Which includes to use for Arduino based microprocessors?

Install the pfodParser library as described below and then

for the basic pfodParser for bluetooth and wifi/ethernet connections without security use
#include <pfodEEPROM.h>
#include <pfodParser.h>

OR
for pfod parser with optional 128bit security use (also use this for
ESP8266 OLIMEXsee example sketch)
#include <pfodEEPROM.h>
#include <pfodSecurity.h>

OR
for pfod SMS parser with optional 128bit security use

#include <pfodEEPROM.h>
#include <pfodSMS_SIM900.h>

#include <pfodSecurity.h>

OR (not recommended)
for pfod parser for use with ESP8266 AT command driven (with optional 128bit security) use

#include <pfodEEPROM.h>
#include <pfodESP8266_AT.h>

#include <pfodSecurity.h>

See the example sketches included with the library or use the free pfodDesignerV2 app to generate the Arduino code for you.

Version 2.39 revised Bluefruit LE SPI example
Version 2.38 added Bluefruit LE SPI example
Version 2.37 fixed max msg size test
Version 2.35 fixed image dwg example to match pfodApp V2.0.213
Version 2.34 update samples for pfodDesignerV2 and pfodAppV2
Version 2.33 fixes pfodEEPROM for RFduino which has no EEPROM, renames examples to remove _V2 (V2 examples not complete yet)
Version 2.32 fixes Arduino/Genuino 101 example for new Intel board V1.0.5
Version 2.31 added pfodEEPROM.h
Version 2.30 added new menu msgs , and ; to pfodSecurity
Version 2.19 – 2.20 added more Sample Screen examples for BLE modules
Version 2.18 added Sample Screens example
Version 2.17 fixed continual disconnect
Version 2.16 moved pfodBufferedWiFiClient to pfodESP2866WiFi library
Version 2.15 added pfodBufferedWiFiClient
Version 2.14 removed most calls to flush() because flush on WiFi actually just clears out the incoming data.
Version 2.13 fixed pfodBluetooth.ino example code.
Version 2.12 fixed UnoStarter.ino to always respond to pfodApp cmd as all pfodDevices should
Version 2.11 default pfodSecurity connection timeout set to 15sec. Uses pfodApp V1.2.85+ keepAlive to keep connection open.
Version 2.10 added isRefresh().
Version 2.9 revises EEPROM include.
Version 2.8 allows non-hex passwords.
Version 2.7 adds ESP8266 OLIMEX support.
Version 2.6 improves ESP8266_AT support, does not timeout if sending rawdata.
Version 2.5 allows more time for SMS/GPRS shield to connect to the network after powering up and fixes complier warnings and protects against enabling debugging without setting a debugOut stream. Adds support for ESP8266 AT command driven.
Version 2.4 fixes the getNextArg() method. This method is not used by the pfod code.
Version 2.3, this version, uses EEPROM.h and needs that include added to your sketch, as shown above.

Version 2.2 removes all the Atmel AVR 8bit assembler code and replaces it with C code. The library now compiles on all Arduino processors.
Version 2 has only one zip file which contains all the library files, pfodParser.zip

Installation:

If you have previously installed any version of the libraries, pfodCmdParser, pfodParser, pfodCHAP or pfodESP8266WiFi, then find them in your libraries directory and delete their folders completely.

a) Then download the pfodParser.zip and pfodESP2866WiFi.zip zip files to your computer, move it to your desktop or some other folder you can easily find

b) Then use Arduino 1.6.4 IDE menu option SketchImport LibraryAdd Library to install it.
(If Arduino does not let you install it because the library already exists then find and delete the older
pfodCmdParser, pfodParser or pfodCHAP folders and then import this one)

c) Stop and restart the arduino IDE and under File->Examples you should now see pfodParser and pfodESP2866WiFi libraries and a number of examples.

Library Reference:

pfodParser

Description
pfodParser for Arduino, Parses commands of the form {cmd} or { cmd ` arg1`arg2 ... } or { cmd ~ arg1 ~ arg2 … }
The args are optional.

This is a complete parser for ALL commands a pfodApp will send to a pfodDevice
pfodParser adds about 500 bytes to the program and uses about 280 bytes RAM

Methods

pfodParser – no argument constructor, see example code.

pfodParser.connect(Stream*) – connects the parser to an input stream. E.g parser.connect(&Serial); This is usually called from setup().

pfodParser.parse() – parses commands from the connected stream. This is called from loop().
Return: return 0 if complete message not found yet else return first char of cmd when see closing } or ignore msg if pfodMaxCmdLen bytes after {
On non-zero return args[] contains the cmd null terminated followed by the args null terminated argsCount is the number of args
Check isRefresh() to see if this is a refresh command.

isRefresh() – returns bool, true or false. Returns true if last command started with {: indicating pfodApp is requesting a refresh of the menu associated with the cmd.
This method only returns true if the refresh interval of the current menu is < 0. See the pfodSpecification.pdf for details.

pfodParser.closeConnection() – closes the connection to this parser by clearing out any partial commands being parsed.
This is usually called when the CloseCommand, {!}, is received or when the pfodDevice sends a CloseCommand to the pfodApp.
NOTE: The Stream connected to the parser is not cleared. So there is no need to call connect again if the Stream has not changed.

pfodParser inherits from Print so you can use all the Print methods to write the responses back to pfodApp

pfodParser.getCmd() – returns pointer to null terminated parsed command.

pfodParser.getFirstArg() – returns pointer to null terminated first arg if any, else if no args returns pointer to null.

pfodParser.getNextArg(byte*) – returns pointer to start of next arg or pointer to null is reached end of args. Need to call getFirstArg() to get byte * to pass to this method.

pfodParser.getArgsCount() – returns the number of args in the last message parsed.

pfodParser.parseLong(byte* idxPtr, long *result) – parses a null terminated bytes into a long, returns pointer to next byte after terminating null. Long result is returned via long *

Stream* pfodParser.getPfodAppStream()returns a pointer to the Stream that is connected to this parser.

pfodParser.setIdleTimeout(unsigned long timeout)set the connection timeout in seconds. Does nothing in pfodParser, but is essential for pfodSecurity and is included here for code compatible. NOTE: for ESP8266_AT this method does nothing, use ESP8266_AT.setIdleTimeout(...) instead.

pfodParser.setDebugStream(Stream* debugOut)sets the debug output stream. This must be called before any other method in this class is called. It is only used if you modify the library code to turn on debugging.


Examples

The UnoStarter sketch lets you test out your Uno board's I/O from your Android mobile via bluetooth. There is also a pfodBluetooth example that uses Serial to connect via IteadStudio Bluetooth sheild.

pfodSecurity

Description
pfodSecurity for Arduino, Parses commands of the form {cmd} hashcode or { cmd ` arg1`arg2 ... } hashcode or { cmd ~ arg1 ~ arg2 … } hashcode
The args are optional.
It supports an optional challenge and response security, via a 128 bit secret password, which protects against unauthorized connections. Each message from the pfodDevice has a encryption strength hash code added to it and the hash code of every incoming command is checked for validity. If any of these fail, the connection is closed.
Generate you own secret password (and QR code) using the
SecretKeyGenerator
See Challenge and Response Security for Internet connected pfodDevices™ for the details of security provided by this library.

This is a complete paser for ALL commands a pfodApp will send to a pfodDevice
pfodSecurity adds about 6300 bytes to the program and uses about 400 bytes RAM and 19 bytes of EEPROM

Methods

pfodSecurity – no argument constructor

pfodSecurity.connect(Stream* io)connects the parser to an input stream, with no password specified. E.g parser.connect(&Serial); This is usually called from setup().

pfodSecurity.connect(Stream* io, const __FlashStringHelper *hexKey) – connects the parser to an input stream, with a password specified. E.g pfodSecurity.connect(&Serial, F("173057F7A706AF9BBE65D51122A14CEE")); This is usually called from setup(). The password can be upto 32 hex digits in length. It is stored in EEPROM starting at location 0 and uses the next 19 bytes of EEPROM for persistent storage.

pfodSecurity.connect(Stream* io, const __FlashStringHelper *hexKey, int eepromAddress) – connects the parser to an input stream, with a password specified. E.g pfodSecurity.connect(&Serial, F("173057F7A706AF9BBE65D51122A14CEE"), 20); This is usually called from setup(). The password can be upto 32 hex digits in length. It is stored in EEPROM starting at the given location (20 in this example) and uses the next 19 bytes of EEPROM for persistent storage.

pfodSecurity.connect(pfod_Base* io)connects the parser to an SMS or ESP8266_AT input stream, with no password specified. E.g parser.connect(pfodSMS); This is usually called from setup().

pfodSecurity.connect(pfod_Base* io, const __FlashStringHelper *hexKey) – connects the parser to an SMS or ESP8266_AT input stream, with a password specified. E.g pfodSecurity.connect(pfodSMS, F("173057F7A706AF9BBE65D51122A14CEE")); This is usually called from setup(). The password can be upto 32 hex digits in length. It is stored in EEPROM starting at location 0 and uses the next 19 bytes of EEPROM for persistent storage.

pfodSecurity.connect(pfod_Base* io, const __FlashStringHelper *hexKey, int eepromAddress) – connects the parser to an SMS or ESP8266_AT input stream, with a password specified. E.g pfodSecurity.connect(pfodSMS, F("173057F7A706AF9BBE65D51122A14CEE"), 20); This is usually called from setup(). The password can be upto 32 hex digits in length. It is stored in EEPROM starting at the given location (20 in this example) and uses the next 19 bytes of EEPROM for persistent storage.

pfodSecurity also has all the pfodParser methods as well. Only the differences are noted below.

pfodSecurity.closeConnection() – closes the connection to this parser by clearing out any partial commands being parsed AND disables the sending of rawData. This prevents filling up transmission buffers with data when there is no connection.
This is usually called when the CloseCommand, {!}, is received or when the pfodDevice sends a CloseCommand to the pfodApp.
NOTE: The Stream connected to the parser is not cleared. So there is no need to call connect again if the Stream has not changed.
Also once another command is received the rawData output is re-enabled.

pfodSecurity.setIdleTimeout(unsigned long timeout)set the timeout in seconds, which closes the connection if no commands received from the pfodApp and no raw data is being sent. Default is 15sec. Set to >0 if you want the connection to timeout (recommended). This closes the connection after the timeout and returns ! from the parser. The sketch code should then do any clean up necessary to allow another connection. There is also an authentication time out.

pfodSecurity.setAuthorizationTimeout(unsigned long timeout)set the authorization timeout in seconds. Default is 15sec. Not used if no password set. If a password is set and the pfodApp send the start authorization command, {_}, then authorization process must be completed within this time out otherwise the pfodDevice will return return ! from the parser. The sketch code should then do any clean up necessary to allow another connection.

pfodSecurity.setDebugStream(Stream* debugOut)sets the debug output stream. This must be called before any other method in this class is called. It is only used if you modify the library code to turn on debugging.

Example

See the example sketches included with the library. They include a UNO bluetooth sketch, pfodEthernet and pfodEthernetWithPassword Also see A Simple WiFi/Arduino pfodDevice.

pfodSMS_SIM900

Description
pfodSMS_SIM900 for Arduino is a subclass of pfod_Base and handles the SMS messages to and from a SIM900 based shield.
See Reliable Remote Control via SMS with pfodSMS for the details of the design.

This class is designed to be passed to pfodSecurity in place of the io Stream pointer.
pfodSMS_SIM900 together with pfodSecurity adds about 16300 bytes to the program and uses about 3000 bytes RAM and 19 bytes of EEPROM
Because of the RAM requirements pfodSMS_SIM900 cannot be used on an UNO. You need to use a Mega2560 or similar with more then 4K of RAM.

Methods

pfodSMS_SIM900 – no argument constructor

pfodSMS_SIM900.init(Stream* io)connects the pfodSMS_SIM900 to the GPRS input stream E.g pfodSMS.init(&Serial); This is usually called from setup().

pfodSMS_SIM900.init(Stream* io, int powerResetPin) – connects the pfodSMS_SIM900 to the GPRS input stream and uses Digital pin powerResetPin to turn the GPRS shield on. E.g pfodSMS.init(&Serial, 9); This should be called from setup(). If the power up process fails it just tries again. It can fail if the SIM card is not inserted or if it has a pin number set. If you see the GPRS shield power led cycle on and off every 20secs then that indicates the shield is not initializing correctly.

pfodSMS_SIM900.setIdleTimeout(unsigned long timeout)set the timeout in seconds, default 600 (10mins). This should not be set to 0.
For a SMS connection the idle time out functions differently. Once a user has connected with pfodApp, that connection registered by the pfodDevice and is maintained forever until it is closed by a CloseCommand,
{!}
However after the idle time out, i.e. no new SMS messages from the pfodApp for 10mins, the pfodDevice will accept a new connection from another pfodApp and close the old connection. The old pfodApp will now not not be able to connect until the new connection either closes its connection or does not send any SMS msgs for 10mins.

pfodSMS_SIM900.setDebugStream(Stream* debugOut)sets the debug output stream. This must be called before any other method in this class is called. It is only used if you modify the library code to turn on debugging.

Example

See the pfodSMS_SIM900 example sketch included with the library. It connects with pfodApp via SMS using a SIM900 based GPRS shield.

pfodESP8266BufferedClient – V2.3 (Works with ESP8266.com IDE plugin V2.0+)

Description
pfodESP8266BufferedClient provides buffering and other utilities for Ivan Grokhotkov et al's ESP8266WiFi library
If you have installed the pfodESP8266WiFi library, delete it completely as it is not compatible with the ESP8266WiFi library V2.0+

Methods

pfodESP8266BufferedClient – Additional class, extends from Stream and provides buffered non-blocking TCP writes via WiFiClient.
You must call one of this classes' methods each loop to ensure the last data is written.
pfodESP8266BufferedClient.peek() or pfodESP8266BufferedClient.available() are often used.

pfodESP8266BufferedClient() – constructor

pfodESP8266BufferedClient.connect(WiFiClient*) – attaches an ESP8266 WiFiClient for TCP reads and buffered non-blocking writes.

pfodESP8266BufferedClient.write(..) – preforms a buffered write to the TCP/IP WiFi connection. Bytes are buffered in a 1460 byte buffer until either the buffer is full OR there have been not bytes added for 10mS.

pfodESP8266BufferedClient.flush() – writes any buffered data to the WiFi connection. This will block if the ESP2866 is still waiting for the previously send packet be ACKed by the remote client.

pfodESP8266BufferedClient.setDebugStream(Stream* debugOut)sets the debug output stream. This must be called before any other method in this class is called. It is only used if you modify the library code to turn on debugging.

pfodESP8266Utils – Additional static support methods

pfodESP8266Utils.strncpy_safe(char* dest, const char* src, size_t maxLen) – copies at most maxLen-1 chars from src to dest and terminates with a null.

pfodESP8266Utils.urldecode2(char *dst, const char *src) – Decodes url escaped chars.

pfodESP8266Utils.parseLong(uint8_t* idxPtr, long *result) – parses chars to a long, stores long in result. Will parse between -2,147,483,648 to 2,147,483,647

int pfodESP8266Utils.isEmpty(const char* str) – returns 1 if all chars in string <= space (i.e. spaces, tabs, ctrl chars etc) or strlen == 0

char * pfodESP8266Utils.isEmpty(const char* str) – removes leading and trailing chars that are <= space (i.e. spaces, tabs, ctrl char etc)

pfodESP8266Utils.ipStrToNum(const char* ipStr) – returns uint32_t for passing to ipAddress( ), works for IPV4 only, parses "10.1.1.200" and "10,1,1,200" strings, extra spaces ignored eg "10, 1, 1, 200" is OK.

pfodESP8266Utils.encryptionTypeToStr(uint8_t type) – returns const char* to the name of the ESP8266 encryption type.

pfodESP8266Utils.scanForStrongestAP(char* result, size_t resultLen) – scans for Access Points and returns the name of the one with the strongest signal.

pfodESP8266WebConfig – provides class for setting network parameters via a webpage. See HomeAutomation -- InlineWiFiPowerSwitch -- Adding Web Page Network Configuration for an example if its use.

pfodESP8266WiFi – V2.0.3 (Do not use the library with ESP8266.com IDE plugin V2.0+)

Description
pfodESP8266WiFi is a non-blocking version of Ivan Grokhotkov et al's ESP8266WiFi library combined with their ESP8266WebServer library pre V2.
This pfodESP8266WiFi is not compatible with the ESP8266WiFi library V2.0+
The file names have been changed to make the include's unique, but otherwise almost all the code is the same, except that calls to WiFiClient.write() now do not block unless the ESP8266 is still busy handling the previous packet send (waiting for ACK). One new method has been added,
isSendWaiting(), so you can check if the ESP8266 is still busy handling the previous packet. If isSendWaiting() returns true then calling WiFiClient.write() will block until the previous packet is ACKed (or a 5sec timeout occurs).

Using the library, ensures the main sketch loop() remains responsive (not blocked) while sending WiFi packets. The standard library blocks the main loop for 10mS to 200mS while sending a packet, depending on how long it takes the remote client to ACK the packet.

This library also includes the ESP8266WebServer library, but the web server clients have not been modified to use the pfodESP8266BufferedClient and sending web pages larger then 1460 bytes will block the main loop.

Version 1.0.1 adds pfodESP8266Utils to simplify the main sketch.
Version 1.0.2 returns pointer to pfodESP2866BufferedClient from connect()
Version 1.0.3 minor change to includes
Version 1.0.4 correction to urldecoder in Utils
Version 1.0.5 correct includes, added pfodESP8266WebConfig and rev11 example
Version 1.0.6 ipStrToNum now handles strings like “10, 1, 1, 200” as well as “10.1.1.200”
Version 1.0.7 fixed setting staticIP after using DHCP config
Version 2.0.1 updated library to use ESP8266 V2.0.0 code base.
Version 2.0.2 revised pfodESP8266WebConfig methods
Version 2.0.3 remove example that no longer works

Methods

Except as noted here the methods are the same as the ESP8266WiFi and ESP2866WebServer libraries

WiFiClient.write(...) – first call does not block, subsequent calls only block if the ESP8266 is still waiting for the previously send packet be ACKed by the remote client.

WiFiClient.isSendWaiting() – Additional method, returns true if the ESP8266 is still waiting for the previously send packet be ACKed by the remote client.

pfodESP8266BufferedClient – Additional class, extends from Stream and provides buffered non-blocking TCP writes via WiFiClient.

pfodESP8266BufferedClient() – constructor

pfodESP8266BufferedClient.connect(WiFiClient*) – attaches an ESP8266 WiFiClient for TCP reads and buffered non-blocking writes.

pfodESP8266BufferedClient.write(..) – preforms a buffered non-blocking write to the TCP/IP WiFi connection. Bytes are buffered in a 1460 byte buffer until either the buffer is full OR there have been not bytes added for 10mS. If the ESP2866 is still busy handling the previous packet send (waiting for ACK) AND there is still space in the 1460 buffer, the write is delayed until either the buffer is full OR the ESP2866 is not busy.
If the call to write() blocks for more then 5 seconds then the connection is closed and the write() returns
((size_t) - 1))
NOTE: All the methods inherited from Stream, as well as pfodESP8266BufferedClient.connected(), will first check if there is delayed buffered data that should be written (i.e. >10mS since last data added to buffer). In order to write the delayed buffered data your sketch must call one of these methods every loop(). This is usually the case as pfodESP8266BufferedClient.available() and/or pfodESP8266BufferedClient.connected() are normally called each loop.

pfodESP8266BufferedClient.isSendWaiting() – returns true if the ESP8266 is still waiting for the previously send packet be ACKed by the remote client. (see the examples for how to use this)

pfodESP8266BufferedClient.flush() – writes any buffered data to the WiFi connection. This will block if the ESP2866 is still waiting for the previously send packet be ACKed by the remote client.

pfodESP8266BufferedClient.setDebugStream(Stream* debugOut)sets the debug output stream. This must be called before any other method in this class is called. It is only used if you modify the library code to turn on debugging.

pfodESP8266BufferedClient also implements all the other Stream methods.

Example

See the pfodESP8266BufferedClient example sketches included with the library. UARTtoWiFiBridge shows how isSendWaiting() can be used to prevent blocking and SimplifiedUARTtoWiFiBridge shows how to use pfodESP2866BufferedClient to provide non-blocking WiFi writes.



pfodESP8266_AT (not recommended)

Description
pfodESP2866 is designed for use with ESP8266-01 boards using the AT command set and connected to a hardware serial UART of an Arduino compatible board. Actual test hardware is Teensy LC using Serial1 at 9600 to connect to ESP8266-01 version no 0018000902-AI03 (i.e. AT cmd version No 0018), Vendor:www.ai-thinker.com Version:0.9.2.4. This version of the AT command set does NOT support static IP settings, only DHCP is supported

This version of the AT command performs a hardware reset before trying to connect to the AP. In testing the board eventually connected after a number of attempts. This library keeps retrying until the ESP8266-01 connects. When the ESP8266-01 connects to the AP the blue indicator flashes at 5 sec intervals.

The AT command set is difficult to use and although this library allows sending rawdata back to the pfodApp, it is not recommended as errors occur frequently. When an error is detected or the ESP8266-01 stops responding, this library performs hardware reset performed and the ESP8266-01 is re-initialized and re-connected to the AP.

To enable the hardware reset you need to connect one digital output to the ESP8266-01 reset pin and pass digital output pin number to the init(..) method.

Although ESP8266 supports up to 4 connections in server mode, only the first connection (number 0) has it data processed. Data from any other connection is just dropped, since pfod protocol only supports a single connection to the pfodDevice at a time.

This class is designed to be passed to pfodSecurity in place of the io Stream pointer.

pfodESP8266_AT together with pfodSecurity adds about 16600 bytes to the program and uses about 3000 bytes RAM and 19 bytes of EEPROM
Because of the RAM requirements pfodESP8266_AT cannot be used on an UNO. You need to use a Mega2560 or similar with more then 4K of RAM. This library was tested using an TeensyLC board.

Methods

pfodESP8266_AT – no argument constructor

pfodESP8266_AT.init(Stream* io, const char* ssid, const char* pw, int portNo, int resetPinNo)connects the ESP8266 board UART to the io stream of the Arduino, and sets the ssid and pw for the local network to connect to. It also sets the portNo for the ESP8266 to listen on for connections from pfodApp and specifies the digital output that drives the ESP8266 reset pin.
If the portNo is less than 1 or greater than 65534, port 23 is set as the server listen port.
If the reset pin of ESP8266 is not connected (
it is recommended that you DO connect the reset pin) then pass -1 for the resetPinNo and the software will only perform ESP8266 software resets.
E.g.
esp8266_at.init(&Serial1,"myNetwork","networkPassword",23, 2); // ESP8266 reset connected to digital pin D2.

pfodESP8266_AT.setIdleTimeout(unsigned long timeout)set the timeout in seconds, default 40. This should not be set to 0.
For connections to ESP8266 boards using the AT command set, if there is no pfod command, or raw data, for this many seconds (default 40) the connection is closed. If you want to keep the pfodApp connection open, you can specify a refresh interval in the pfod menu message or send raw data at intervals less than the timeout. See the pfodSpecification for details of the menu refresh. The pfodDesignerV2 can also be used to set a refresh interval for a menu.

pfodESP8266_AT.setDebugStream(Stream* debugOut)sets the debug output stream. This must be called before any other method in this class is called. It is only used if you modify the library code to turn on debugging.

Example

See the pfodESP8266_AT example sketch included with the library. It connects with pfodApp via WiFi. You need to edit the sketch to set your WiFi network's ssid and password.



AndroidTM is a trademark of Google Inc, For use of the Arduino name see http://arduino.cc/en/Main/FAQ


pfodDevice™ and pfodApp™ are trade marks of Forward Computing and Control Pty. Ltd.


Forward home page link (image)

Contact Forward Computing and Control by
©Copyright 1996-2015 Forward Computing and Control Pty. Ltd. ACN 003 669 994