Shop OBEX P1 Docs P2 Docs Learn Events
Wirelessly? — Parallax Forums

Wirelessly?

Dave SDave S Posts: 22
edited 2004-11-01 17:50 in General Discussion
I always enjoy wireless applications, so why not for my javelin projects??

Looking over parallax's website, there two paths I can take, the EmbeddedBlue Transceiver AppMod (2.4ghz) or I could go the 900mhz tranceiver (with demo board).

Now I am more filmiliar with Bluetooth and the 2.4 ghz freqency, not too much fooling around with 900.· 300ft seems ok, but would there be any cons in going for the 900mhz (1000ft) setup?

Basicly I have no projects that will use this at the moment, but I do however wanto to fab some type of robot (I have a prototype hexapod leg I made at home 2-axis of motion).

Just wanted some feedback on wireless systems for Javelin's



Thanks

Dave


<!-- unit price -->

Comments

  • Dave SDave S Posts: 22
    edited 2004-09-08 21:10
    Anyone have an idea how reliable it would be to use the 900mhz system for sending data and commands back and forth? My goal is to eventually get two javelin based robots to talk to eachother without any user intervention, 1000ft seems ideal for this. I just dont wanna take the plunge to find out I made a bad choice [noparse]:)[/noparse]
  • JavalinJavalin Posts: 892
    edited 2004-09-28 12:38
    Hello All,

    I have 2 * eb500 bluetooth modules. I have not spent much time on them, and thus have not got very far. My only issue at present is that the Javalin will only buffer 128bytes of data. So a fast (i.e. > 9600) baud can cause you to loose data. The eb500 does come with flow control - but I've not managed that yet!

    BTW - the Javalin is excellent for robot apps due to the size of code & ram available + the structure of Java!

    Does this help?

    james
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2004-09-28 14:21
    The javelin buffers 255 bytes on uarts, not 128.

    regards peter
  • JavalinJavalin Posts: 892
    edited 2004-09-28 14:30
    I stand corrected!
  • Steven TronSteven Tron Posts: 13
    edited 2004-10-17 18:51
    Hi,

    Take a look at www.radiometrix.co.uk they have modules ranging from vhf to uhf which if you read their data sheets equates to 200m to 10Km. These modules are very easy to use as the except data in a serial stream of logic level transitions



    Regards



    Steve
  • mza3000mza3000 Posts: 6
    edited 2004-10-29 21:20
    Hi James,
    I'm currently working on a communications project in which I'm trying to allow communication to take place between a laptop and a robot. the laptop is using a usb bluetooth transceiver, and the robot is using an eb500 bluetooth transceiver. So far I've wired the eb500 bluetooth module to the javalin stamp (according to the manual's instructions), but now i'm·having trouble getting started·on the programming end. Can you tell me (or supply program snippets) how to setup the various pins for communication to take place?

    On a very similar project in which two robots communicated with eachother on the same javalin stamp·(non-bluetooth), this is what I used:

    · import stamp.core.Uart;
    · import stamp.core.CPU;
    · import lobot.progs.libs.Motor;
    · import lobot.progs.libs.Digital;

    · public class wirelessMaster {
    ··· final static int TXD_PIN = CPU.pin14;
    ··· final static int TXD_FLOW_PIN = CPU.pin15;
    ··· final static int speed = 200;
    ··· static Uart transmitUart = new Uart(Uart.dirTransmit, TXD_PIN, Uart.invert, TXD_FLOW_PIN, Uart.invert, Uart.speed9600, Uart.stop1);

    Any help would be appreciated.
    thanks,
    Mark

    Javalin said...
    Hello All,

    I have 2 * eb500 bluetooth modules. I have not spent much time on them, and thus have not got very far. My only issue at present is that the Javalin will only buffer 128bytes of data. So a fast (i.e. > 9600) baud can cause you to loose data. The eb500 does come with flow control - but I've not managed that yet!

    BTW - the Javalin is excellent for robot apps due to the size of code & ram available + the structure of Java!

    Does this help?

    james
  • JavalinJavalin Posts: 892
    edited 2004-10-30 13:30
    Hi Mark,

    Since my posting I have got much further! The Javalin is an excellent MPU!

    I have 2 BOE (board of Education), 2 Javalin's and 2 EB500 modules. I use the AppMod connector for both EB500's. In this configuration I use pin 0 & 1 to recieve and transmitt via the UART.

    For this example you need to have pins 0,1,5 and 6 connected on the javalin to the RX,TX,Status and Mode pins on the EB500.

    This should work for the uart, assuming the EB500 is still operating at 9600:

    static Uart EB500RX = new Uart(Uart.dirReceive,CPU.pin0, Uart.dontInvert, Uart.speed9600, Uart.stop1);
    static Uart EB500TX = new Uart(Uart.dirTransmit,CPU.pin1, Uart.dontInvert, Uart.speed9600, Uart.stop1);

    The manufacter recommends that on each start up you run this code (coverted from the PBasic example)

    public static void clearEB500Link()
    {
    ··· // eb500 clear & Initialize
    ··· if (CPU.readPin(CPU.pin5) == true)
    ··· {
    ······· System.out.print("EB500 is alive in DATA mode, clearing.....");

    ······· // drive pin LOW
    ······· CPU.writePin(CPU.pin6,false);

    ······· CPU.delay(2000);

    ······· // disconnect
    ······· EB500TX.sendString("dis");
    ······· EB500TX.sendByte(13);

    ······· System.out.println("ok");
    ··· }
    ··· else
    ··· {
    ······· System.out.print("EB500 is alive in CMD mode, clearing.....");

    ······· EB500TX.sendByte(13);
    ······· EB500TX.sendByte(13);

    ······· System.out.println("ok");
    ··· }
    }

    then from the remote device you need its MAC address, this is then used to connect from your PC:

    EB500TX.sendString("get addr");
    EB500TX.sendByte(13); // return

    // wait a tick
    CPU.delay(2500);

    while (EB500RX.byteAvailable() == true)
    {
    ··· System.out.print((char) EB500RX.receiveByte());
    }

    and finally from the remote, connect to the robot:

    // connect
    System.out.print("Connecting.....");
    EB500TX.sendString("con XX:XX:XX:XX:XX:XX"); // address of the remote device
    EB500TX.sendByte(13);

    CPU.delay(5000);

    while (EB500RX.byteAvailable() ==true)
    {
    ···· data = (char) EB500RX.receiveByte();
    ···· if (data != ' ' && data != '\r')
    ···· {
    ········· System.out.print(data);
    ···· }
    }

    System.out.println("...ok");

    // wait for connection
    System.out.print("Wait for connection.....");
    while (CPU.readPin(CPU.pin5) == false)
    {
    ··· // nothing to do here.· any errors from eb500 shown previously
    }
    System.out.println("ok!");

    System.out.println("Connection OK!");

    // while connection is OK
    while (CPU.readPin(CPU.pin5) == true)
    {
    ··· // here you are connected
    ··· // use EB500TX.sendString("xxx") and EB500RX.receiveByte() to send and recieve as if you have a serial cable between the devices
    ··· // need to work out your own command/data protocol.
    ··· // use the·stringbuffer object/class to create strings to·send between devices, easy to use and·converts·int into string's for you!
    ··· // if the link drops the loop will end, and you can perform you own actions, i.e. stop the robot!!
    }

    I have got my EB500's running at 19200kps now, with no flow-control and no problems. If you are using another bluetooth device on your laptop, it *should* work, the eb500 doc provides some info and examples on this.

    Hope this helps

    James

    Post Edited (Javalin) : 10/30/2004 1:45:06 PM GMT
  • mza3000mza3000 Posts: 6
    edited 2004-11-01 17:50
    Thanks James!

    I'm already making good·progress in my program.


    Mark
Sign In or Register to comment.