Hi folks, I’m a real IT newbie and currently struggling with my distance-measurement-project.
My aim is to measure distances with 5 DWM1001-Dev modules (1 tag, 1 initiator, 4 anchors) and 1 Raspberry Pi 4. Therefore I have been following this tutorial:
I managed to flash all tags with J-Flash Light and configure them properly with the android app DRTLS. The distance measurement itself is working.
Then I tried to connect the tag-module via USB to the Raspberry Pi and establish communication through Thonny. From now on I need help (various Youtube tutorials and this forum didn’t help much).
Could somebody please give me a dummie-guide on how to proceed to establish communication with the Raspberry Pi and transfer the localization information?
(It’s described in the tutorial and it also contains the Python script, but for my state of knowledge it lacks a lot of information).
I would start with monitoring the serial bus to the tag first before trying serial communication with Python on the Raspberry Pi. Connect the tag to a PC and send with teraterm the commands as send in the Python script and see if you get the responses you expect in this script.
This is also described in one of the manuals of the DWM1001-dev.
After that you can debug the Python program. First thing to check is if the tag is indeed connected to /dev/ttyACM0. Simplest way is to disconnect the tag and execute ls /dev/ on your Raspberry Pi, ttyACM0 should not be there. Then connect the tag and execute the command again and ttyACM0 should be there! Or with another name e.g. ttyACM1 or ttyUSB0.
In any case use the name you find in the Python code on line 8: DWM = serial.Serial(port="/dev/ttyACM0", baudrate=115200)
Thanks a lot! I finally managed to get the localization data from the tag via Tera Term using the serial bus. Now I’m facing the next problem: How can I store the data properly? The final goal will be to calculate distances. Thanks in advance!