I am working on a project where I use an arduino uno in the loop with a rc receiver feeding information into it, then the uno is sending information into an APM 2.5 autopilot to control a drone.
The first approach i was using involved code that used pulseIn to read the pwm from the receiver and it worked but was very sloppy.
So we switched over to interrupts and I used some example code to read the rc controller and the readings were beautiful.
The next step was I wanted to read multiple channels and be able to control the drone again using my rc controller going through the uno. I found this project and it looked good I just needed to make some small tweaks for my application.
The problem I am having is this uses a library and I have downloaded and installed the proper library, but it’s not working. I try to compile and i get " ‘PCintPort’ has not been declared ". I’ve also noticed that when I try to put the library in the code with the drop down menu it just puts a blank space in there instead. I tested other libraries and they will put in the lines of code in properly (ex. #include <EEPROM.h>).
So does anyone have any idea what is going on here? I am very confused, I’ve tried using v1.05, v1.03, and 1.57beta just to see if there is a problem with the version of IDE. Deleted the library and installed different versions. I’ve even tried it on a different computer. I’m at a loss.
An update and a bump I have found a few people that can compile this code but every computer I try to do this on it will not work. I have done just about everything imaginable to clean up my computer to get rid of anything that might be interfering except a complete wipe since I need an external to back up some things. Anyone know of any known programs that interfere with the Arduino IDE or have been known to if they start to corrupt?
DuaneB has just made some changes 5 minuts ago. Try to download it again
Thanks for the the suggestion. I tried the new library and sadly it did not work. This is very frustrating to say the least.
Where did you place the library and did you name the folder right?
Since I’ve tried multiple IDE’s I’ve had to do several approaches. On the new ones I just use the load feature after I change the name to pinchangeint since it does not like the illegal characters with the version numbering in the zip file. In the old versions of the IDE I just put it in documents\arduino\libraries after unzipping it.
But no matter what version of the library I’ve downloaded when I click on it in the drop down menu it just puts a blank space in my code instead of the #include <PinChangeInt.h> any other libary I have will input this instead of a blank line.
The files should be in a folder called PinChangeInt (same name as the .h file) in your library folder
The Q&D method to get the pinChange stuff to work is to put the .h in with your sketch.
IF you are needing to call it from a file other than your .ino file you need to add…
to the your file that has the #include in it. Once I figured out that bit, I was able to put it in my lib folder and make it work. This way the IDE can put it in your sketch, as it wants, and you can put it where you need it in other files.
Hope this helps