TOP Contributors

  1. MIKROE (2656 codes)
  2. Alcides Ramos (353 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136885 times)
  2. FAT32 Library (70009 times)
  3. Network Ethernet Library (56001 times)
  4. USB Device Library (46305 times)
  5. Network WiFi Library (41933 times)
  6. FT800 Library (41208 times)
  7. GSM click (29017 times)
  8. PID Library (26425 times)
  9. mikroSDK (26398 times)
  10. microSD click (25386 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

OOK TX click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.12

mikroSDK Library: 2.0.0.0

Category: Sub-1 GHz Transceivers

Downloaded: 128 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.

No Abuse Reported

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".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


OOK TX click

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.

ooktx_click.png

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Nov 2023.
  • Type : GPIO type

Software Support

We provide a library for the OOK TX Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for OOK TX Click driver.

Standard key functions :

  • ooktx_cfg_setup Config Object Initialization function.

    void ooktx_cfg_setup ( ooktx_cfg_t *cfg );
  • ooktx_init Initialization function.

    err_t ooktx_init ( ooktx_t *ctx, ooktx_cfg_t *cfg );

Example key functions :

  • ooktx_send_data This function builds and sends a packet of data. The packet format is as follows (MSB first, manchester IEEE 802.3): OOKTX_TRAINING_BYTES, PREABMLE, LEN, DATA_IN, CRC16 (calculated from whole packet excluding training bytes).
    static void ooktx_send_data ( ooktx_t *ctx, uint16_t preamble, uint8_t *data_in, uint8_t len );

Example Description

This example demonstrates the use of OOK TX click board by sending a predefined message to the receiver.

The demo application is composed of two sections :

Application Init

Initialized the driver and logger.


void application_init ( void )
{
    log_cfg_t log_cfg;          /**< Logger config object. */
    ooktx_cfg_t ooktx_cfg;      /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    ooktx_cfg_setup( &ooktx_cfg );
    OOKTX_MAP_MIKROBUS( ooktx_cfg, MIKROBUS_1 );
    if ( DIGITAL_OUT_UNSUPPORTED_PIN == ooktx_init( &ooktx, &ooktx_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Sends a predefined message every 3 seconds and displays it on the USB UART.

void application_task ( void )
{
    log_printf ( &logger, " Sending data: %s\r\n\n", ( char * ) OOKTX_MESSAGE );
    ooktx_send_data ( &ooktx, OOKTX_PREAMBLE, OOKTX_MESSAGE, strlen ( OOKTX_MESSAGE ) );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

Note

The OOK RX click board is a compatible receiver for the OOK TX click. Here are a few steps for troubleshooting if you are experiencing issues running this example:

  • Check the MCU clock configuration, use an external oscillator instead of the MCU's internal one for better accuracy on manchester data rate delay.
  • Measure the actual data rate on the data line and adjust the OOKTX_MAN_BIT_LEN_US value accordingly.

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.OOKTX

Additional notes and informations

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. UART terminal is available in all MikroElektronika compilers.


ALSO FROM THIS AUTHOR

DTMF Generator click

5

DTMF Generator Click is a compact add-on board that generates DTMF (Dual-Tone Multi-Frequency) signals designed for MCU interfaces. This board features the HT9200A, a dual-tone multi-frequency decoder mostly used in mobile communications systems from Holtek Semiconductor Inc.

[Learn More]

GSM 3 click

5

GSM3 click carries SIM800H, a quad-band (850/900/1800/1900MHz) GSM/GPRS module that transmits voice, sms and data information. Utilizing the module’s full potential, GSM3 click also has an audio input/output connection pad (for a microphone and earphones, which can also be used as an FM antenna).

[Learn More]

Brushless 22 click

0

Brushless 22 Click is a compact add-on board suitable for controlling brushless DC (BLDC) motors with any MCU. This board features the MTD6508, a 3-phase full-wave sensorless driver for BLDC motors from Microchip Technology. It features 180° sinusoidal drive, high torque output, and silent drive, rated for an operating voltage range including both mikroBUS™ power rails, and comes with speed control achieved through pulse-width modulation (PWM). Besides, it features several diagnostic circuits and drive-control functions such as motor lock protection, overcurrent limitation, and thermal shutdown protection.

[Learn More]