Hi,
I used the JN-AN-1189 example of home automation profile and the device is discovered in the controller.
As the next step, I want to control a relay for the smartplug example. Based on the on-off i want to operate the relay.
How do I determine the output pin used by JN5168? Also can i directly drive a relay with that digital output?
Regards,
Vijay
Hi Vijay,
Please look at the next user Guide
Chapter 5. Digital Inputs/Outputs (DIOs)
JN516x Integrated Peripherals API User Guide
PUBLIC void APP_vInitLeds(void)
{
vAHI_DioSetPullup( DIO_LED_MASK,0); /* pull up on */
psDio->u32DioDirection &= ~DIO_LED_MASK; /* input */
}
Regards,
Mario
Hi Mario,
thanks for the reply. It’s useful information for me. One additional question related to the question.
i used the HA on off switch example Nxp has published. That’s working perfectly fine. I also needs to connect a manual switch to this. My understanding is manual switch will input to one of DIO as input and based on the interrupt I toggle switch state.
Is is this the preferred approach? Do you have a sample application wich takes DIO inputs?
thanks in advance,
Vijay
Hi Vijay,
My understanding is manual switch will input to one of DIO as input and based on the interrupt I toggle switch state.
I am a little bit confused by this. What is your final application?
Mario
Thanks Mario for the reply. You would have seen a relay insert module which has inputs from switch and control the light as a load. This way you can control the light from a app/Zigbee command and use the manual switch also as input. I was trying to create one such device.