Program for remote: //----------------------Program Developed by R.Girish----------------------// #include #include #include RF24 radio(9,10); const byte address[6] = "00001"; #define pot1 A0 #define pot2 A1 #define pot3 A2 constint threshold = 20; int potValue1 = 0; int potValue2 = 0; int potValue3 = 0; int pwmValue1 = 0; int pwmValue2 = 0; int pwmValue3 = 0; int check1 = 0; int check2 = 0; int check3 = 0; const char var1[32] = "motor1"; const char var2[32] = "motor2"; const char var3[32] = "motor3"; void setup() { Serial.begin(9600); radio.begin(); radio.openWritingPipe(address); radio.setChannel(100); radio.setDataRate(RF24_250KBPS); radio.setPALevel(RF24_PA_MAX); radio.stopListening(); } void loop() { potValue1 = analogRead(pot1); if(potValue1 > check1 + threshold || potValue1 < check1 - threshold) { radio.write(&var1, sizeof(var1)); pwmValue1 = map(potValue1, 0, 1023, 0, 255); radio.write(&pwmValue1, sizeof(pwmValue1)); check1 = potValue1; Serial.println("INPUT:1"); Serial.print("PWM Value:"); Serial.println(pwmValue1); Serial.print("Voltage Level:"); Serial.println(potValue1); Serial.println("----------------------------------"); } potValue2 = analogRead(pot2); if(potValue2 > check2 + threshold || potValue2 < check2 - threshold) { radio.write(&var2, sizeof(var2)); pwmValue2 = map(potValue2, 0, 1023, 0, 255); radio.write(&pwmValue2, sizeof(pwmValue2)); check2 = potValue2; Serial.println("INPUT:2"); Serial.print("PWM Value:"); Serial.println(pwmValue2); Serial.print("Voltage Level:"); Serial.println(potValue2); Serial.println("----------------------------------"); } potValue3 = analogRead(pot3); if(potValue3 > check3 + threshold || potValue3 < check3 - threshold) { radio.write(&var3, sizeof(var3)); pwmValue3 = map(potValue3, 0, 1023, 0, 255); radio.write(&pwmValue3, sizeof(pwmValue3)); check3 = potValue3; Serial.println("INPUT:3"); Serial.print("PWM Value:"); Serial.println(pwmValue3); Serial.print("Voltage Level:"); Serial.println(potValue3); Serial.println("----------------------------------"); } } //----------------------Program Developed by R.Girish----------------------//