PCintPort

I am compiler errors trying to compile Pin ChangeIntExample on the PCintPort:: instruction. I have downloaded the latest and previous libraries with same compiler error. Help!

Hey there it is you have an error in line 6.
How do I know, it's because I am psychic. If I am wrong you will have to post the code so non psychic members can try and track it down.

Code is the PinChangeintExample right from the Arquino web site

Well post a link to it, or do you not have the common curtsy and expect other people to do all the work.

EdSteiner:
Code is the PinChangeintExample right from the Arquino web site

Bummer

/*
Copyright 2011 Lex.V.Talionis at gmail
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*/
#include <PinChangeInt.h>
#include <PinChangeIntConfig.h>

#define PIN 15 // the pin we are interested in
volatile byte burp=0; // a counter to see how many times the pin has changed
byte cmd=0; // a place to put our serial data

void setup() {
Serial.begin(9600);
Serial.print("PinChangeInt test on pin ");
Serial.print(PIN);
Serial.println();
pinMode(PIN, INPUT); //set the pin to input
digitalWrite(PIN, HIGH); //use the internal pullup resistor
PCintPort::attachInterrupt(PIN, burpcount,RISING); // attach a PinChange Interrupt to our pin on the rising edge
// (RISING, FALLING and CHANGE all work with this library)
// and execute the function burpcount when that pin changes
}

void loop() {
cmd=Serial.read();
if (cmd=='p')
{
Serial.print("burpcount:\t");
Serial.println(burp, DEC);
}
cmd=0;
}

void burpcount()
{
burp++;
}

This is parallel to an issue being discussed in the Google Code group here:

http://code.google.com/p/arduino-pinchangeint/issues/detail?id=3

The problem seems to be a shift in the naming of a register, portInputRegister having been at some point renamed portInputReg. One commenter suggests conditional compilaton based on macro ARDUINO.

From comment #9:

#if defined(ARDUINO) && ARDUINO >= 100
portInputReg(*portInputRegister(index + 2)),
#else
portInputReg(*portInputReg(index + 2)),
#endif

I'm having a tough time tracking down references to this macro and it's use... case insensitive searches aren't likely to have the relevant topic as top item! I note that the same macro is used to decide which hardware defining header file to include: from PinChangeInt.h

.
.

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#ifndef Pins_Arduino_h
#include "pins_arduino.h"
#endif
#endif
.
.

If anyone can point me to a thread that details the purpose of this macro, I'd be grateful.

Cheers,
-r

Well for future pleas use the #icon when posting code, and include links to any non standard libraries you use.
Any way I tracked down the library files and put them into a folder and placed it in the libraries folder, then:-

Yes I can't compile it under 1.0 or 0023.

What sort of compiler message do you get?

If you haven't got the library installed correctly it will complain about PCintPort:: not naming a type.
If you have got it installed correctly you will get a complaint about:-

In file included from PinChange.cpp:5:
/Users/............./libraries/PinChangeInt/PinChangeInt.h: In constructor 'PCintPort::PCintPort(int, volatile uint8_t&)':
/Users/............./libraries/PinChangeInt/PinChangeInt.h:80: error: 'NULL' was not declared in this scope
/Users/............./libraries/PinChangeInt/PinChangeInt.h: In constructor 'PCintPort::PCintPin::PCintPin()':
/Users/............./libraries/PinChangeInt/PinChangeInt.h:93: error: 'NULL' was not declared in this scope

So it looks like a duff library, best get in touch with the author

I agree it is a library problem. Still could use a solution or work around

Depends on what you want to do. There is an example of using the pin change interrupt pins with out all this huge library in my project:-
http://www.thebox.myzen.co.uk/Hardware/Crazy_People.html

When libraries fail you can always do it properly. The data sheet is great for showing you what you need to do.