Posts

Showing posts with the label XBee

Modding WiFiChron with GPS or Bluetooth

Image
The latest revision of WiFiChron has an XBee socket (beside the ESP8266 8-pin socket), which allows the addition of a few individual features: GPS-based time synchronization, by using the GPSBee ; displaying messages sent from a Bluetooth device, by using the BTBee / BLEBee ; displaying data acquired from an XBee / ZigBee network of sensors (not implemented yet); Things did not go smoothly, without some drama though. Naively (I always seem to forget that there is a difference between theory and practice), I designed the XBee/ESP to connect to the serial port, with the expectation that once the development (including testing with debug statements to the serial monitor) is done, I will just plug in the serial module (either XBee of ESP8266) and things will work properly. Well, I had to re-consider this approach once again. Luckily, I had two pins left available (D7 and D17), which I could use for software serial. I re-wired those to the XBee/ESP and used the hardware serial for console...

Testing the XBee on Wise Clock 4

To test the XBee on Wise Clock 4 I used the sketch below (upload it to the board; display is not required). int nCount = 0; void setup() {   Serial.begin(9600);   Serial1.begin(9600);   Serial.println("WC4 XBee ready for comm...");  } void loop() {   // read from port 1, report characters on port 0:   while (Serial1.available())   {     char inChar = Serial1.read();     Serial.print(inChar);    }   Serial1.print("WC4 XBee transmit ");   Serial1.print(nCount++);   Serial1.print(", ");   Serial1.println(millis());   delay(3000); } Notice the use of Serial1 instance to talk to the XBee, since this is connected to the second hardware serial port of the ATmega644P (D10/D11, pins 16/17). Had Sanguino offered no support for the second USART, we could have used NewSoftwareSerial library . The second XBee is linked directly to a terminal (e.g. HyperTerminal in Windows, or Terminal panel in the X-CTU appli...

Wise Clock 4

Image
The new Wise Clock 4 board has two main improvements over Wise Clock 3 : support for the XBee family of wireless RF modules (XBee, XBee Pro, XBee Wi-Fi, and the similar foot-printed Roving Networks WiFly RN-XV ); ability to easily connect a second display ; this is achieved by moving the power connector on the "right" side, plus bringing the extension display connector closer to the bottom of the board. Wise Clock 4 is "almost" compatible with Wise Clock 3 . To run the existing sketch on Wise Clock 4 , two changes are required: Plus button is now on D3 (D2 is now designated for interrupts from RTC); D15 is now connected to the CS line of the display, replacing D11, which is now used for communication with the Xbee module. As can be noticed from the photos, a few more components are in SMD package (necessary to keep the size of the board to a minimum, to fit in the back of the 3216 display): the level shifting buffer 74HC125 ; three optional LEDs: 2 for the XBee ...