Shop OBEX P1 Docs P2 Docs Learn Events
XBEEs didn't work... — Parallax Forums

XBEEs didn't work...

hans90hans90 Posts: 29
edited 2017-03-27 04:38 in Propeller 1
I tried to do the XBEE demo learn.parallax.com/tutorials/projects/xbee-802154-pc-demo on my Activity Board instead of Education Board but it didn't work! For the time being, I tried to test my thermometer (DS1620) with the Test_DS1620.spin and it worked first and the terminal displayed the "temperature = 76F" in every 5 seconds. However after 1 minute, the display for the temperature on terminal had disappeared. As I observed that the DI LED on XBEE was blinking red at first when it worked for 1 minute, and dimmed for the rest of the time. I doubt it has some thing to do with the baud rate and sampling rate which I am not sure!

I used XBEE USB dongle instead of XSTICK and I have set up XBEEs on XCTU for one Coordinator API mode and one End Device AT mode. I also set up the End Device's sampling rate for 5 seconds and D3 for ADC. I am not sure what's wrong and the fact that first time worked and then stopped really confused me..

Comments

  • I ran the test code again on PropIDE's terminal and it kind of worked: it displayed strange characters like the ones in picture. Does anyone know what did I do wrong? :(
  • I tested SimpleIDE's terminal and it is working. I don't know why PropIDE terminal does not work, it is strange..
  • I am more confused: I studied the test_DS1620.spin and it says debug port is 0 which I suppose is the USB serial terminal. I have run with USB terminal and it is working fine displaying temperature.
    BUT why is it RANDOMLY working on the XBEE terminal as well? the code did not specify anything about XBEE I suppose? I hope some can help me on this.
  • ''***************************************
    ''*  Test_DS1620 V1.0                  *
    ''*  Author: Chris Savage               *
    ''*  Copyright (c) 2013 Parallax, Inc.  *               
    ''*  See end of file for terms of use.  *               
    ''***************************************
    
    '' Tests the DS1620 connections on the Propeller BOE for the RN-42 Bluetooth to PC Demo
    
    
    CON
    
      _CLKMODE = XTAL1 + PLL16x                             ' Standard Crystal, 16x Multiplier, total 80MHz system clock
      _XINFREQ = 5_000_000                                  ' 5MHz external Crystal
    
    
    CON
    
      DEBUG      = 0                                        ' Debug port sends results to Parallax Serial Terminal
    
      BAUD       = 9600                                     ' Baud Rate 9600 bps
    
    
    CON
    
      DS1620_RST = 11                                       ' To DS1620 RST pin (3)
      DS1620_CLK = 12                                       ' To DS1620 CLK pin (2)
      DS1620_DAT = 13                                       ' To DS1620 DAT pin (1)
    
      CR         = 13                                       ' Carriage Return
      SP         = 32                                       ' Space Character
    
    
    OBJ
    
      fds   : "FullDuplexSerial4port"
      dio   : "dataIO4port"
      temp  : "DS1620"
    
    
    PUB Main | tF
    
      fds.Init
      fds.AddPort(DEBUG, 31, 30, -1, -1, 0, %000000, BAUD)  ' Debug to the terminal screen
      fds.Start                                             ' Start the ports
                                                            
      temp.start(DS1620_DAT, DS1620_CLK, DS1620_RST)        ' Start DS1620 object
      Pause(500)                                            ' Startup delay
    
      fds.tx(DEBUG, 0)                                      ' Clear Screen
      fds.str(DEBUG, String("Ambient temperature should be displayed each second."))
      fds.tx(DEBUG, 13)                                     ' Carriage Return
    
      repeat
        tF := temp.gettempf                                 ' Get F Temp from DS1620
        fds.str(DEBUG, string("Temperature ="))             ' Label (Temp in F)
        dio.decf(DEBUG, tf / 10, 3)                         ' Whole number portion
        fds.tx(DEBUG, ".")                                  ' Decimal Point
        dio.dec(DEBUG, tf // 10)                            ' Tenths of Degrees
        fds.str(DEBUG, string("° F  "))
        fds.tx(DEBUG, 13)                                   ' Carriage Return
        Pause(1000)
    
    
    PRI Pause(ms)
    
      waitcnt(clkfreq / 1000 * ms + cnt)                    ' Convert to mS
    
    
    DAT
         {<end of object code>}
         
    {{
    ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │                                                   TERMS OF USE: MIT License                                                  │                                                            
    ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
    │Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation    │ 
    │files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,    │
    │modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software│
    │is furnished to do so, subject to the following conditions:                                                                   │
    │                                                                                                                              │
    │The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.│
    │                                                                                                                              │
    │THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE          │
    │WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR         │
    │COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,   │
    │ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                         │
    └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
    }}
    
Sign In or Register to comment.