|
i'm trying to make the node discover the available nodes around it and their RSSI and their battery level. i tried to use the 'scanned brother' subroutine but i'm facing some problems. it always get me error:
In function 'void loop()': error: invalid conversion from 'uint8_t*' to 'long int
here's the code:
[color=#00FF80]void setup() { // Inits the XBee ZigBee library xbeeZB.init(ZIGBEE,FREQ2_4G,NORMAL); // Powers XBee xbeeZB.ON(); }
void loop() { xbeeZB.scanNetwork(); // Discovery nodes
while (xbeeZB.totalScannedBrothers>0) { XBee.println("Network Address:"); XBee.print(xbeeZB.scannedBrothers[xbeeZB.totalScannedBrothers-1].MY,HEX);
XBee.println("Device Type:"); XBee.print(xbeeZB.scannedBrothers[xbeeZB.totalScannedBrothers-1].DT,HEX);
XBee.println("Device MAC High:"); XBee.print(xbeeZB.scannedBrothers[xbeeZB.totalScannedBrothers-1].SH,HEX);
XBee.println("Device MAC Low:"); XBee.print(xbeeZB.scannedBrothers[xbeeZB.totalScannedBrothers-1].SL,HEX);
XBee.println("Node Identifier:"); XBee.print(xbeeZB.scannedBrothers[xbeeZB.totalScannedBrothers-1].NI,HEX);
XBee.println("Device RSSI:"); XBee.print(xbeeZB.scannedBrothers[xbeeZB.totalScannedBrothers-1].RSSI,HEX); xbeeZB.totalScannedBrothers--; } } could anyone check the code and help please? thanks
|