hi guys, i have to open a door (on a model) with a radio input. [the modle is 2 breadboard with integrated circuits made by my prof., and we're trying to connect with the project, isn't like the grove rf kit].
i think to attach one module (the transmitter) on a digital pin (configured as an output) that sends for example the number "87746"; the reciever on another digital pin (configured as input) that recieves these byte, and control them with an "IF" (if the byte are "87746" another digital pin will be activate and the door opens).
how can i memorize the byte, set the arduino, i really don't know how to start i hope someone could help me!
thx to everyone!
Your requirements are no at all clear.
Where is the arduino in this setup?
If you have a transmitter what is controlling it? PC, arduino or you pressing a button.
i think to attach one module (the transmitter) on a digital pin (configured as an output) that sends for example the number "87746"; the receiver on another digital pin (configured as input) that recieves these byte,
That makes little sense. For a start a digital output does not send numbers only binary values. And why have one pin send something and another receive something on the same arduino?
Draw out a block diagram of what you want to make it clear in your mind.
I have to do it for a project so i would like to include the rf kit by seedstudio if it's possible, it's only to bypass the "digitalwrite" via radio and then the input will be analyzed from arduino (byte transmitted == byte recieved) and arduino will activate another pin wich gives power to the servo to open the door.
I hope i've been more clear.
I'd like to use thw kit by seedstudio but i think 2 arduino are necessary, if not, please, explain me how to do.
If not i'd like to know how to send a string on a pin and recieve on another pin with two radio modules made by my prof.
Sorry my bad english!
If u have any suggest or other methods to how to do it, please tell me!
More but not very.
These points are not answered:-
If you have a transmitter what is controlling it? PC, arduino or you pressing a button.
You could connect the transmitter to the PC through a USB to TTL serial interface or you could use an arduino. On the recieve side you need an arduino if you require multiple bytes to do an action ( but why would you want to do this when a single byte will do ? )
To send ASCII characters through a single pin you need to use serial data. If you have a mega then this is easy because they have 4 serial ports. However most arduinos only have one and this is used for uploading code and debug printing so you have to use a software serial emulator. There are examples of this in the IDE. The same goes for receiving serial data.
Ok 'e understand, thanks! I'll try!
You have reason, 1 byte it's suffy, i'll search some example on the ide (could u tell me the name?).
I'll cotrol through a web page, all will be controlled by a web page.
File -> Examples -> 04. Communication -> SerialCallResponse
sorry but i'm not able to make it function.
i try the example u've suggested to me but i don't know who to adapt it to my "use".
i've the seed studio board (for there sensor) attached on the mega with the receiver and the transmitter.
i want to send a letter from the transmitter (every time a specific function is called from the control-website) to the receiver that control (with an IF) if the letter sent it's the same of the received, and if it is, arduino write "HIGH" the pin where the servo (to open the door) is connected.
i'm sorry i'm boring you and i hope i've been finally clear...
You don't believe in saying things up front do you?
(every time a specific function is called from the control-website)
Where did that come from?
What web site?
How are you connecting to it?
I did say:-
Draw out a block diagram of what you want to make it clear in your mind.
In my first reply.
This project gets more complex with each post.
i try the example u've suggested to me but i don't know who to adapt it to my "use".
This is because you have not got a clear idea of what your use is.
There is no point in trying to do the whole project all at once, you are not that good, no one is that good. You must break it down a bit at a time. Get one block working in isolation and then the next and so on until you have covered all the functions. Only then should you try and integrate them into a final project. This is basic project skills and your project supiviser should be teaching you this.
i want to send a letter from the transmitter ........
Just start with that. Write or adapt some code that sends a letter say once every 3 seconds or in response to a button push. Forget about how you finally want to trigger it. Then get the second arduino to receive it and print it out on the terminal.
That is enough to start with, and you will be learning skills of how to read code and how to adapt it to your needs.
One thing I don't understand is what the transmitter and receiver communicate with.
It is pointless them communicating with each other because they are on the same computer so there is no point transmitting a byte only to receive it on the same processor. However your notes seem to say that this is what they do.
Using a transmitter and receiver at the same frequency means you can not receive at the same time as you transmit.
The thing circled is the Mega in the rest of the diagram?
And the servo in the circle is the model that must be controlled?
Ok, i've understand!
Yes, the circled Mega is the one in the diagram, it's not another one and the servo is the door i will control so yes, it's the model.
I know it's pointless but it's a project for exam and i'd like to implement it with a "radio comand", only to show another things at the examinators, but i've understand it couldn't be possible (right?), so it's ok, thanks for your patience!
I used to be a University lecturer ( that is Professor in some parts of the world ) and if I saw that in a project I would not be impressed. In fact I would think that the student did not know what they were doing. Try and come up with a reason to have a transmitter in the project rather than have one that could be replaced with a wire or even eliminated altogether with software. This is why I was having such a hard job understanding what you were trying to do, it just did not make sense.
@grumpy_mike, i wanted to do this cause our program (school) includes the ASK and the rf module uses ask modulation, so i've tried to included it.
but it's not a problem, thank you for the patience and the suggestion!