Hello

Hi,i'm a begginer and not a very smart one, i'm trying to controll a brushless motor connected at an esc and an arduino uno via 433mhz module, the transmitter part is made of a 433 mhz module, arduino nano and a joystick.I found some codes on th internet but none of them worked so i uploaded a code for sending a sentence to see if my 433 mhz modules work and they are.....so i ask you guys to help me with this...i repeat im noob,it doesn t seem to be a verry complicated code but i m not good at this and i want to learn

ESCs usually accept servo commands to control the motors. Does your ESC operate this way. What is your code on the receiving end that sends the commands to the ESC?

Well, now im not at home but i succefully managed to make it work without the wireless , joystick battery esc connected at arduino nano, but than i tried wireles but didn t worked

noob,it doesn t seem to be a verry complicated code

...but it is invisible

I will post the code i tried when i get home

transmitter code:

#include <SoftwareSerial.h>

#include<Servo.h>

Servo esc;

SoftwareSerial modul(11,12); //RX, TX

int thr;

void setup()

{

esc.attach(9);

pinMode (A0, INPUT);

Serial.begin(9600);

modul.begin(9600);

}

void loop()

{

thr=map(analogRead(A0), 0, 1023, 0, 180);
modul.print(thr);
modul.println("");
Serial.print(thr);
Serial.println("");
delay(100);

}

reciver code:

#include <SoftwareSerial.h>

#include<Servo.h>
Servo esc;

String input;

int throttle, thr;

int boundLow;

int boundHigh;

const char delimiter = ',';

SoftwareSerial modul(11, 12);

void setup()

{

esc.attach(9);

Serial.begin(9600);

modul.begin(9600);

esc.write(170);

delay(2000);

esc.write(90);

delay(2000);

esc.write(140);

delay(2000);

esc.write(90);

delay(2000);

}

void loop()

{

if(Serial.available())

{

input = Serial.readStringUntil('\n');

if (input.length() > 0)

{

//Serial.println(input);

boundLow = input.indexOf(delimiter);

throttle = input.substring(0, boundLow).toInt();

esc.write(throttle);

delay(10); }

}
}

but it doesn t work, the rx led on arduino uno doesn t blink or anything, my motor shakes a little but not when i want to , sorry i dont speak English verry well and i dont know to explain what the motor does.

when i uploaded a code to send a sentence (hello) with radiohead library, the rx led blinked and worked fine

Are the 433MHz radio modules designed to work at 9600 bits per second?

Have you tried lowering this speed?

The receiver code expects the input to have a semicolon in it somewhere. The transmitter does not send a ; in it's data stream. What you see is exactly what I would expect you to see.

modul.println(thr);

does exactly the same thing as your

modul.print(thr);
modul.println(""); // the empty string here is useless - modul.println(); does exactly the same thing

Aha, i found the code and i cut parts i didn t use from it
So how do i make it work?
I will lower the spedd from 9600 to 2000

flaviuse:
Aha, i found the code and i cut parts i didn t use from it
So how do i make it work?

How would we know, without seeing it?