Go Down

Topic: Wireless communication from Arduino to PC (Read 7037 times) previous topic - next topic

AbdullahZubair

Hello people,
Need your help
I need to communicate from my arduino to PC,wirelessly. Bluetooth was costly,so we bought 2.4GHZ RF modules from robosoft systems
http://www.robosoftsystems.co.in/roboshop/cc2500-wireless-module.html
How do I program the arduino,this module has only tx and rx pins.
Should i just connect the rx tx pins of arduino(pin no. 1 and 2) to those of the module? How do I set the baud rate?
Help me out.

Thanx

Steen

if you took a good look on that page you would have found this:
http://www.robosoftsystems.co.in/roboshop/media/catalog/product/pdf/RFpro%20Module%20-%20how%20to%20use%20v4%20.pdf

it's a pdf in which everything is described

michael_x

Quote
pdf in which everything is described

... except how to connect the PC side module to a PC with USB only ... ;)

If that's easy for you, and if you're sure the module uses TTL level (5V) signals, then search for Arduino's SoftwareSerial  library. I'd keep pins 0,1 for testing/deugging using the standard USB connection. At least until all works fine.

Not sure if you can use these modules to load sketches into the Arduino. Hope this isn't your goal.

AbdullahZubair

Thanx for the help guys,
I had seen that pdf.
I am communicating from Arduino to PC. No programming is required at the PC. Need to program the arduino. They have given a code for a microcontroller,can any one translate it for me.

I connected the transmitter's TX pin to Arduino's TX pin(pin#1), should i write my data to the TX pin or should i just make the TX pin High and use Serial.print.
Can any one tell me what is the use of TX pin and how to send the data?

Urgent help required. :(

dhunt


Thanx for the help guys,
I had seen that pdf.
I am communicating from Arduino to PC. No programming is required at the PC. Need to program the arduino. They have given a code for a microcontroller,can any one translate it for me.

I connected the transmitter's TX pin to Arduino's TX pin(pin#1), should i write my data to the TX pin or should i just make the TX pin High and use Serial.print.
Can any one tell me what is the use of TX pin and how to send the data?

Urgent help required. :(


Those modules have an RS232 interface suitable for direct connection to a PC. It's not suitable for direct connection to an Arduino. You'll need a level shifter like this one http://www.sparkfun.com/products/8780, or a MAX232.

AbdullahZubair

Yeah i used max 232.
Okay I am using this code now

void setup()
{
Serial.begin(9600);
}

void loop()
{
int anlogvalue=analogRead(0);
Serial.println(analogvalue);
delay(10);
}


I will connect the tx of the transmitter to the tx pin of arduino.
Will the data be transmitted?

Cheezey


Yeah i used max 232.
Okay I am using this code now

void setup()
{
Serial.begin(9600);
}

void loop()
{
int anlogvalue=analogRead(0);
Serial.println(analogvalue);
delay(10);
}


I will connect the tx of the transmitter to the tx pin of arduino.
Will the data be transmitted?


If I were you, I would try it first.
However, I noticed an error in your code:
Code: [Select]
int anlogvalue=analogRead(0);
Serial.println(analogvalue);


You missed an 'a' in the first 'analogvalue'.

AbdullahZubair

Quote
If I were you, I would try it first.
However, I noticed an error in your code:
Code:

int anlogvalue=analogRead(0);
Serial.println(analogvalue);


You missed an 'a' in the first 'analogvalue'.


Thanx man.
Yeah i will try. :)

mdj1342

Hello abdullah my name is mohammed junaid...actually i have a project in which iam using arduino mega 2560 and cc2500 wireless module..I would like to know how you actually communicated from the arduino to the pc...if u could give the example code it would be really helpful..the project submission is this week so urgent reply needed..thankyou!!

AbdullahZubair

Hey junaid,are you using cc2500 directly?
We used a RF module which has cc2500 embedded in it.
Its a readymade chip and comes with only three pins rx,tx and ground. You just need to connect it to tx rx of arduino via a level shifter like max 232 and a simple code with serial.print will transmit the data, the receiver module directly connects to the pc via rs 232 port

But if u are using cc2500 module independently , i guess u will have to do a little more.

Hope it helped,btw where you from?

mdj1342

abdullah Iam from bangalore...and iam using the same module shown in the pdf ...i  have one wireless module connected to the arduino mc on the bot..that has to send a signal when ever the bot changes the direction..that signal should be received by the pc..which also has the same wireless module attached to it through a rs232 usb to serial convertor..
so hence how do i  send and access these values..
and could u show a example code for it..its urgent
Thankyou!!

AbdullahZubair

Well junaid, this module is directly compatible with pc,you dont need max 232 or any other converter.
But you need max 232 at the bot side.
So its like ur Arduino---->MAX 232----->RF Module.
And at the PC,RF Module---->PC
Once you are done with conditions, try this code
Yeah i used max 232.
Okay I am using this code now

void setup()
{
Serial.begin(9600);
}

void loop()
{
Serial.println(1);
delay(100);
Serial.println(0);
delay(100);
}

And if u have downloaded the terminal program given by robosoft, you will see the output.

mdj1342

Thanks a lot Abdullah for your response...i will try this out and hope it works..thanks once again..!!

mdj1342

Hey abdullah ,i thot the next time i would send a post it would say 'module working"  but seems tt would take a while..
I bought  MAX232 today and the one question that popped up was, how do i connect the arduino and rf module through this..
cant i directly connect the Tx pin of the rf moudle to the RX pin of the arduino board and vice versa...??
iam a comp science student so dont have much idea about these devices..please help..!!
Thankyou!!

AbdullahZubair

http://chuckontech.com/wp-content/uploads/2011/09/Max232.jpg

pin no. 7 and 8 to rx and tx of rf module

pin no. 9 and 10 to rx tx of arduino

Connect the capacitors and 5v supply

it should work inshallah

Go Up