Hello everyone, this is the first time I join the forum.Therefore, please forgive me for some of my questions is naive or stupid.All right! This is my problem, I wanna build RF Transmitter using arduino that receive data from my laptop through serial then send it to the Receiver to control a robot.
I have coded a small Python script.When I run it, I could use W,A,S,D on keyboard to navigate the robot.
I have planned using the RF 433Mhz modules with Virtual Wire lib but the electronics store does not sell those instead they only sell RF 315Mhz Transmitter/Receiver set using PT2262/PT2272 chips. Therefore, I bought one.
I have read a lot of articles but none of them use this set. Someone uses RCSwitch library to program with a transmiting module with VCC/GND/DATA pins and their explanation make me confused.Please help me choose the Lib and show me how to program with these modules ! I need to program 2 board one for transmitting and one for receiving.
Virtual Wire send a byte type pointer so that it send an array of char while four OUTPUT pins of PT2272 module only give discrete values like LOW, HIGH. This is where I am stuck in. Look again to the image of the modules.
So pins 10~13 of PT2262 transmitting module correspond to A~D buttons.If I want something like pressing button A, I call digitalWrite(the Arduino pin connect to PT2262 module pin 10 , HIGH). Is that correct/
You can't use those kind of receivers/transmitters with virtualwire.
They already have dedicated chips performing the role of virtualwire.
If you want to use virtualwire, you need to use the transmitter/receiver boards that do not have the PT2xxx chips on them.
If you want to use the PT2xxx boards, you do not use virtualwire, and instead have to simulate buttons on the transmitter, and listen to the pins turning on and off on the receiver. You need to pulse the simulated buttons (as someone presses and releases them, rather than holding them down continually - I think they transmit constantly as long as the "button" is "held down")
I do not know if virtualwire/radiohead/other library exists that will output or receive PT2xxx compatible signals on a transmitter/receiver that doesn't have the PT2xxx chip on it - if there is, that might give you some more freedom.
Re: antenna - those receivers will usually work without an added antenna if the transmitter is very close. However, that receiver looks like a typical crapola superregenerative design, like the really cheap green ones - they're marginal in the best of circumstances. A nice superhet OOK receiver will work at short range w/out an added antenna. It markedly degrades range compared to using an antenna, ofc...