Programming logic through C Code

Hi,

I’d like to know the following: Imagine I’ve already configured 4 anchors and 1 tag. The thing is, I’d also like to program actions depending on the distance data of my tag with the 4 anchors. In case it is possible, how should I do it? Which programs and steps should I have to follow?

Thanks

Hi,

Are you using MDEK/DWM1001 and PANS ?

You can do such data processing on the tag in the user application of PANS. The scope of what you can do is limited, but it is possible to do a bit of post processing of the distance.

Have a look at the dwm1001 firmware user guide.

Note that theoretically, you could start from scratch and develop your own system that could also handl such case. But this will require extensive embedded software development.

Hope it helps,
Yves

Thanks!

Yes I’m using MDEK/DWM1001 and PANS by editing the C Code dwm-simple.c example.
The thing is, in order to simplify my example, I’d first like to start by configuring 1 anchor and 1 tag. The idea would be to program this single anchor so that when it detects this tag at a distance I decide, the anchor activates a LED in its own board for example.

With this scenario in mind, my questions are the following:

  1. How can I set the anchor program to: if (distance with tag <= 3 meters) --> activate LED
  2. Should I focus on doing it by polling or interruption? Is polling enabled by default? How to enable interruptions in C?
  3. After reviewing the PANS API functions I’m not sure it would be viable through it. Can you confirm please?

Thanks,

Guillem Balcells.