controls a motor with radio frequency (rx tx 433.92mhz)

hi my friends I decided to order an engine with the radio frequency (rx tx 433.92mhz) I isis mounting; but I found a problem with the programs of the transmitter and receiver with arduino (because I use a microcontroller ATmega328P) I just do a program that make a on and off with a single switch in the card issuer. Please help I need a new program
increases the speed and helpless (the PWM signal) and reverse direction. it s important for my final project of study =( =(

When is the project due, and what have you learned about the arduino so far? Your using 433 Mhz modules, which ones are you using exactly, because there are many. Have you done a search yet for "Arduino + 433 Mhz RF"

mondher:
I need a new program increases the speed and helpless (the PWM signal) and reverse direction.

So you've read this, right? Arduino Playground - DCMotorControl

I control a DC motor with distance rx tx 433 mhz i do just on / off and meaning 1 and 2 and speed pwm I just do the step speed and that the code transmitter and receiver help me please[#include <VirtualWire.h>

// Sensors
const int PotPin = A0;

int Nombre;

char Message[VW_MAX_MESSAGE_LEN];

void setup() {

vw_setup(2000); // Bits par seconde

}

void loop() {

// Lecture de l’état du potentiomètre
Nombre = analogRead(PotPin);

// convertion de l’int en tableau de char
itoa(Nombre,Message,10); // 10 car décimal

vw_send((uint8_t *)Message, strlen(Message));
vw_wait_tx(); // Wait until the whole message is gone
delay(200);

} ]
[#include <VirtualWire.h>

#define ledPin 5

int Nombre;

char Message[VW_MAX_MESSAGE_LEN];

void setup() {
vw_setup(2000); // Bits par seconde

vw_rx_start();

}

void loop(){
uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;

if (vw_get_message(buf, &buflen))
{
int i;

for (i = 0; i < buflen; i++)
{
Message = char(buf*);*
}

Message[buflen] = ‘\0’;

// Conversion du tableau de chars en int:
Nombre = atoi(Message);
analogWrite(ledPin, Nombre/4);
}
}]

I don't understand your question . Can you rephrase it.
What is your question ?

i want a program to control dc motor with rx tx .. i need the solution to generate 2 signal pwm to control 2 sence

What does this mean ?

2 signal pwm to control 2 sence

You still have not provided enough information to understand your question let alone answer it.

I'm not sure what 433 MHz Tx and Rx units you are using, but take a look at the RcSwitch library

It can send and receive and you can setup multiple virtual channels each with multiple switches

I want to control the direction and speed of motor :~ with the pwm signal

I want to control the direction and speed of motor with 2 pwm signal 1 foe direction 1 and the other to 2 direction how i do that
what i write in the code =(

What is your hardware?
What have you tried?

PWM is not used to define direction.

You clearly need to do a much better job of describing what is between the Arduino and the motor.

DON'T CROSS-POST, IT WASTES TIME.

You need an H-Bridge and 3 signals DIR1,DIR2,(botth digital) and ENable (PWM).

i use this code which gives me a good result when I press pin8 the motor turned to the direction 1 and when i press pin 9 turned to direction 2. L293D is connected to the output of the arduino, but I lack the speed control with pwm signal help pls ( Wireless control with 433mhz TX RX radiocomunication)

/* TRANSMITTER CODE

#include <VirtualWire.h>

void setup()
{
Serial.begin(9600); // Debugging only
Serial.println(“setup”);

// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(2000); // Bits per sec
vw_set_tx_pin(3);

pinMode(8, INPUT);
pinMode(9, INPUT);

digitalWrite(8, HIGH);
digitalWrite(9, HIGH);

}

void loop()
{
char *msg;

if(digitalRead(8) == LOW){
char *msg = “1”;
digitalWrite(13, true); // Flash a light to show transmitting
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13, false);}
if(digitalRead(9) == LOW){
char *msg = “2”;
digitalWrite(13, true); // Flash a light to show transmitting
vw_send((uint8_t *)msg, strlen(msg));
vw_wait_tx(); // Wait until the whole message is gone
digitalWrite(13, false);}

}

END TRANSMITTER CODE /
/
RECIEVER CODE

#include <VirtualWire.h>

void setup()
{
Serial.begin(9600); // Debugging only
Serial.println(“setup”);

// Initialise the IO and ISR
vw_set_ptt_inverted(true); // Required for DR3100
vw_setup(2000); // Bits per sec
vw_set_rx_pin(2);
vw_rx_start(); // Start the receiver PLL running

pinMode(8, OUTPUT);
pinMode(9, OUTPUT);

}

void loop()
{

digitalWrite(8, LOW);
digitalWrite(9, LOW);

uint8_t buf[VW_MAX_MESSAGE_LEN];
uint8_t buflen = VW_MAX_MESSAGE_LEN;

if (vw_get_message(buf, &buflen)) // Non-blocking
{
int i;

digitalWrite(13, true); // Flash a light to show received good message
// Message with a good checksum received, dump it.
Serial.print("Got: ");

for (i = 0; i < buflen; i++)
{
Serial.print(buf*);*
_ if(buf == ‘1’){digitalWrite(8, HIGH);}_
_ if(buf == ‘2’){digitalWrite(9, HIGH);}_

* Serial.print(" ");*
* }*
* Serial.println("");*
* digitalWrite(13, false);*
* }*
}

but I lack the speed control with pwm signal

You haven't got any "analogWrite"s.

You also haven't got any code tags, which is why your code looks so wrong.

click the MODIFY button in the upper right of the post window.
Highlight all you code.
click the "#" CODE TAGS button on the toolbar above just to the left of the QUOTE button.
click SAVE (at the bottom).
When you post code on the forum, please make a habit of using the code tags "#" button.

This is getting old fast.

READ THIS !

PUT IT INSIDE HERE:

Serial.print(buf);
        if(buf == '1'){digitalWrite(8, HIGH);}
        if(buf == '2'){digitalWrite(9, HIGH);}

I USE THIS module

2132365.pdf (266 KB)

You CROSS-POST one more time, and you're banned, clear?

Topics merged.