Hello! I am using the arduino uno board. I am working on a simple project where i control a speaker and an led with a remote control using this GitHub - Arduino-IRremote/Arduino-IRremote: Infrared remote library for Arduino: send and receive infrared signals with multiple protocols library. Everything works fine(i can get the values from the controller i use) but when i add the tone command i get an error. I am fairly new to arduino, so help is greatly appreciated. Thanks!.
#include <IRremote.h>
int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;
int speaker=7;
int RedPin=6;
int GreenPin=5;
int BluePin=3;
void setup() {
pinMode(speaker,OUTPUT);
pinMode(RedPin,OUTPUT);
pinMode(GreenPin,OUTPUT);
pinMode(BluePin,OUTPUT);
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results))
{
Serial.println(results.value, DEC);
irrecv.resume(); // Receive the next value
}
switch(results.value){
case 3107826987: tone(speaker,10000);
break;
}
}
./opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -build-path /tmp/716244744/build -hardware opt/arduino-builder/hardware -hardware ./opt/cores -tools opt/arduino-builder/tools -tools ./opt/tools -built-in-libraries opt/libraries/latest -libraries /tmp/716244744/pinned -libraries /tmp/716244744/custom -fqbn arduino:avr:uno -build-cache /tmp -logger humantags -verbose=false /tmp/716244744/tex
Multiple libraries were found for "IRremote.h"
Used: /home/ubuntu/opt/libraries/latest/irremote_2_2_3
Not used: /tmp/716244744/custom/Arduino-IRremote
Tone.cpp.o (symbol from plugin): In function `timer0_pin_port':
(.text+0x0): multiple definition of `__vector_7'
/tmp/716244744/build/libraries/irremote_2_2_3/IRremote.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
exit status 1