#include <IRremote.h>
int recvPin = 2;
IRrecv irrecv(recvPin);
void setup ()
{
Serial.begin(9600); // Status message will be sent to PC at 9680 baud
irrecv.enableIRIn(); // Start the receiver
}
// Display IR code
//
void ircode (decode_results *results){
if (results->decode_type == PANASONIC) {
Serial.print(results->address, HEX);
Serial.print(":");
}
}
THIS IS MY CODE
Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino Uno"
C:\Users\POORANI\AppData\Local\Temp\ccB9q6fb.ltrans0.ltrans.o: In function `main':
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.49.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for "IRremote.h"
Used: C:\Users\POORANI\Documents\Arduino\libraries\IRremote
Not used: C:\Users\POORANI\Documents\Arduino\libraries\IRremote-3.3.0
Not used: C:\Users\POORANI\Documents\Arduino\libraries\arduino_635252
exit status 1
Error compiling for board Arduino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
THIS IS MY ERROR
CAN ANYONE HELP ME WITH THIS PROJECT FOR AN IR HEX CODE RECIVER
Check out this thread:
how do i deal with multiple libraries installed? - Using Arduino / Programming Questions - Arduino Forum
Read it carefully, I don't think the other user got the full benefit of the instructions.
Hi, @kanishk_developer
Welcome to the forum.
Please read the post at the start of any forum , entitled "How to use this Forum".
Hello,
Welcome to the Arduino Forum.
This guide explains how to get the best out of this forum. Please read and follow the instructions below.
Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is frustrating for you and frustrating for us.
The people who try to help with your pro…
It will show how to post your code in a scrolling window.
Thanks for posting your error message, it helps a lot.
Tom...
kanishk_developer:
C:\Users\POORANI\AppData\Local\Temp\ccB9q6fb.ltrans0.ltrans.o: In function `main':
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.49.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/main.cpp:46: undefined reference to `loop'
Seems like you have not implemented the lop function:
...
void loop()
{
// add require code here.
}
...
I think you meant:
void loop()
{
if (ircode (decode_results *results)
{
if (results->decode_type == PANASONIC)
{
Serial.print(results->address, HEX);
Serial.print(":");
}
else
{
Serial.println("Not PANASONIC.");
}
}
system
Closed
November 29, 2021, 12:56pm
6
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.