Post topics, source code that relate to the Arduino Platform

User avatar
By bram
#32679 Hello,

I am working on a project that needs the CapacitiveSensor library. But if I try to upload the code to the board I get the following error:

Code: Select allArduino: 1.6.5 (Windows 10), Board: "Adafruit HUZZAH ESP8266, 80 MHz, 115200"

Build options changed, rebuilding all

In file included from capSensorSmall.ino:1:0:
C:\Users\Bram\Documents\Arduino\libraries\CapacitiveSensor/CapacitiveSensor.h:97:2: error: 'IO_REG_TYPE' does not name a type
  IO_REG_TYPE sBit;   // send pin's ports and bitmask
  ^
C:\Users\Bram\Documents\Arduino\libraries\CapacitiveSensor/CapacitiveSensor.h:98:11: error: 'IO_REG_TYPE' does not name a type
  volatile IO_REG_TYPE *sReg;
           ^
C:\Users\Bram\Documents\Arduino\libraries\CapacitiveSensor/CapacitiveSensor.h:99:2: error: 'IO_REG_TYPE' does not name a type
  IO_REG_TYPE rBit;    // receive pin's ports and bitmask
  ^
C:\Users\Bram\Documents\Arduino\libraries\CapacitiveSensor/CapacitiveSensor.h:100:11: error: 'IO_REG_TYPE' does not name a type
  volatile IO_REG_TYPE *rReg;
           ^
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
User avatar
By martinayotte
#33282 The original link is for the version v4, which doesn't support ESP, but it is mentioned that a newer version v5 is hosted there :
https://github.com/PaulStoffregen/CapacitiveSensor
In this v5 version, we can clearly see that ESP has been added in this commit on Apr 25 :
https://github.com/PaulStoffregen/Capac ... a398f5f030