Add a Button in the stack Firmware

Hi ! I want to use the stack firmware (default) in the MDEK Kit (the same as DWM1001-dev) but adding a button as “Alert button”,so:
Is it posible ?
can i start from the example explained in Section 4 in DWM1001_Firmware_User_Guide_ver11 (USER APPLICATION EXAMPLES) ?

I edited the dwm-simple.c :

dwm-simple.c.txt (5.6 KB)

Using this post as reference :POST
But it doesnt work, maybe im using in a bad way the makefile.

I could Solve, thanks !

Hi Franco, I answered on your other thread. Maybe have a look.

Sounds like you achieve to perform what you wanted though, can you elaborate a bit what the solution ? Would be great to share for other users :slight_smile:

Thank you,

yes ! so this is my "modification " of the dwm-simple.c code:

EDIT: I will give the .c file because it will be more easy to see:

dwm-simple.c.txt (5.6 KB)

Basically I add a function called " void CheckButton(void)" that see if the SW2 (the “user” button) is pressed or not and will Turn on or Turn off the D12 Led in the DWM1001-Dev. This function is checked in the while(1) of the "void app_thread_entry(uint32_t data) "

Hope everyone understand !


can i get a simple c program to turn onboard led of dwm1001 module or from sending a comand from pi to the module how it can be done ?