how to send pwm signal from master to slave to control led. mesh network rf24l0

someone please correct my coding?
im attach my files

master rf24l01.txt (4.18 KB)

client rf24l01.txt (3.93 KB)

hafizanaffsah:
someone please correct my coding?
im attach my files

Sure thing. First, you tell us what it actually does. Second, you tell us how that differs from what you expect it to do.

basically the pwm signal is send from master to control light intensity at slave. the project is called inteligent street lighting. the sensor not yet include in this coding.

i dont understand how to send pwm signal from master to slave. tq sir

hafizanaffsah:
basically the pwm signal is send from master to control light intensity at slave. the project is called inteligent street lighting. the sensor not yet include in this coding.

i dont understand how to send pwm signal from master to slave. tq sir

That does not answer the question in Reply #1

Also, what exactly do you mean when you say "pwm signal"? Please give an example of what you want to send.

This Simple nRF24L01+ Tutorial may help.

...R

sorry sir. the pwm signal come from potentiometer. the potentiometer controlling the light intensity of led in slave. what i want to send is the value of pwm, so the light will adjust according to pwm. using mesh network.

the pwm signal come from potentiometer.

If you have the potentiometer connected to an analog pin, you are NOT getting a "PWM signal". You are getting an analog value. It is trivial to send an analog value.

Post a schematic for both ends of your radio link. What you say you need to do does not make sense.

hafizanaffsah:
what i want to send is the value of pwm,

Do you mean that (for example) you want to send the number 128 so that the receiving Arduino can do analogWrite(128); to set the intensity at 50%?

If not, give an example (with numbers) of what you do want to send.

ALSO, please explain your intended use of the Mesh network - do you really need its added complexity.

Have you tried any of the examples in my Tutorial?

...R