Compile error in Workbench, but not Web IDE

I downloaded a couple of sample apps for the Adafruit 2.4" TFT display. I can compile on the Web IDE, but it keeps failing in Workbench. I have deleted all of the example .ino files. Below is the output from Workbench. Suggestions?

> Executing task: make -f '/Users/tom/.particle/toolchains/buildscripts/1.9.2/Makefile' compile-user -s <


:::: COMPILING APPLICATION

Creating /Users/tom/Documents/Particle/Projects-Home/TouchPaint/target/1.4.4/argon/platform_user_ram.ld ...
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawRect(short, short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawFastVLine(short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawFastHLine(short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::fillRect(short, short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::fillScreen(unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::invertDisplay(bool)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::write(unsigned char)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::Adafruit_GFX(short, short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::Adafruit_GFX(short, short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawCircle(short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawCircleHelper(short, short, short, unsigned char, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::fillCircleHelper(short, short, short, unsigned char, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::fillCircle(short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawRoundRect(short, short, short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::fillRoundRect(short, short, short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawTriangle(short, short, short, short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::fillTriangle(short, short, short, short, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawBitmap(short, short, unsigned char const*, short, short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::drawChar(short, short, unsigned char, unsigned short, unsigned short, unsigned char)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::setCursor(short, short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::setTextSize(unsigned char)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::setTextColor(unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::setTextColor(unsigned short, unsigned short)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::setTextWrap(bool)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::getRotation()'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::setRotation(unsigned char)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::width()'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `Adafruit_GFX::height()'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o): In function `Adafruit_GFX::drawLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_mfGFX/src/Adafruit_mfGFX.cpp:230: multiple definition of `vtable for Adafruit_GFX'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
/Users/tom/.particle/toolchains/gcc-arm/5.3.1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/bin/ld: Warning: size of symbol `_ZTV12Adafruit_GFX' changed from 56 in ../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o) to 60 in ../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_mfGFX.o)
collect2: error: ld returned 1 exit status
make[2]: *** [/Users/tom/Documents/Particle/Projects-Home/TouchPaint/target/1.4.4/argon/TouchPaint.elf] Error 1
make[1]: *** [modules/argon/user-part] Error 2
make: *** [compile-user] Error 2
The terminal process terminated with exit code: 2

Press any key to close the terminal.

Multi-definitions are probably caused by two interfering libraries.
You seem to have Adafruit_GFX and Adafruit_mfGFX installed in your project - you need to get rid of one of them.

Which library are you using for your display?

In case I messed up, I delete all of the included library files. I then copied the source from the Web example touchpaintfeatherwing.ino into the src file in Workbench. I looked at the source and attempted to include the 3 specified libraries, but it could not find the Adafruit_STMPE610 library. I found the Adafruit_STMPE610RK version of the library and decided to include it, but it also included the Adafruit_mfGFX library which was not referenced in the src file. Thinking I was making a logical change, I deleted the GFX library and modified the #include to be #include <Adafruit_mfGFX> file and modified the project.properties file to reflect these changes, but I’m still getting the errors (too long to include), but ending with:

/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX_RK/src/Adafruit_GFX_RK.cpp:105: multiple definition of `Adafruit_GFX::setTextWrap(bool)'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX_RK.o): In function `Adafruit_GFX::writeLine(short, short, short, short, unsigned short)':
/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX_RK/src/Adafruit_GFX_RK.cpp:105: multiple definition of `vtable for Adafruit_GFX'
../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o):/Users/tom/Documents/Particle/Projects-Home/TouchPaint/lib/Adafruit_GFX/src/Adafruit_GFX.cpp:420: first defined here
/Users/tom/.particle/toolchains/gcc-arm/5.3.1/bin/../lib/gcc/arm-none-eabi/5.3.1/../../../../arm-none-eabi/bin/ld: Warning: size of symbol `_ZTV12Adafruit_GFX' changed from 60 in ../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX.o) to 88 in ../../../build/target/user/platform-12-m/TouchPaint//libuser.a(Adafruit_GFX_RK.o)
collect2: error: ld returned 1 exit status
make[2]: *** [/Users/tom/Documents/Particle/Projects-Home/TouchPaint/target/1.4.4/argon/TouchPaint.elf] Error 1
make[1]: *** [modules/argon/user-part] Error 2
make: *** [compile-user] Error 2
The terminal process terminated with exit code: 2

Press any key to close the terminal.

You do mention Adafruit_mfGFX and Adafruit_GFX but have you also removed Adafruit_GFX_RK as this is now mentioned in your error log.

As for the reason why @rickkas7 has included another GFX library in his Adafruit_STMPE610RK lib I’d have to defer to him.

Thanks @ScruffR for your thoughts. I won’t waste any more of your time. I was simply trying to determine all the functionality I have in this TFT display and it’s pretty cool. I was able to do all of my testing via the Web IDE and merely wondered why I had so much trouble using Workbench–uncommon from my experience with the same app.

The Adafruit_STMPE610_RK library doesn’t include any other libraries. I don’t include Adafruit_mfGFX in any of my libraries or ports.

name=Adafruit_STMPE610_RK
version=1.0.1
author=Adafruit
maintainer=Adafruit <info@adafruit.com>
sentence=Library for Adafruit STMPE610/811 resistive touch screen controllers. Ported by rickkas7.
paragraph=Install this library in addition to the display library for your hardware. Ported from https://github.com/adafruit/Adafruit_STMPE610 version 1.0.1
category=Display
url=https://github.com/rickkas7/Adafruit_STMPE6110_RK
architectures=*
1 Like

Aaaahhh…installing the Adafruit_ILI9341 library resulted in the Adafruit_mfGFX being installed automatically…

So, my fundamental question is why source copied from the Web IDE and pasted into a source file in the Workbench, followed by including the libraries referenced in the source will compile on the Web IDE, but not in Workbench.

hard to say without looking at the specific project. are you able to share it?

I was using the touchpoint_featherwing.ino example in the ADAFRUITTOUCHSCREENFEATHERWINGRK library via the Web IDE (Build). I can compile it in the web and when using the Workbench, I can also do a cloud compile. However, if I try to do a local compile, I have to first add the libraries listed in the source. It can’t find the Adafruit_STMPE610.h library, so I used the Adafruit_STMPE610RK library. However, no matter what I try, I keep getting version of the errors listed above. The first question is why it can’t find the Adafruit_STMPE610 library. I hope that’s what you meant by “sharing” the project.

Here’s the source for the application:

/***************************************************
  This is our touchscreen painting example for the Adafruit TFT FeatherWing
  ----> http://www.adafruit.com/products/3315

  Check out the links above for our tutorials and wiring diagrams

  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution
 ****************************************************/

#include <SPI.h>
#include <Wire.h>      // this is needed even tho we aren't using it

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library
#include <Adafruit_STMPE610.h>

#ifdef ESP8266
   #define STMPE_CS 16
   #define TFT_CS   0
   #define TFT_DC   15
   #define SD_CS    2
#endif
#ifdef ESP32
   #define STMPE_CS 32
   #define TFT_CS   15
   #define TFT_DC   33
   #define SD_CS    14
#endif
#ifdef TEENSYDUINO
   #define TFT_DC   10
   #define TFT_CS   4
   #define STMPE_CS 3
   #define SD_CS    8
#endif
#ifdef ARDUINO_STM32_FEATHER
   #define TFT_DC   PB4
   #define TFT_CS   PA15
   #define STMPE_CS PC7
   #define SD_CS    PC5
#endif
#ifdef ARDUINO_NRF52832_FEATHER /* BSP 0.6.5 and higher! */
   #define TFT_DC   11
   #define TFT_CS   31
   #define STMPE_CS 30
   #define SD_CS    27
#endif
#if defined(ARDUINO_MAX32620FTHR) || defined(ARDUINO_MAX32630FTHR)
   #define TFT_DC   P5_4
   #define TFT_CS   P5_3
   #define STMPE_CS P3_3
   #define SD_CS    P3_2
#endif
#if defined(PARTICLE)
   #define TFT_DC   D5
   #define TFT_CS   D4
   #define STMPE_CS D3
   #define SD_CS    D2
#endif

// Anything else!
#if defined (__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_FEATHER_M0) || defined (__AVR_ATmega328P__) || \
    defined(ARDUINO_SAMD_ZERO) || defined(__SAMD51__) || defined(__SAM3X8E__) || defined(ARDUINO_NRF52840_FEATHER)
   #define STMPE_CS 6
   #define TFT_CS   9
   #define TFT_DC   10
   #define SD_CS    5
#endif


Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);
Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);


// This is calibration data for the raw touch data to the screen coordinates
#define TS_MINX 3800
#define TS_MAXX 100
#define TS_MINY 100
#define TS_MAXY 3750

// Size of the color selection boxes and the paintbrush size
#define BOXSIZE 40
#define PENRADIUS 3
int oldcolor, currentcolor;

void setup(void) {
  Serial.begin(115200);

  delay(10);
  Serial.println("FeatherWing TFT");
  if (!ts.begin()) {
    Serial.println("Couldn't start touchscreen controller");
    while (1);
  }
  Serial.println("Touchscreen started");
  
  tft.begin();
  tft.fillScreen(ILI9341_BLACK);
  
  // make the color selection boxes
  tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
  tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
  tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
  tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
  tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
  tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
 
  // select the current color 'red'
  tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
  currentcolor = ILI9341_RED;
}

void loop() {
  // Retrieve a point  
  TS_Point p = ts.getPoint();
  
  Serial.print("X = "); Serial.print(p.x);
  Serial.print("\tY = "); Serial.print(p.y);
  Serial.print("\tPressure = "); Serial.println(p.z);  
 
 
  // Scale from ~0->4000 to tft.width using the calibration #'s
  p.x = map(p.x, TS_MINX, TS_MAXX, 0, tft.width());
  p.y = map(p.y, TS_MINY, TS_MAXY, 0, tft.height());

  if (p.y < BOXSIZE) {
     oldcolor = currentcolor;

     if (p.x < BOXSIZE) { 
       currentcolor = ILI9341_RED; 
       tft.drawRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
     } else if (p.x < BOXSIZE*2) {
       currentcolor = ILI9341_YELLOW;
       tft.drawRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
     } else if (p.x < BOXSIZE*3) {
       currentcolor = ILI9341_GREEN;
       tft.drawRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
     } else if (p.x < BOXSIZE*4) {
       currentcolor = ILI9341_CYAN;
       tft.drawRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
     } else if (p.x < BOXSIZE*5) {
       currentcolor = ILI9341_BLUE;
       tft.drawRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
     } else if (p.x < BOXSIZE*6) {
       currentcolor = ILI9341_MAGENTA;
       tft.drawRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_WHITE);
     }

     if (oldcolor != currentcolor) {
        if (oldcolor == ILI9341_RED) 
          tft.fillRect(0, 0, BOXSIZE, BOXSIZE, ILI9341_RED);
        if (oldcolor == ILI9341_YELLOW) 
          tft.fillRect(BOXSIZE, 0, BOXSIZE, BOXSIZE, ILI9341_YELLOW);
        if (oldcolor == ILI9341_GREEN) 
          tft.fillRect(BOXSIZE*2, 0, BOXSIZE, BOXSIZE, ILI9341_GREEN);
        if (oldcolor == ILI9341_CYAN) 
          tft.fillRect(BOXSIZE*3, 0, BOXSIZE, BOXSIZE, ILI9341_CYAN);
        if (oldcolor == ILI9341_BLUE) 
          tft.fillRect(BOXSIZE*4, 0, BOXSIZE, BOXSIZE, ILI9341_BLUE);
        if (oldcolor == ILI9341_MAGENTA) 
          tft.fillRect(BOXSIZE*5, 0, BOXSIZE, BOXSIZE, ILI9341_MAGENTA);
     }
  }

  if (((p.y-PENRADIUS) > 0) && ((p.y+PENRADIUS) < tft.height())) {
    tft.fillCircle(p.x, p.y, PENRADIUS, currentcolor);
  }
}


ah, ok. i’m able to compile using the following steps:

  1. Run the Particle: Create Project command (docs)
  2. Once your new project loads, run the Particle: Install Library command then input AdafruitTouchscreenFeatherWingRK and press <enter>
  3. Copy the contents of ./lib/AdafruitTouchscreenFeatherWingRK/examples/touchpaint_featherwing/touchpaint_featherwing.ino to ./src/<your-project-name>.ino
  4. Run the Particle: Compile application (local) build task (docs)

I’m not sure why you are hitting problems - have you tried running the Particle: Clean application and DeviceOS (local) task?

Beyond that, perhaps compare my project (see .zip below) files and layout with yours?

TouchPaintFeatherwingExample.zip (328.4 KB)

@m_m - So…that worked for me, too. How was I suppose to know that I should simply include the …RK library? Was it due to the fact that the example was in that library listing? Perhaps just another thing that’s not too obvious to me.

Thanks so much for your assistance. I would not have figured that out my myself!

How was I suppose to know

always interested in suggestions on how to make this stuff more intuitive. in the meantime, have you checked out our tutorial videos?

lots more in our youtube channel and of course there’s always the docs

No, I had not viewed that video, but I’ve used numerous libraries in the past and even created and published one for NTC thermistors. What confused me is why the application would compile in the Web IDE and in the cloud via Workbench without issue, but I couldn’t find and install the library for a local compile. Furthermore, it was not obvious to me that I needed to install the …RK library in lieu of the three libraries listed in the application includes. Oh well…mystery solved. I’m not complaining above…simply conveying my confusion.

As always you guys are an amazing resource and have enabled me to do some great things with Particle devices. Thanks!

1 Like