We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2018-10-23
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Sub-1 GHz Transceivers
Downloaded: 4733 times
Not followed.
License: MIT license
SigFox 2 click is a device which carries the SN10-12, a fully integrated Sigfox certified module by InnoComm, allowing connection to a low power wide area network (LPWAN) that enables communication utilizing the Industrial, Scientific, and Medical (ISM) radio frequency band.
Do you want to subscribe in order to receive notifications regarding "SigFox 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "SigFox 2 click" changes.
Do you want to report abuse regarding "SigFox 2 click".
Library Description
The library contains basic functions for controlling the click board.
Key functions:
int32_t sigfox2_init()
- Function for initializing the sensor.int32_t sigfox2_wakeUp()
- Function for waking up the sensor from the sleep mode.int32_t sigfox2_sleep()
- Function for placing sigfox to the low power mode.Example description
Click board wakes up from sleep. Some tests are performed. After the tests and after the data has been sent and received from the network the click board is placed into the sleep mode to its low power mode. All events that are executed inside of the application task are printed to the serial port.
void applicationTask()
{
char spiFrameACK = 0;
char rData[20];
uint8_t sendPayload[12] = "Test msg";
_status = sigfox2_wakeUp();
if(_status == _SIGFOX2_STATUS_SUCCESS)
{
mikrobus_logWrite("Wakeup succesfull",_LOG_LINE);
_status = sigfox2_testSpicon(&spiFrameACK);
if(spiFrameACK == 1)
{
mikrobus_logWrite("SPI test finished succesfully",_LOG_LINE);
mikrobus_logWrite("Sending data to sigfox network",_LOG_LINE);
_status = sigfox2_receiveMessage(&sendPayload[0],&rData[0]);
if(_status == _SIGFOX2_STATUS_SUCCESS)
{
mikrobus_logWrite("Data received",_LOG_LINE);
mikrobus_logWrite(&rData[0],_LOG_LINE);
}
else
{
mikrobus_logWrite("Network error",_LOG_LINE);
}
}
else
{
mikrobus_logWrite("Error in echo frame",_LOG_LINE);
}
}
else
{
mikrobus_logWrite("Error in wakeup",_LOG_LINE);
}
_status = sigfox2_sleep();
if(_status == _SIGFOX2_STATUS_SUCCESS)
{
mikrobus_logWrite("Sleep entered",_LOG_LINE);
}
else
{
mikrobus_logWrite("Error entering sleep",_LOG_LINE);
}
Delay_ms(5000);
}
Other MikroElektronika libraries used in the example:
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.