HM_IOT_Demo / Mbed 2 deprecated mDot_LoRa_Street_light

Dependencies:   MTS-Serial libmDot mbed-rtos mbed

Fork of mDot_LoRa_Connect_Example by ivan florido

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers macro.h Source File

macro.h

00001 #ifndef _MACRO_H
00002 #define _MACRO_H
00003 
00004 #define STOP_BIT 1
00005 #define DATA_BIT 8
00006 #define BAURD_RATE 115200
00007 unsigned char IEEE_SM1[8] = {0x3C, 0xC1, 0xF6, 0x00, 0x00, 0x00, 0x09, 0x3D};  //light .. wait(5);
00008 unsigned char IEEE_SM2[8] = {0x3C, 0xC1, 0xF6, 0x00, 0x00, 0x00, 0x09, 0x40};   //lamp .. wait(2)
00009 unsigned char IEEE_SM3[8] = {0x3C, 0xc1, 0xf6, 0x00, 0x00, 0x00, 0x09, 0x3F}; //Tv   ... wait(4)
00010 
00011 #define Light_bulb 1
00012 #define Light_lamp 2
00013 #define Tv 3
00014 
00015 #define NETWORK_ADDRESS     0xFFFF
00016 #define SOURCE_ENDPOINT     0x0C
00017 #define CLUSTER_ID          0x0006
00018 #define PAYLOAD             0x1101
00019 
00020 #define MSB(i)  ((i >> 8) & 0x00FF)
00021 #define LSB(i)  (i & 0xFF)
00022 
00023 #define NETWORK_ADDRESS     0xFFFF
00024 #define SOURCE_ENDPOINT     0x0C
00025 #define CLUSTER_ID          0x0006
00026 #define PAYLOAD             0x1101
00027 
00028 
00029 #define START_BYTE_AT   0x2B
00030 #define START_BYTE      0x2D
00031 
00032 #define OFF          00
00033 #define ON           01
00034 
00035 
00036 #endif