How do i run arduino sketches with 3th party library (CapacitiveSensor) on raspberry pi 3b

i am using way (How to Run Arduino Code & Programs on Raspberry Pi) to run the Arduino code on the Raspberry Pi, it works with out 3th party library. But when i use the library CapacitiveSensor, the error comes.

Does anynody know how do i slove the problem or how do i excute the Arduino code on the Raspberry Pi correctly?

C:\Program Files (x86)\Arduino\libraries\CapacitiveSensor-master/CapacitiveSensor.h:428:2: error: 'IO_REG_TYPE' does not name a type
IO_REG_TYPE sBit; // send pin's ports and bitmask
^~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\CapacitiveSensor-master/CapacitiveSensor.h:429:11: error: 'IO_REG_TYPE' does not name a type
volatile IO_REG_TYPE *sReg;
^~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\CapacitiveSensor-master/CapacitiveSensor.h:430:2: error: 'IO_REG_TYPE' does not name a type
IO_REG_TYPE rBit; // receive pin's ports and bitmask
^~~~~~~~~~~
C:\Program Files (x86)\Arduino\libraries\CapacitiveSensor-master/CapacitiveSensor.h:431:11: error: 'IO_REG_TYPE' does not name a type
volatile IO_REG_TYPE *rReg;
^~~~~~~~~~~
exit status 1
Fehler beim Kompilieren für das Board RaspberryPI B+/2.

You probably need a library written for the pi. Most libraries have information on what boards they work with.

Otherwise you will need to go through the code and see where anything conflicts with the environment you are working in and change it

Welcome to the forum

Thanks, i will check the library.
I think i need to write a library for Rasp Pi....which is a lot of work. :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.