Good morning, Forum!
I'm new to Arduino and might have missed some important details in the code descriptions or documentation. I need assistance in creating an event log to record every time a button connected to a digital pin is pressed or released.
Specifically, I'm using Gurux DLMS Arduino and would like to know which functions I should use to achieve this.
For reference, I’ve successfully implemented a similar setup using Gurux DLMS .Net on a Raspberry Pi. In that setup:
1. I added a profile generic for a [push button log] and a [status register].
2. I wrote a function to monitor the button state.
a) When the button is pressed, I set the value in the push button register to 1 (10000000) and also update the bit in the status register.
b) When the button is released, I reset the bit back to 0.
Using this method, I could read and verify the results in GXDLMS Director. The value always updated when the button is pressed or released.
Now, I want to replicate this functionality on an Arduino using Gurux. Could someone guide me on how to do it? Any help or pointers to the documentation would be greatly appreciated!
Best regards,
Alan
Hi, Check the up event …
Hi,
Check the up event (GURUX_EVENT_CODES_POWER_UP) from the server example:
https://github.com/Gurux/GuruxDLMS.c/blob/bee824516bb45180ae7f701da6517…
You can add a new event to GURUX_EVENT_CODES and then set it when you want to like this.
updateState(GURUX_EVENT_CODES_POWER_UP);
BR,
Mikko
Sorry for the late reply…
Sorry for the late reply. This is just what I need and it works perfectly.
Thank you!