TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139568 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57256 times)
  4. USB Device Library (47631 times)
  5. Network WiFi Library (43221 times)
  6. FT800 Library (42566 times)
  7. GSM click (29932 times)
  8. mikroSDK (28292 times)
  9. PID Library (26934 times)
  10. microSD click (26309 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: 3162 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

CO Click

0

CO Click carries the MQ-7 gas sensor with high sensitivity to carbon monoxide. The Click is designed to run on a 5V power supply only. It communicates with the target microcontroller over the AN pin on the mikroBUS™ line.

[Learn More]

CC3100 click

1

CC3100 click is mikroBUS add-on board which caries TI's CC3100MOD WiFi module. Click board uses SPI or UART bus for communication with host MCU.

[Learn More]

Alcohol 3 Click

0

Alcohol 3 Click is a gas sensor Click board, that reacts to the presence of deoxidizing and reducing gases, such as ethanol (also known as alcohol).

[Learn More]