Other Parts Discussed in Thread: Z-STACK
Hi Guys!
I working with my device (based on Sample Light w Zstack Z-Stack Home 1.2.2a.44539), w/ a SimpleDescriptionFormat as ZCL Basic On/off, to use 4 GPIO ports (P1_4, P1_5, P0_5 and P0_4), all those have eletric pin avaiable for use. My idea is that when my device received ZCL cmd On/off all those GPIO ports answer (High-1 or Low Level-0, on or off).
To do that i wrote those code in onoffCB funcition:
// Turn on the light
if ( cmd == COMMAND_ON )
{
zclTeha0002_OnOff = LIGHT_ON;
P1_4 = 1;
P1_5 = 1;
P0_5 = 1;
P0_4 = 1;
P0_3 = 1;
P0_2 = 1;
}
// Turn off the light
else if ( cmd == COMMAND_OFF )
{
zclTeha0002_OnOff = LIGHT_OFF;
P1_4 = 0;
P1_5 = 0;
P0_5 = 0;
P0_4 = 0;
P0_3 = 0;
P0_2 = 0;
}
After my device received the cmd on/off, from the gateway, just P0_5 responds to the commad and changs its level stats ( on-1 and 0ff-0). I didnt not find any code that blocked the another ports (p1_4, P1_5, P0_4, P0_3 and P0_2).
Anybody have any idea?
BR
Alex