TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139251 times)
  2. FAT32 Library (71749 times)
  3. Network Ethernet Library (57120 times)
  4. USB Device Library (47430 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28077 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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

EnOcean 4 click

Rating:

5

Author: MIKROE

Last Updated: 2019-07-17

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Sub-1 GHz Transceivers

Downloaded: 3106 times

Not followed.

License: MIT license  

EnOcean 4 Click carries a ultra-low power TCM515U transceiver gateway module which operates at 902MHz radio band, perfectly suited for the realization of transceiver gateways, actuators and controllers for systems communicating based on the EnOcean radio standard.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "EnOcean 4 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "EnOcean 4 click" changes.

Do you want to report abuse regarding "EnOcean 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

EnOcean 4 click

EnOcean 4 click

Native view of the EnOcean 4 click board.

View full image
EnOcean 4 click

EnOcean 4 click

Front and back view of the EnOcean 4 click board.

View full image

Library Description

This library allows user to perform an ESP3 (EnOcean Serial Protocol 3) communication. User can send packet data, which can consist of the commands, telegrams, messages... The library also can be used to check the response from the modul. When the response is ready, the library sets a flag. For more details check documentation.

Key functions:

  • T_ENOCEAN4_RETVAL enocean4_procces( void )- This function performs a response proccesing and calls handler function if response is valid.
  • T_ENOCEAN4_RETVAL enocean4_responseReady( void )- This function checks the response ready flag and if flag is set, clears a flag.
  • T_ENOCEAN4_RETVAL enocean4_sendPacket( T_enocean4_packet *packet )- This function allows user to send a valid packet data to the module by using UART interface.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes UART interface and interrupt, and prepares module for telegram sending and receiving. Also determines the working mode of the module, to be transmitter or receiver.
  • Application Task - (code snippet) Transmitter case: Sends message 1 and 2 to another module selected by Destination ID in the message structure. After each sent message waits to get answer (response) from another module. Receiver case: Waits to get message from another module and after that sends the determined answer on the received message. The all responses, messages and answers will be sent to the uart terminal.
void applicationTask()
{
    if (device_mode == RECEIVER)
    {
        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );

        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_answer1[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );

        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );

        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_answer2[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
    }
    else if (device_mode == TRANSMITTER)
    {
        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_message1[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );

        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );

        mikrobus_logWrite( "Telegram sending...", _LOG_LINE );
        sendTelegram( &_message2[0], _ENOCEAN4_RORG_ADT );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );

        mikrobus_logWrite( "Telegram receiving...", _LOG_LINE );
        checkResponse();
        mikrobus_logWrite( "***********************************", _LOG_LINE );
        Delay_ms( 5000 );
    }
}

Additional Functions :

  • respMessage - Sends message about the response state.
  • packetType - Sends message about the packet type.
  • makeResponse - Allows user to get a response packet from the driver.
  • logResponse - Allows results to be sent to the uart terminal.
  • sendTelegram - Allows user to send a telegram to the determined destination.
  • checkResponse - Waits until response was ready.
  • interrupt - To catch response from the module.

Other mikroE Libraries used in the example:

  • Conversions
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

STSPIN250 Click

0

STSPIN250 Click is a brushed DC motor driver with the current limiting and current sensing.

[Learn More]

IR Beacon Click

0

IR Beacon Click is a mikroBUS™ add-on board with an array of nine high speed infrared emitting diodes.

[Learn More]

Pressure 20 Click

0

Pressure 20 Click is a compact add-on board that contains a board-mount pressure sensor. This board features the ICP-20100, a high-accuracy digital barometric pressure and temperature sensor from TDK InvenSense. The ICP-20100 is based on MEMS capacitive technology with ultra-low noise, low power consumption, and temperature stability alongside programmable output: all-pressure, all-temperature, or pressure and temperature output. It converts output data into a 20-bit digital value and sends the information via a configurable host interface that supports SPI and I2C serial communications. It measures pressure from 30kPa up to 110kPa with an accuracy of ±20Pa over a wide operating temperature range.

[Learn More]