Hello i an new at this so sorry my bad english and code
i try to make a rc car controller whit cheap 433mhz transmitter and resiver set
but when compile i get this error
libraries\Servo\avr\Servo.cpp.o (symbol from plugin): In function `ServoCount':
(.text+0x0): multiple definition of `__vector_11'
libraries\RadioHead\RH_ASK.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino/Genuino Uno.
//Receiver code
//motor 1 er baghjul
//motor 2 er forhjul
int mot1speed=5;
int mot1a=2;
int mot1b=4;
int mot2speed=6;
int mot2a=3;
int mot2b=7;
//int lys=9; // lys
//int blysh=10; //højre blinklys
//int blysv=11; //venstre blinklys
//RC Resive kode
#include "RH_ASK.h"
#include <SPI.h>
#include "Servo.h"
//Servo servo1;
Servo servo2;
//RH_ASK driver;
RH_ASK driver(1000, 12, 8, 10); // bps,rx,tx
//Those are used for fine tuning
int SERVO_LOW = 0;
int SERVO_HIGH = 180;
int c1,c2,c3;
int fart;
// Pin assignments for channels(output to servos)
//byte CH1_PIN = 10;
//byte CH2_PIN = 13;
//byte CH3_PIN = 11;
void setup() {
// put your setup code here, to run once:
servo2.attach(13);
pinMode(mot1speed,OUTPUT);
pinMode(mot1a,OUTPUT);
pinMode(mot1b,OUTPUT);
pinMode(mot2speed,OUTPUT);
pinMode(mot2a,OUTPUT);
pinMode(mot2b,OUTPUT);
//pinMode(lys,OUTPUT);
//pinMode(blysh,OUTPUT);
//pinMode(blysv,OUTPUT);
//digitalWrite(lys,HIGH);
//
//servo1.attach(CH1_PIN);
// servo2.attach(CH2_PIN);
// pinMode(CH3_PIN, OUTPUT);
// Debugging only, comment serial stuff when done
Serial.begin(9600);
if (!driver.init())
Serial.println("init failed");
}
int treatValue(int data) {
return (data * 9 / 1024) + 48;
}
//--------------------------
void loop()
{
uint8_t buf[12];
uint8_t buflen = sizeof(buf);
if (driver.recv(buf, &buflen)) // Non-blocking
{
c1 = buf[0];
c2 = buf[1];
c3 = buf[2];
// Remap values to the predefined range
byte v1 = map(c1, 0, 255, SERVO_LOW, SERVO_HIGH);
byte v2 = map(c2, 0, 255, SERVO_LOW, SERVO_HIGH);
// servo2.write(v2);
//Output button state to a led
// digitalWrite(CH3_PIN,c3);
// Serial.print(c3);
//Servo reaction time(adjust delay to your needs)
// delay(5);
//control of motore
servo2.write(v2); //to server for turn
// drive forward and back
if (v1 > 80 && v1 < 95 ) {
// stop kør
analogWrite(mot1speed,0);
digitalWrite(mot1a,LOW);
digitalWrite(mot1b,LOW);
// Serial.print("stop1");
}
//Drive forward
if (v1 > 96){
fart = ((v2-90)*2.8333);
analogWrite(mot1speed,fart);
digitalWrite(mot1a,HIGH);
digitalWrite(mot1b,LOW);
// Serial.print("Frem ");
// Serial.println(fart);
// delay(100);
}
back%20wheel%20drive%20back
if (v1 < 79){
fart =(((v2-80)*-1)2.1875); //not want full speed when go back
analogWrite(mot1speed,fart); //if want max fart =(((v2-80)-1)*3.1875);
digitalWrite(mot1a,LOW);
digitalWrite(mot1b,HIGH);
// Serial.print("Tilbage ");
// Serial.println(fart);
// delay(100);
}
}
}