Shop OBEX P1 Docs P2 Docs Learn Events
AppBee problem — Parallax Forums

AppBee problem

Chris CChris C Posts: 50
edited 2008-04-25 03:25 in BASIC Stamp
I soldered up the boards, slapped on the XBees, hooked up the PropPlug, made sure it installed right, ran X-CTU, selected USB Serial Port (COM 6), and it doens't see the modem.

PC issues aren't possible, trust me.· What could it be?· Bad PCB parts?· Bad XBee?· Bad soldering job?

Looking for ideas cuz so far I can't think of anything.· Checked continuity on all the pins of the components, the signals propogate.· If I check the Enable API box, I get something but no device info.

Help!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-07 22:44
    It could be any of the things you've mentioned.· I've built several AppBees.· They worked fine for me.· I don't remember whether the AppBee was designed for the USB2SER adapter or the PropPlug adapter.· They have different (incompatible) pinouts.· I don't have the documentation handy, but check it.· You might also try talking to the xBee via the AppMod connector and the Stamp.· You can configure it that way.
  • Chris CChris C Posts: 50
    edited 2008-04-07 22:55
    I've got a BS1 Project Board so the Appmod header isn't an option. =\

    The PropPlug is the right one, I found out from Martin. Could reversing the diode polarity cause this? It's the only thing I can think of.

    It's the AppBee-SIP too, forgot to mention.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-07 23:00
    Reversing diode polarity also causes things to not work. That's part of checking your wiring.

    You can jumper between the AppMod header and the BS1 Project Board headers. It certainly would let you test things. You probably would have problems with the default Baud setting. I think it's 9600 Baud and the BS1 only speaks 2400 Baud (and slower).
  • Chris CChris C Posts: 50
    edited 2008-04-08 01:55
    Argh, I said diode.

    I meant the RX/TX LEDs. Maybe they are reversed. Unfortunately I didn't solder all of them, so they might be wrong.

    Because of the baud rate, I can't communicate from the BS1 to the AppBee cuz it's not configured yet.
  • Chris CChris C Posts: 50
    edited 2008-04-25 03:22
    Ok, AppBees are programmed with addresses and all that.

    Problem now is communication. My receiving program is running on a BS1, which offers no timeout option for the serin command.

    How do I just grab packets from the serial input continuously and send them out of the serial output to a Pink?

    I tried but it's stuck at the serin command.
    SYMBOL RX = 0 ' Receive Pin
    SYMBOL TX = 2 ' Transmit Pin

    SYMBOL RFin = W3

    Main:
    SERIN RX, T2400, #RFin ' Accept and view as character
    DEBUG "nodeInfo = ", #RFin, CR
    GOTO Main

    END

    All I need to do is grab whatever is coming into the serial input and toss it to the Pink through the serial output.
  • Chris CChris C Posts: 50
    edited 2008-04-25 03:25
    The wireless node's code.
    ' {$STAMP BS1}
    ' {$PBASIC 1.0}

    '
    [noparse][[/noparse] I/O Definitions ]

    SYMBOL Ping = 7
    SYMBOL TX = 2
    SYMBOL RX = 0
    SYMBOL SLP = 4
    SYMBOL RTS = 6


    '
    [noparse][[/noparse] Constants ]

    SYMBOL Trigger = 1 ' 10 uS trigger pulse
    SYMBOL Scale = 10 ' raw x 10.00 = uS

    SYMBOL RawToIn = 889 ' 1 / 73.746 (with **)

    SYMBOL IsHigh = 1 ' for PULSOUT
    SYMBOL IsLow = 0


    '
    [noparse][[/noparse] Variables ]

    SYMBOL rawDist = W1 ' raw measurement
    SYMBOL inches = W2 ' inches conversion
    SYMBOL nodeInfo = W3 ' node presence


    '
    [noparse][[/noparse] Program Code ]

    Main:

    PAUSE 2000

    HIGH SLP ' Put XBee to sleep
    ' SLEEP 15 ' Put BS2 to sleep for approx 15 seconds

    GOSUB Get_Sonar ' get sensor value
    inches = rawDist ** RawToIn ' convert to inches

    DEBUG CLS ' report
    DEBUG "Time (uS)..... ", #rawDist, CR
    DEBUG "Inches........ ", #inches, CR

    nodeInfo = 1000

    nodeInfo = nodeInfo + inches

    IF nodeInfo > 1022 OR nodeInfo < 1002 THEN Main

    LOW SLP ' Wake XBee
    PAUSE 10 ' Give XBee time to stretch and yawn
    SEROUT TX, T2400, (#nodeInfo) ' Transmit value
    PAUSE 10

    DEBUG "Node........ ", #nodeInfo, CR

    GOTO MAIN

    END

    '
    [noparse][[/noparse] Subroutines ]

    Get_Sonar:
    LOW Ping ' make trigger 0-1-0

    PULSOUT Ping, Trigger ' activate sensor
    PULSIN Ping, IsHigh, rawDist ' measure echo pulse

    rawDist = rawDist * Scale ' convert to uS
    rawDist = rawDist / 2 ' remove return trip

    RETURN

    It's sending through XBee to the previous code on a receiver module. All are BS1 project boards.
Sign In or Register to comment.