arduino-dw1000
arduino-dw1000 copied to clipboard
DW1000Ranging_TAG nothing recieve
Hi everybody!
We have Decawave TREK1000 (3 Anchors and 1 Tag). Tag has connected to Arduino Uno through SPI connection.
Decawave(SPI) Arduino Uno(SPI) Pin 1(Not Connected) X Pin 2(GND) GND Pin 3(WAKEUP) X Pin 4(IRQ) D2 Pin 5(MISO) D12 Pin 6(Not Connected) X Pin 7(SCK) D13 Pin 8(MOSI) D11 Pin 9(CSn) D10 Pin 10(GND) GND
There are 3 switches on board(S1, S2, S3). S2(ARM chip) has been set on off position.
S3-1(ARM GPIO PA0 pin) off S3-2(LED0) on S3-3(GPIO 5 pin) off S3-4(GPIO 6 pin) off
What do you want?
- Report an issue.
Describe the problem
Not receive any needed information.
Describe your environment
- Arduino IDE version or Toolchain: 1.8.4
- dw1000 Library version: 0.6
- Arduino device: Uno
- Used adapter board: None
Affected file(s) or example(s):
DW1000Ranging_Tag
Observed Results:
device address: 7D:00:22:EA:82:60:3B:9C
TAG
Expected Results:
from: Range: m RX power: dBm
Relevant Code:
/**
*
* @todo
* - move strings to flash (less RAM consumption)
* - fix deprecated convertation form string to char* startAsTag
* - give example description
*/
#include <SPI.h>
#include "DW1000Ranging.h"
// connection pins
const uint8_t PIN_RST = 9; // reset pin
const uint8_t PIN_IRQ = 2; // irq pin
const uint8_t PIN_SS = SS; // spi select pin
void setup() {
Serial.begin(115200);
delay(1000);
//init the configuration
DW1000Ranging.initCommunication(PIN_RST, PIN_SS, PIN_IRQ); //Reset, CS, IRQ pin
//define the sketch as anchor. It will be great to dynamically change the type of module
DW1000Ranging.attachNewRange(newRange);
DW1000Ranging.attachNewDevice(newDevice);
DW1000Ranging.attachInactiveDevice(inactiveDevice);
//Enable the filter to smooth the distance
//DW1000Ranging.useRangeFilter(true);
//we start the module as a tag
DW1000Ranging.startAsTag("7D:00:22:EA:82:60:3B:9C", DW1000.MODE_LONGDATA_RANGE_ACCURACY);
}
void loop() {
DW1000Ranging.loop();
}
void newRange() {
Serial.print("from: "); Serial.print(DW1000Ranging.getDistantDevice()->getShortAddress(), HEX);
Serial.print("\t Range: "); Serial.print(DW1000Ranging.getDistantDevice()->getRange()); Serial.print(" m");
Serial.print("\t RX power: "); Serial.print(DW1000Ranging.getDistantDevice()->getRXPower()); Serial.println(" dBm");
}
void newDevice(DW1000Device* device) {
Serial.print("ranging init; 1 device added ! -> ");
Serial.print(" short:");
Serial.println(device->getShortAddress(), HEX);
}
void inactiveDevice(DW1000Device* device) {
Serial.print("delete inactive device: ");
Serial.println(device->getShortAddress(), HEX);
}
// TODO(you): code here to reproduce the problem
I have an issue occurs the following notification. Any suggestion about it? Highly appreciated.
I:\NEW PROJECT\MYCODE\arduino-dw1000-master\examples\DW1000Ranging_TAG\DW1000Ranging_TAG.ino: In function 'void setup()':
I:\NEW PROJECT\MYCODE\arduino-dw1000-master\examples\DW1000Ranging_TAG\DW1000Ranging_TAG.ino:29:90: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
DW1000Ranging.startAsTag("7D:00:22:EA:82:60:3B:9C", DW1000.MODE_LONGDATA_RANGE_ACCURACY);