Reference   Language | Libraries | Comparison | Changes

SigFox

SigFox.print()

Description

Sends characters data to the SigFox's backend. This data is sent as a character or series of characters; to send the binary data use the write() function instead.

Syntax

SigFox.print(val)
SigFox.print(str)
SigFox.print(buf, len)

Parameters

val: a value to send characters representing the value

str: a string to send as a series of characters

buf: an array to send as a series of characters

len: the length of the buffer

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");
  SigFox.endPacket();
  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