Reference   Language | Libraries | Comparison | Changes

SigFox

SigFox.endPacket()

Description

Called after writing SigFox data to the remote connection, completes the process of sending a packet started by beginPacket.

Syntax

SigFox.endPacket();

Return

Returns an int: 1 if the packet was sent successfully, 0 if there was an error

Example

#include <SigFox.h>
#include <ArduinoLowPower.h>

void setup() {
  Serial.begin(115200);
  while (!Serial) {};

  if (!SigFox.begin()) {
    Serial.println("Shield error or not present!");
    return;
  }

  void loop() {
    SigFox.begin();
    SigFox.beginPacket();
    SigFox.print("123456789012");
    int ret = SigFox.endPacket();
    if (ret == 0)
      Serial.println("OK");
    else
      Serial.println("KO");
    while (1);
  }

See also



Reference Home

Corrections, suggestions, and new documentation should be posted to the Forum.

The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.

Share