I have big problem. I need Applications need to create with Arduino and TD1208 and temperature sensor. I have been now DS18B20 and do not know how to convert the appropriate type of mission and display the beckandu. Can someone please help me. I looked at examples of Akeru did not help me.
/* Akeru.h - sendSingleValues.ino
*
* Copyleft Snootlab 2016
*
* How to send a single analog value on the Sigfox network
*/
#include <Akeru.h>
#include <OneWire.h>
#include <DallasTemperature.h>
// TD1208 Sigfox module IO definition
/* Snootlab device | TX | RX
Akeru | D4 | D5
Akene | D5 | D4
Breakout | your pick */
#define TX 2
#define RX 3
#define ONE_WIRE_BUS 7
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
// Sigfox instance management
Akeru akeru(RX, TX);
int TempInC;
void setup()
{
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
Serial.println("Starting...");
// Check TD1208 communication
if (!akeru.begin())
{
Serial.println("TD1208 KO");
while(1);
}
//akeru.echoOn(); // uncomment this line to see AT commands
}
void loop()
{
sensors.requestTemperatures();
sensors.getTempCByIndex(0);
TempInC = sensors.getTempCByIndex(0);
float temperatureInCelsius = sensors.getTempCByIndex(0);
//int sensorValue = analogRead(A0);
// Trace on serial console
Serial.print(temperatureInCelsius, 2);
// convert to hexadecimal before sending
String data = akeru.toHex(temperatureInCelsius);
// Send in the mighty internet!
// akeru.sendPayload() returns 0 if message failed.
if (akeru.sendPayload(data))
{
Serial.println("Message sent !");
}
// Wait for 10 minutes.
// Note that delay(600000) will block the Arduino (bug in delay()?)
for (int second = 0; second < 600; second++)
{
delay(1000);
}
}
/* Akeru.h - sendSingleValues.ino
*
* Copyleft Snootlab 2016
*
* How to send a single analog value on the Sigfox network
*/
#include <Akeru.h>
#include <OneWire.h>
#include <DallasTemperature.h>
// TD1208 Sigfox module IO definition
/* Snootlab device | TX | RX
Akeru | D4 | D5
Akene | D5 | D4
Breakout | your pick */
#define TX 2
#define RX 3
#define ONE_WIRE_BUS 7
float temperatureInCelsius; // EDIT: now decleared here
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
// Sigfox instance management
Akeru akeru(RX, TX);
int TempInC;
void setup()
{
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
Serial.println("Starting...");
// Check TD1208 communication
if (!akeru.begin())
{
Serial.println("TD1208 KO");
while(1);
}
//akeru.echoOn(); // uncomment this line to see AT commands
}
void loop()
{
sensors.requestTemperatures();
sensors.getTempCByIndex(0);
TempInC = sensors.getTempCByIndex(0);
temperatureInCelsius = sensors.getTempCByIndex(0); // EDIT: instaed of here
//int sensorValue = analogRead(A0);
// Trace on serial console
Serial.print(temperatureInCelsius, 2);
// convert to hexadecimal before sending
String data = akeru.toHex(temperatureInCelsius);
// Send in the mighty internet!
// akeru.sendPayload() returns 0 if message failed.
if (akeru.sendPayload(data))
{
Serial.println("Message sent !");
}
// Wait for 10 minutes.
// Note that delay(600000) will block the Arduino (bug in delay()?)
for (int second = 0; second < 600; second++)
{
delay(1000);
}
}
Print all sent info to serial, so you can see how it looks.
I guess you know the exact format the receiver wants.
...........
I'm sorry I cant guide you more.. I dont have the equipment to try this myself.