Wireless Communication
SAN
Posts: 29
Hi!
I am making 2 autonomous robot,using Propeller Chip which needs to communicate with each other.
Is it better to use Easy Bluetooth Module(#30085) for this purpose ?
Is it possible to transfer data all the time using a new cog in propeller, even when other cogs are doing another tasks ?
I am making 2 autonomous robot,using Propeller Chip which needs to communicate with each other.
Is it better to use Easy Bluetooth Module(#30085) for this purpose ?
Is it possible to transfer data all the time using a new cog in propeller, even when other cogs are doing another tasks ?
Comments
2) Yes, you can use a cog (probably 2) to completely manage communications using the Easy Bluetooth. You probably will need a 2nd cog to handle the low-level serial I/O and provide a buffered input routine (FullDuplexSerial). The communications management cog would communicate with the other cogs by using shared variables in the main (hub) memory.
One more question...
Is it possible to declare and use 2d array variable in Spin Language for Propeller chip ? - Like other computer language.
Analyse how big the values are that you want to store in the array-elements.
you can define arrays of byte (values 0-255), word(-32767 to 32678 or long (-2.147.483.648 to 2.147.483.648)
arrays of word need two bytes per array-element
arrays of long need four bytes per array-element
best regards
Stefan
Spin only supports 1D arrays. You can't declare 2D or higher order arrays.
Part of the reason for this is that there's limited memory available ... 32K bytes for the storage of a program and its data. It's expensive in terms of memory to store the amounts of data usually involved in 2D arrays. It's not hard to implement 2D arrays using 1D arrays and putting the subscript calculations explicitly like A[noparse][[/noparse] i*5+j ] = B[noparse][[/noparse] j*5+k ] + C[noparse][[/noparse] i*5+k] for A[noparse][[/noparse] i,j ] = B[noparse][[/noparse] j,k ] + C[noparse][[/noparse] i,k ] where A, B, and C are 5 x 5 arrays.
That said, I think one of the 3rd party Spin compilers (homespun) implements multiple dimension arrays.
There's also the Catalina C compiler and, if your programs are not that large, ImageCraft allows free use of their commercial C compiler for programs up to 16K in size.
I have bought a pair of Parallax Easy Bluetooth Module (#30085).
Now, I want to know how I can connect to bluetooth module for communication ?
Is there any perticular object for that or the Serial obj, cna be used ?
Plz help me.
Now I can connect the module with my PC and its working fine with FullDuplexSerial object.
But my ques is how i can connect two Easy Bluetooth Module ? Is there any command to Specify the MAC address of the bluetooth ?
If u can give me a sample code.
www.parallax.com/StoreSearchResults/tabid/768/txtSearch/30085/List/0/SortField/4/ProductID/550/Default.aspx
Here's one way:
It helps if your array dimensions are powers of 2 so you can use the "<<" operator.
As for radio links, you may want to look at ZigBee as well.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"A government big enough to give you everything you want, is big enough to take away everything you have. "
- Thomas Jefferson
Post Edited (Ken Peterson) : 11/4/2009 1:21:34 PM GMT