begin()


Description

Initializes the network parameters of PHPoC Shield for Arduino.

Syntax

Phpoc.begin()

Phpoc.begin(debug_flag)

Parameters

debug_flag - flags for debugging

Debug Flags Descriptions
PF_LOG_SPI debugging flag for SPI communication
PF_LOG_NET debugging flag for network communication
PF_LOG_APP debugging flag for applications such as sending an E-mail

Returns

1 - on success

0 - on failure

Example

#include <SPI.h>
#include <Phpoc.h>

void setup()
{
    Serial.begin(9600);

    if(Phpoc.begin() != 0)
        Serial.println("Success");
    else
        Serial.println("Fail");
}

void loop()
{
}