Compilation seems to fail when using the wonderful CapSense library.
Is there any port available for Arduino Zero?
Compilation seems to fail when using the wonderful CapSense library.
Is there any port available for Arduino Zero?
Maybe you're using ancient code. Long ago, it was renamed to CapacitiveSensor.
I know CapacitiveSensor compiles, but (probably) doesn't work on Zero, because I'm the maintainer of that library. See this in the code.
#elif defined(__SAMD21G18A__)
// runs extremely slow/unreliable on Arduino Zero - help wanted....
#define PIN_TO_BASEREG(pin) portModeRegister(digitalPinToPort(pin))
#define PIN_TO_BITMASK(pin) (digitalPinToBitMask(pin))
#define IO_REG_TYPE uint32_t
#define IO_REG_ASM
#define DIRECT_READ(base, mask) (((*((base)+8)) & (mask)) ? 1 : 0)
#define DIRECT_MODE_INPUT(base, mask) ((*((base)+1)) = (mask))
#define DIRECT_MODE_OUTPUT(base, mask) ((*((base)+2)) = (mask))
#define DIRECT_WRITE_LOW(base, mask) ((*((base)+5)) = (mask))
#define DIRECT_WRITE_HIGH(base, mask) ((*((base)+6)) = (mask))
If anyone can figure out (and solve) why this isn't working on Zero, please submit a pull request on github.
Hi,
I know this is an old thread but I have found a library made by Adafruit which is compatible with ARM
devices (I tried it on a feather m0 express and responded well). it's called Adafruit_FreeTouch.
Is there any way to mix both? I kinda like the CapacitiveSensor library better.