PCF8574.h problem

Hallo,

I tried get back to arduino after a while but I’ve encounter fallowing error:

In file included from C:\Programy\Arduino\libraries\PCF8574\PCF8574.cpp:22:0:

C:\Programy\Arduino\libraries\PCF8574\PCint.h:3:50: error: ‘PCMSK1’ was not declared in this scope

volatile uint8_t *port_to_pcmask = { &PCMSK0, &PCMSK1, &PCMSK2 };

^

C:\Programy\Arduino\libraries\PCF8574\PCint.h:3:59: error: ‘PCMSK2’ was not declared in this scope

volatile uint8_t *port_to_pcmask = { &PCMSK0, &PCMSK1, &PCMSK2 };

^

exit status 1

I’ve added PCF library which I used to use (you can see it in the attachments). I use Arduino Leonardo and Arduino 1.81. I have no idea why it doesn’t work if it used to work.

PCF8574.zip (19.5 KB)

Not much help as I can't reproduce the problem; the example compiles for both Uno and Leonardo after removing the undefined expander.toggle function. IDE 1.6.7 though.

Have you selected the correct board under tools -> board?

sterretje:
Not much help as I can’t reproduce the problem; the example compiles for both Uno and Leonardo after removing the undefined expander.toggle function. IDE 1.6.7 though.

Have you selected the correct board under tools → board?

Yup.

I tried other PFC library and it works… Well, almost. When I add PCF8574 expander(0x20); line, LCD starts displaying undefined symbols. No idea why.

Code looks like this:

#include “PCF8574.h”
#include <LiquidCrystal.h>
#include <Wire.h>
#include <DallasTemperature.h>

#define ONE_WIRE_BUS 8
#define TEMPERATURE_PRECISION 9

OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
DeviceAddress tempDeviceAddress;
PCF8574 expander(0x20);
[…]

At least expander works.