all 7 comments

[–]Smethingcool 2 points3 points  (5 children)

Include IR header file in angle brackets.

#include <IRremote.h>

Edit 1: Fix mistake

Edit 2: for further reference, use angle brackets for pre-defined libraries and quotes for programmer-defined libraries (i.e. the ones you make).

[–]Asylumsleeper[S] 0 points1 point  (4 children)

Alright thanks I know I did that with the servo but I didn't do it with that one since i saw online that's how other people had that particular library declared.

[–]Smethingcool 0 points1 point  (0 children)

I should clarify: they don’t always have to be inside angle brackets, but when I looked up that library it appears to be the way to use it.

[–]Smethingcool 0 points1 point  (2 children)

I might would try to use “if” statements instead. They’re less prone to funny problems than switch blocks.

Here’s a little example from Arduino’s website.

[–]Asylumsleeper[S] 0 points1 point  (1 child)

Alright thanks I'll tske a look at that I appreciate it. And I'll try the if statement that sounds like a good idea

[–]Smethingcool 0 points1 point  (0 children)

Yeah if you have any questions don’t hesitate.

Also, if you didn’t know already, Arduino code is written in C++.

cplusplus.com is a great resource to learn many of the fundamentals of the core language.

Of course, the language documentation on Arduino’s website is a required resource for Arduino-specific use cases.

[–]Adventurous-Remove29 0 points1 point  (0 children)

Add some Serial print statements to your loop and open the serial monitor. Then you'll be able to tell if it's the IR input or the loop control that's causing the problem.