Shop OBEX P1 Docs P2 Docs Learn Events
App controlled Robot using XBee Wifi and Propeller Chip — Parallax Forums

App controlled Robot using XBee Wifi and Propeller Chip

Kevin_PaceKevin_Pace Posts: 22
edited 2015-01-20 11:18 in Accessories
I have been running a robotics competition in Virginia Beach, Va for a few years. I have used a wired PS2 as a controller and XBpro to XBpro communication to achieve wireless robot control with the PROP as the microcontroller. It has worked well and has allowed us to run over 200 plus robots in a day long competition in a convention center.

My goal is to replace the PS2 with an APP and run my robots using WIFI through the new XB wifi module.

I have purchased a set of XB wifi and I have basic communication between the latest version of XCTU and the android Cell phone app "WIFLY REMOTE". (Ill consider making my own app once I get this working)

I setup the xbee in soft AP mode and created an SSID so that the Xbee becomes its own network (essentially) Once I connect my phone to the Xbee network I can view the data I send in the XCTU console by pushing the buttons on the app.

My xbee has been connected to the Parallax XB adaptor for the process above.

Now I want to connect the xbee to the PROP and send the same signal and receive it on the PROP side as output.

My XBee pin 2 (DOUT or Rx) is connected to Prop Pin 4 and my XBee pin 3 (Din or TX) is connected to Prop pin 3.

If I can see the data from the app in XCTU..... is there a way for me to view the same data in the Parallax Serial terminal while its connected to the PROP?

Also, has anyone tackled this issue and willing to share what you have discovered?


This is an area I have not experimented with yet and I have been doing some research to see if there is anyone who has done this or is in the process of doing this but i haven't found much info.

There is a lot more info with people running arduino with XBee wifi and apps than there is propeller.

Thanks for your consideration to help me find a solution!
KP
«1

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-09 13:46
    Kevin_Pace wrote: »
    If I can see the data from the app in XCTU..... is there a way for me to view the same data in the Parallax Serial terminal while its connected to the PROP?

    Do you just want a simple bridge program? If so the bridge I wrote for the SayIt module should work. Just adjust the I/O pins and baud to match your settings.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-12-11 09:13
    I have worked with the Wi-Fi modules in this capacity: http://www.savagecircuits.com/showthread.php?500
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-12 04:21
    In response to Duane's advice......I tried this approach yesterday and didn't have any luck. I'm wondering if the wifi XBees have a different set of start commands for Prop programming. Im going to take a look at what Chris savage has shared and see if i can gain some more insight. I know if the signal is being received in the XCTU software, It can be processed through the PROP but Its not something I have attempted before so it will probably take someone with a great deal of experience with the xbee modules. Thanks for your help and I will continue to look at all options.
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-12 04:24
    Thanks for your response Chris. I will look into this avenue today and see if I have any luck. I was also thinking that I might go look into the arduino programming that has been used to integrate the app and see if i can make some parallel approach to programming on the PROP. Ill keep you posted!
    Thanks
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-12 09:50
    Kevin_Pace wrote: »
    In response to Duane's advice......I tried this approach yesterday and didn't have any luck. I'm wondering if the wifi XBees have a different set of start commands for Prop programming.

    I'm not really sure what you're trying to do. The bridge program should show on a PC terminal whatever is sent to the Propeller in plain text (assuming a wifi XBee behaves like a normal XBee which, as you suggest, may not be the case). If you were to type a message in the XCTU terminal, it should show up in the Parallax Serial Terminal.exe window. It won't let you see an attempt to program the Propeller (at least I don't think it would be meaningful). The programming interface needs a way to reset the Propeller to begin the programming sequence. There are devices available which allow one to program the Prop wirelessly. A pair of Pololu's Wixels can be used to program the Propeller.

    It is possible to program a Propeller over an XBee connection but you need special loader code included in your program. Parallax has an appnote on this topic (appnote #7). I have links to all the appnotes in post #3 of my index (see my signature for a link).
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-15 09:23
    In response to Duane's last email....It could be that I wasn't able to configure your bridge program correctly. (Although I did make several attempts) (Its likely that it was more my coding issue and probably not your program)

    What I am trying to accomplish with the code that I have attached is to be able to see the data that the WIFLY REMOTE app is sending to the xbee wifi in the Parallax Serial Terminal. I have broken down the information that I have been working with and it might make a bit more sense!

    I believe I am making progress. I have created some code that I believe “in theory” should allow me to see the data in the PST. I’m certainly not a master at SPIN and I could use any help that could be provided!

    On the “WiFly Remote” app, code is generated in the XCTU console when each of the four arrows are pressed. Below I am listing what each button sends out;
    The “UP” arrow sends the following data;
    On the LEFT side of the XCTU console log you will see: F80;S0;
    On the right side of the console log you will see: 46 38 30 3B 53 30 3B
    The “DOWN” arrow sends the following data;
    On the LEFT side of the XCTU console you will see: B80;S0;
    On the right side of the console log you will see: 42 38 30 3B 53 30 3B
    The “LEFT” arrow sends the following data;
    On the LEFT side of the XCTU console you will see: L40;S0;
    On the right side of the console you will see: 4C 34 30 3B 53 30 3B
    The “RIGHT” arrow sends the following data;
    On the LEFT side of the XCTU console you will see: R40;S0;
    On the right side of the console you will see: 52 34 30 3B 53 30 3B

    I am also attaching my PROP code: Keep in mind that my WIFi xbee is connected to pins 4 and 3 on the PROP. Prop Pin 4 is connected to xbee OUTPUT(pin 2) and Prop Pin 3 is connected to xbee INPUT (pin 3)

    Any help to be able to see the app data in the Parallax serial terminal will be a great help!
    Thanks KP
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-15 11:48
    I confess to not understanding your code.

    I'm curious if this program will show anything in the terminal window when used.
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
      
      STOP = "S"
      UP = "F"
      DOWN = "B"
      LEFT = "L"
      RIGHT = "R"
      
      DELIMITER = ";"
    
      ' inputAction
      #0, STOP_ACTION, UP_ACTION, DOWN_ACTION, LEFT_ACTION, RIGHT_ACTION
    
    
    OBJ
    
      Xbee   : "XBee_Object"
      Pst    : "Parallax Serial Terminal"
    
    PUB app_control  | inputCharacter, inputAction, inputParameter
    
    
                                                       
      Xbee.start(4, 3, 0, 9600)    'Starts the xbee object
      Pst.start(9600)              'Starts debugging terminal (PST)
      Pst.Home                     'Starts the data in the upper left corner of PST
    
      repeat                        'If data is displayed, try commenting out these two lines 
        SafeTx(Xbee.rx)             'to see if the rest of the program works.
       
      repeat
    
        inputCharacter := Xbee.rx
    
        case inputCharacter
          STOP:
            inputAction := STOP_ACTION
            inputParameter := 0
          UP:
            inputAction := UP_ACTION
            inputParameter := 0
          DOWN:
            inputAction := DOWN_ACTION
            inputParameter := 0
          LEFT:
            inputAction := LEFT_ACTION
            inputParameter := 0
          RIGHT:
            inputAction := RIGHT_ACTION 
            inputParameter := 0
          DELIMITER:
            ExecuteAction(inputAction, inputParameter)
          "0".."9":
            inputParameter *= 10
            inputParameter += inputCharacter - "0"
          other:
            Pst.Str(string("Error inputCharacter = "))
            Pst.Char(inputCharacter)
            
    PUB ExecuteAction(inputAction, inputParameter)
    
      case inputAction
        STOP_ACTION:
          Pst.Str(string("STOP_ACTION"))
          ' do stop action stuff 
        UP_ACTION:
          Pst.Str(string("Move up "))
          Pst.Dec(inputParameter)
          Pst.Str(string(" units"))
        DOWN_ACTION, LEFT_ACTION, RIGHT_ACTION:
          Pst.Str(string("Other Action with "))
          Pst.Dec(inputParameter)
          Pst.Str(string(" units"))
          ' do other stuff
          
    PUB SafeTx(character)
    
      case character
        32.."~":
          Pst.Char(character)
        other:
          Pst.Char("<")
          Pst.Char("$")
          Pst.Hex(character, 2)
          Pst.Char(">")
    

    If you get data coming to the terminal window, try commenting out lines 31 and 32 to let the rest of the program run.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-15 12:15
    I don't understand why there appears to be code checking for bits which apparently would be used to indicate button state.

    The XCTU log appears to contain ASCII characters which are used to indicate which buttons on the pad are pressed. Are bits being set and sent?
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-15 13:42
    Duane Degn wrote: »
    I confess to not understanding your code.

    I'm curious if this program will show anything in the terminal window when used.
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
      
      STOP = "S"
      UP = "F"
      DOWN = "B"
      LEFT = "L"
      RIGHT = "R"
      
      DELIMITER = ";"
    
      ' inputAction
      #0, STOP_ACTION, UP_ACTION, DOWN_ACTION, LEFT_ACTION, RIGHT_ACTION
    
    
    OBJ
    
      Xbee   : "XBee_Object"
      Pst    : "Parallax Serial Terminal"
    
    PUB app_control  | inputCharacter, inputAction, inputParameter
    
    
                                                       
      Xbee.start(4, 3, 0, 9600)    'Starts the xbee object
      Pst.start(9600)              'Starts debugging terminal (PST)
      Pst.Home                     'Starts the data in the upper left corner of PST
    
      repeat                        'If data is displayed, try commenting out these two lines 
        SafeTx(Xbee.rx)             'to see if the rest of the program works.
       
      repeat
    
        inputCharacter := Xbee.rx
    
        case inputCharacter
          STOP:
            inputAction := STOP_ACTION
            inputParameter := 0
          UP:
            inputAction := UP_ACTION
            inputParameter := 0
          DOWN:
            inputAction := DOWN_ACTION
            inputParameter := 0
          LEFT:
            inputAction := LEFT_ACTION
            inputParameter := 0
          RIGHT:
            inputAction := RIGHT_ACTION 
            inputParameter := 0
          DELIMITER:
            ExecuteAction(inputAction, inputParameter)
          "0".."9":
            inputParameter *= 10
            inputParameter += inputCharacter - "0"
          other:
            Pst.Str(string("Error inputCharacter = "))
            Pst.Char(inputCharacter)
            
    PUB ExecuteAction(inputAction, inputParameter)
    
      case inputAction
        STOP_ACTION:
          Pst.Str(string("STOP_ACTION"))
          ' do stop action stuff 
        UP_ACTION:
          Pst.Str(string("Move up "))
          Pst.Dec(inputParameter)
          Pst.Str(string(" units"))
        DOWN_ACTION, LEFT_ACTION, RIGHT_ACTION:
          Pst.Str(string("Other Action with "))
          Pst.Dec(inputParameter)
          Pst.Str(string(" units"))
          ' do other stuff
          
    PUB SafeTx(character)
    
      case character
        32.."~":
          Pst.Char(character)
        other:
          Pst.Char("<")
          Pst.Char("$")
          Pst.Hex(character, 2)
          Pst.Char(">")
    

    If you get data coming to the terminal window, try commenting out lines 31 and 32 to let the rest of the program run.
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-15 14:18
    I will check this out first thing tomorrow morning and run your code! Thanks very much! Bits are being sent...from the app to the xbee. The text I have shown in my last post is the data I am seeing in the xctu console. The propeller code may have been a bit confusing because I took some bits and pieces from the setup I was using with two xbees (point to point communication). With my old setup when I was using a PS2 controller, I used two rows of Binary digits in the PST for showing me the state of the pin and if it was toggling when a button on the controller was pushed. It worked great because I was able to troubleshoot any connection issue with the controller using the PST. (That was why you saw the bit stuff)

    My ultimate goal with all of this is to replace the PS2 controller with the APP and create an app that has a buttons and analog sticks to run the robots. We have been running about 300 robots in a convention center over an 8 hour span to complete our event. They are spaced in 50' pods and we have been running all the xbees on Low power setting to reduce the RF footprint. We have been able to run about 12 channels in a single POD.


    With this new xbee setup there will likely be many more questions after I get this part working such as...


    1. How many robots will I be able to run at one time in a 50 foot radius
    2. Will I be able to assign each robot a special port?

    Setting up an APP with an IP address and PORT is not a huge deal, but as I have used the Wifly app, it only allows logging in using port 9750. That has me stumped! When setting up the configuration of the xbee in XCTU it has a port modification slot where you can change the port value. However, the ports on my xbee wifi in XCTU are not set to 9750 and it still communicates. I'm assuming..maybe wrongfully, that port 9750 is some kind of standard value.


    btw...in case you didn't know

    XCTU allows you to create an SSID for the xbee, so basically it becomes its own network and the phone connects to the network of the xbee through wifi.

    I like the way you laid this out. I truly appreciate your time on this. I will share my results tomorrow.
    Thanks Again!
  • banjobanjo Posts: 443
    edited 2014-12-16 07:55
    Kevin_Pace wrote: »
    ...
    Setting up an APP with an IP address and PORT is not a huge deal, but as I have used the Wifly app, it only allows logging in using port 9750. That has me stumped! When setting up the configuration of the xbee in XCTU it has a port modification slot where you can change the port value. However, the ports on my xbee wifi in XCTU are not set to 9750 and it still communicates. I'm assuming..maybe wrongfully, that port 9750 is some kind of standard value.
    ...

    I remember being confused about same port 9750 when connecting from an iPad, have you checked if the ports in XCTU are in hex-format and corresponds to decimal 9750? I might find the documentation later on, but don't count on it.
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-16 08:10
    banjo wrote: »
    I remember being confused about same port 9750 when connecting from an iPad, have you checked if the ports in XCTU are in hex-format and corresponds to decimal 9750? I might find the documentation later on, but don't count on it.
    I will check this out. i was unaware of the format but I will look into it now! If you find documentation that would be great! Thanks
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-16 08:18
    Kevin_Pace wrote: »
    Duane, thanks for your code! I tried it and I now have communication showing in the parallax serial terminal from the "Wifly Remote" app. AWESOME! I will be working with this code to assign some servo control by adding the SERVOS PE Kit object as well as setting up some DC Motor control etc... sensors etc... If you have any suggestions on the best way to setup the servo control with your code I would gladly accept them!

    Many thanks for getting me over the hurdle on this initial phase!

    Ill be getting back with some code once I get a basic robot moving around!

    I am thrilled to move this project forward! Thanks Again!
  • banjobanjo Posts: 443
    edited 2014-12-16 10:56
    Kevin_Pace wrote: »
    I will check this out. i was unaware of the format but I will look into it now! If you find documentation that would be great! Thanks
    Well, it is not really documentation but found below code snippet which I believe sets the port to 2616 Hex. Hex 2616 is Dec 9750, so if it's 2616 you see in XCTU then it's same as 9750.
    ...
        print("cmd = ATDE2616\n");
        xbcmd("ATDE2616\r", response, 10, 20);
        print("reply = %s", response); 
    ...
    
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-16 12:21
    banjo wrote: »
    Well, it is not really documentation but found below code snippet which I believe sets the port to 2616 Hex. Hex 2616 is Dec 9750, so if it's 2616 you see in XCTU then it's same as 9750.
    ...
        print("cmd = ATDE2616\n");
        xbcmd("ATDE2616\r", response, 10, 20);
        print("reply = %s", response); 
    ...
    

    I will check this out tonight! I believe that the number was 2616. That is GOOD NEWS! Thanks so much for following up.
    I will post some update info on the project tomorrow!
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-17 10:58
    Kevin_Pace wrote: »
    I'm not sure what has happened with communication with the app. Although initially I had communication, I don't have communication anymore. I am 100% certain that my xbee pin 2 is connected to PROP pin 4 and xbee pin 3 is connected to PROP pin 3
    but data does not show up in the PST unless I change the xbee.start command RX pin to 5,6,7,8,or 9 This truly has stumped me.

    I made absolutely sure I duplicated my steps from the prior day.

    I have disconnected the xbee module and reconnected it to xctu to be sure the app and the xbee are still communicating and that is still working like it always has.

    Pin 5 through 9 on my PROP are not connected to anything! Below you will see what streams in the PST window when the RX pin is changed to any pin 5 through 9.

    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00><$00>
    <$00><$00><$00><$00><$00><$00><$00><$00><$00


    If I comment out the lines below, I will see the text "error input character" pulsing at the top corner of the PST terminal!

    So...I believe its getting data but I can't make heads or tails of it!

    repeat 'If data is displayed, try commenting out these two lines
    SafeTx(Xbee.rx) 'to see if the rest of the program works.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-17 11:09
    I think you're not getting data. I think all the zeros should be framing errors. Something (obviously) is not working correctly.

    Tracy Allen's four port serial driver rejects these sorts of framing errors but most of the other serial drivers don't (including PST apparently).

    Often adding a pull-up resistor on the RX line will eliminate these framing errors but then there's still the problem of not receiving real data.
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-17 12:11
    Yesterday morning after I opened your code and ran it, we were getting data. We could push the buttons on the app and see data. However, I brought things home yesterday to tinker some and I couldn't get any data to move. I am attaching a few PICs of my board and setup. You will be able to see that there is no way I could change any terminal connections. I designed these boards around the PROP and the xbee. I have been using them with the XBEE PRO modules with no issues. When DIGI said the pinout was the same for the wifi module I bought them. I'm not sure how to proceed at this point. I definitely know that the xctu terminal still gets the data from the app. Any ideas?
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-17 17:58
    I have been going over the findings with the APP controlled Robot project so far and here is what I have concluded.

    1. The RX indicator in the PST doesn't blink when buttons are pushed on the app (generally when data is moving into the PST the RX light blinks.)
    I have to assume that I'm not getting data which leads me to number 2.

    2. From what I am reading, the xbee requires a start indicator (character) such as an "!" I believe that Duane used the "delimiter' command for this.
    Please correct me if I am wrong Duane.

    3. However, When I used two xbee pros,(with my old project) the start indicator was critical to data flow. Data would not move unless the transmitter and
    receiver had the same start indicator.

    4. The data that comes from the app and goes into XCTU (the XB) is stuff like " R40;S0;" or "F80;S0;" Is there a way in PROP programming to identify these special patterns of 7 bits and call them something simple, but something that always begins with the same character?

    I have tried all kinds of variable ideas and I keep running into syntax errors.

    It seems to me that if we had the same start character for each button, the rx would pass through since the start character would be the same.
    Just a thought....

    So right now I am stuck because I can't seem to find a way to display the app button data in the PST.

    If anyone has experience a similar problem or has a solution, it would be very welcomed!
    Thanks to all!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-17 18:24
    I think the data isn't getting through. The start character is generally a software convenience to identify the beginning of a message. I could see from the data you posted in #7, there wasn't really a start character being sent. The "delimiter" was the semicolon since I could see from the data there was a semicolon (ASCII character $3B) after each numeric part of a command.

    I interpreted the command "R40;S0:" to mean go right 40 units and then stop. I don't know if the units are in speed or distance. I'm not familiar with the app being used but perhaps there is a way to proportionally control a robot by changing the values after the letter commands.

    I'm not sure if it's clear to you or not but the data displayed on the left side of the console are the ASCII values (in hex) of the characters displayed on the right side of the console.

    I figure these are the character you have to work with if you want to develop a Spin program using the app as input. From what I understand, you're not free to assign your own start characters. Personally, I don't think this is a problem. I think the problem is for some reason the XBees aren't communicating.
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-18 07:56
    Thanks for letting me know about the characters in XCTU. I was looking a little deeper into this new version and I found the way to close off the console so you only see the data one way. I know this can be done, especially since we have people running arduino with the same xbees. I suppose I will have to hone my programming skills a little more to be able to tackle the challenge. I will continue to work at it. Thanks for all of your help Duane!
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-18 09:57
    Thanks Chris for your input on the problem with seeing the xbee data in the parallax serial terminal. I have placed the link below to the "Wifly Remote" app. I originally found the Wifly app on you tube as I was searching for information on the xbee wifi modules. If you search xbee wifi, you will see a short video by Cytrontech. It shows the robot with the app control. This got me thinking about my platform. I also posted some pics in the thread that shows my board and the thread also has my setup pin configuration between xbee and PROP. I have xbee pin 2 (RX) connected to PROP pin 4 and xbee pin 3 (TX) connected to PROP pin 3.

    Thanks for any light you can shed on the problem. I apologize if I didn't post this link in a better way. I'm not overly familiar with the FORUM as of yet!


    https://play.google.com/store/apps/details?id=com.inex.wiflyremote&hl=en
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-18 12:01
    Kevin_Pace wrote: »
    My ultimate goal with all of this is to replace the PS2 controller with the APP and create an app that has a buttons and analog sticks to run the robots. We have been running about 300 robots in a convention center over an 8 hour span to complete our event. They are spaced in 50' pods and we have been running all the xbees on Low power setting to reduce the RF footprint. We have been able to run about 12 channels in a single POD.

    I wonder if there's a more cost effective solution than the XBee modules.

    I just purchased one of these $4.50 WiFi modules and hope to get it working with the Propeller.

    I've used $2 nRF24L01+ modules to control robots in the past by I haven't ever used a WiFi connection to control a robot.

    I personally really like the PS2 controller. My one and only submission to the OBEX is a PS2 driver which will allow access to the analog buttons on the controller. Here's a link to my overly complex robot controller I've been working on. It uses a PlayStation 2 controller as well as a touchscreen.

    300 robots running around a convention center sure sounds like a lot of fun.
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-20 13:47
    Well I certainly agree that there may likely be a more cost effective solution, in some respects. However, it is my goal to continue using the same propeller/Xbee platform and just create a change in code and the type of xbee used. What I discovered by working with the xbee modules is that I have a great deal of control over the RF signals in a convention hall. The xbee modules give me encryption protection, password protection and 13 channels to make available in one confined area. They also give me the ability to control the range of the RF into a small closed area (25 feet) on low power. This is a tremendous advantage when running 300 robots in a small area. It has worked perfectly over the past 7 years and so it is my belief that, (If this coding issue can be resolved), we will have a platform to build on for a few more years. There is a lot of detail that plays into setting up an event that thousands of kids are involved in and the teacher training is also a sticking factor. If I can modify our current platform with only and xbee change, teacher training becomes minimal and so costs are significantly lower on that end alone.

    I totally respect your thinking and under different circumstances, I would probably look for another option. Thanks for your input and thoughts on this project Duane.

    I have talked with Chris Savage and he has told me that he may try to duplicate my setup to see where he thinks the code hangup may be. Chris believes it might even be a timing issue. I am hopeful that he can be a game changer. I just have to believe that if so many other platforms are doing it, we need to be on the playing field too. In my opinion, the Propeller is the best micro-controller on the market because of its vast ability and support. We have invested over $100,000 dollars in the past 5 years buying materials from Parallax and their team has never let me down. Andy Lindsay coached me along in the beginning and helped me get it going initially and we have seen a BOOM in growth. We have 60 schools in our own school division involved in this program. over 50% of the schools are elementary. The kids build the circuit boards and then test them, learn to program with some basic spin activities and then get moving on building a robot for the annual challenge. We have over 175 mentors and teachers involved as well.

    I hope this paints a little bigger picture for everyone concerning the importance of it.

    I'm excited because I feel confident once we jump this hurdle, it will be moving forward pretty fast!

    Thanks again for all your input. I will certainly share anything once I get it working!
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-12-20 14:09
    Kevin,

    It sure sounds like a lot of fun getting that many robots together.

    Just so I know, are these the XBee WiFi modules you're using?

    You just need one module right? The other side of the com link is the tablet's WiFi radio, right?
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-21 16:38
    You are correct Duane. The xbee module you selected from parallax stock is the one I am using with one minor change. I am using the xbee S6B but mine has the CHIP antenna instead of the wire. This makes it a little more durable on a robot platform. So as we discussed, only ONE module will be needed with the app setup (The xbee will be only on the robot) and the com link is completed with the phone or tablet wifi radio. Its really a great setup.

    I'm staying positive that communication can be established in the PST window!

    Its chaotic right now in most places with Christmas etc...but maybe Chris will be able to shed some light on this very soon!
    Have a Merry Christmas!
    Thanks for all you feedback and help!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-12-23 10:35
    I will follow up this week as soon as I can get everything set up on my bench. Sadly, I have been putting it back together for the last few days... http://www.savagecircuits.com/showthread.php?634-Workshop-Office-Reorganization&p=4642&viewfull=1#post4642
  • Kevin_PaceKevin_Pace Posts: 22
    edited 2014-12-28 14:51
    Chris, I can certainly understand the delay with all that you probably have going on! Not to mention the holidays! Lord willing you will be able to take a look after the 1st of the year! Thanks for anything you can add to get this project moving forward! Happy New year!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-12-29 09:22
    Kevin,

    This and one other issue I promised to look into are on my priority list today. The holidays didn't go as I planned. I expected to relax mostly and work on some projects. I only just got my bench back together yesterday. So today I have the parts I need sitting on the bench ready to go. I am just currently playing catch-up on forums, support e-mail and support calls. But we'll get it done. Thank for your patience. =)
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2015-01-08 16:10
    Kevin,

    I am having some difficulty with this app connecting to my module. Part of my confusion is whether the port value on the app is specified in decimal or hex. In X-CTU it is in hex, which is different from typical Windows apps which usually specify the port in decimal. Also, I didn't think to have you post your settings for the S6B so I could ensure I am using the same settings as you. Could you post your settings in X-CTU for the S6B?
Sign In or Register to comment.