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-05-17
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Sub-1 GHz Transceivers
Downloaded: 5295 times
Not followed.
License: MIT license
OOK TX click is a simple wireless transmitter that operates at the frequency of 433MHz (sub-GHz). This device allows realization of a simple, low-speed wireless ad hoc communication network between a transmitter and compatible receiver, such as the OOK RX click.
Do you want to subscribe in order to receive notifications regarding "OOK TX click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "OOK TX click" changes.
Do you want to report abuse regarding "OOK TX click".
Library description
This library contains functions required to setup OOK communication.
Key functions
uint8_t ooktx_communicationInit(uint8_t calibration, uint8_t configuration, uint16_t configurationSettings) - Initializes communication with the click
uint8_t ooktx_communicationTransmit(uint8_t transmitData) - Transmits data via OOK
uint8_t ooktx_communicationStop() - Sends a stop condition
The application is composed of three sections :
void applicationTask() { uint8_t i; uint8_t j; i = 1; while(1) { //Signals the device to start ook communication ooktx_communicationInit(_OOKTX_CALIBRATION_ENABLE, _OOKTX_CONFIGURATION_ENABLE, _OOKTX_CFG_DEFAULT); //Sends a sufficiently long preambule - 8 bytes of "01010101" sequence for (j = 0; j < 8; j++) { ooktx_communicationTransmit(_OOKTX_PREAMBULE); } /* * Sends 2 "Start packet" bytes - To help the receiver to differentiate * actual data packages from signal glitches. These bytes can be any * random number, as long as receiver knows what to expect. */ ooktx_communicationTransmit(0xCE); ooktx_communicationTransmit(0x35); //Data byte to be transmitted ooktx_communicationTransmit(i); //Stops ook communication ooktx_communicationStop(); delay_ms(1000); i ++; } }