I am very new to Arduino and probably trying to go to fast admittedly. I have searched this problem on this forum and google for two weeks and finally gave up. I copied the sketch character for character from the book but mine doesn't work. I am perhaps looking totally in the wrong place but all I can think of is that I do not have the proper library...? Any help would be most appreciated. I hope I did this post correctly.
here is the sketch I have
#include <XBee.h>
#include <Printers.h>
#include <AltSoftSerial.h>
XBeeWithCallbacks xbee;
AltSoftSerial SoftSerial;
#define DebugSerial
#define XBeeSerial SoftSerial
void setup() {
// Setup debug serial output
DebugSerial.begin(115200);
DebugSerial.println(F("Starting..."));
// Setup XBee serial communication
XBeeSerial.begin(9600);
xbee.begin(XBeeSerial);
delay(1);
// Let all responses be printed
xbee.onResponse(printResponseCb, (uintptr_t)(Print*)&DebugSerial);
// Send a "VR" command to retrieve firmware version
AtCommandRequest req((uint8_t*)"VR");
xbee.send(req);
}
void loop() {
// Check the serial port to see if there is a new packet available
xbee.loop();
}
here is the error
Arduino: 1.8.7 (Windows Store 1.8.15.0) (Windows 10), Board: "Arduino/Genuino Uno"
C:\Users\User\Documents\Arduino\sketch_sep26a\sketch_sep26a.ino: In function 'void setup()':
sketch_sep26a:11:14: error: expected primary-expression before '.' token
DebugSerial.begin(115200);
^
sketch_sep26a:12:14: error: expected primary-expression before '.' token
DebugSerial.println(F("Starting..."));
^
sketch_sep26a:20:67: error: expected primary-expression before ')' token
xbee.onResponse(printResponseCb, (uintptr_t)(Print*)&DebugSerial);
^
Multiple libraries were found for "XBee.h"
Used: C:\Users\User\Documents\Arduino\libraries\xbee-arduino-master
Not used: C:\Users\User\Documents\Arduino\libraries\XBee_Arduino_library-0.6.0
Not used: C:\Users\User\Documents\Arduino\libraries\XBee-Arduino_library
exit status 1
expected primary-expression before '.' token
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.