Go Down

Topic: PinChangeInt library- To attach interrupts to multiple Arduino (Uno/Mega) pins (Read 73855 times) previous topic - next topic

GreyGnome

The EnableInterrupt library is ready for an alpha release, IMHO. See https://github.com/GreyGnome/EnableInterrupt.

The PinChangeInt library is deprecated. I will provide bug fixes for a time, but it's on life support as of today. The new library is easier to use, faster, and more comprehensive. The only advantage to using or supporting the PinChangeInt library is that it's legacy. Because of the functionality built into the new library, it's impossible to make the API the same. So it will probably require some code modifications to use the EnableInterrupt library.

I will open a new thread in this forum for new EnableInterrupt library announcements.

As always, enjoy!

Memedhe

@GreyGnome For some time now I have been using PinChangeInt Library successfully on Arduino Mega 2560.

I wanted to expand my implementation code and make it more Object-Oriented.
I ran into the library you have created ooPinChangeInt:
https://github.com/GreyGnome/ooPinChangeInt

The problem is that when loading the example code, it doesn't seem to find the ByteBuffer.h file. It appears that the ByteBuffer library is not included in the ooPinChangeInt library file.
I did find the ByteBuffer library elsewhere, but it still does not compile and shows the same problem.

Any input regarding this?

AGM1968

Not sure if this helpful, had to update the ByteBuffer.h to match the changes to the ByteBuffer.cpp as of PinChangeInt Version 2.19beta. Added uint8_t  PutString(const char in*); and the extra voids - void putHex(uint8_t theByte);   void putDec(uint8_t number);

Freeman656

Hi,
I'm quite a newby but I tried to use the pinchangeint.h library with my RC receiver and Arduino Uno.
I'm surprised with one thing, maybe someone can explain me.
I took an old post from DuaneB (http://rcarduino.blogspot.fr/2012/04/how-to-read-multiple-rc-channels-draft.html) and tried it and it's working fine, I can get the pulse width of my channel.
Now, if I try using a latest version of the library and from the blog (http://rcarduino.blogspot.fr/2012/11/how-to-read-rc-channels-rcarduinofastlib.html) which is using TCNT1 instead of micros(), I'm getting probably overflow results :

...
1520
1519
1519
1519
34287
1520
1520
...

Is that normal ? How can I fix it ? Just filter it out in the rest of the code or is there any other solution ?

THank you in advance for your answer.

keller

Hello!

I'm working on a project, and am having a ton of multiple definition errors:

Code: [Select]
WARNING: Spurious .github folder in 'Adafruit AHRS' library
libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `__vector_3':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:227: multiple definition of `__vector_3'

sketch\swarm.ino.cpp.o:C:\Users\Thomas\Documents\Arduino\libraries\EnableInterrupt/EnableInterrupt.h:1568: first defined here

libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `SoftwareSerial::read()':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:392: multiple definition of `__vector_4'

sketch\swarm.ino.cpp.o:C:\Users\Thomas\Documents\Arduino\libraries\Adafruit_Sensor-master/Adafruit_Sensor.h:143: first defined here

libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `SoftwareSerial::read()':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial/SoftwareSerial.cpp:392: multiple definition of `__vector_5'

sketch\swarm.ino.cpp.o:C:\Users\Thomas\Documents\Arduino\libraries\Adafruit_Sensor-master/Adafruit_Sensor.h:143: first defined here

C:\Users\Thomas\AppData\Local\Temp\buildc718186c87d4995ee5e3b71c97d7d24e.tmp/core\core.a(WInterrupts.c.o): In function `__vector_1':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WInterrupts.c:340: multiple definition of `__vector_1'

sketch\swarm.ino.cpp.o:C:\Users\Thomas\Documents\Arduino\libraries\Adafruit_Sensor-master/Adafruit_Sensor.h:143: first defined here

C:\Users\Thomas\AppData\Local\Temp\buildc718186c87d4995ee5e3b71c97d7d24e.tmp/core\core.a(WInterrupts.c.o): In function `nothing':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WInterrupts.c:35: multiple definition of `__vector_2'

sketch\swarm.ino.cpp.o:C:\Users\Thomas\Documents\Arduino\libraries\Adafruit_Sensor-master/Adafruit_Sensor.h:143: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling.


How can I get around this? Thanks!

neu-rah

Hi, I have this PCINT library that i'm using for AVR's, due, esp ans possibly can be adapted to other mcu's with a consistent interface (same interface for the multiple boards).

Allows specification of user function per pin

https://github.com/neu-rah/PCINT

It includes a sketch that once compiled on an MCU environment will extract the PCINT info and print out a map line needed to use the library on the new MCU env.

Go Up