Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiles and runs #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

compiles and runs #6

wants to merge 2 commits into from

Conversation

ladyada
Copy link
Member

@ladyada ladyada commented Oct 21, 2023

fixes compile errors and works with TSC2007 now


#ifdef HAVE_TOUCHPAD
Serial.println("Initializing touch screen...");
if (!ts.begin()) {
if (!ts.begin(0x48, &Wire)) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add preproc logic here to call the STMP begin. This worked with local testing:

#ifdef TOUCH_CS
  if (!ts.begin()) {
#else
  if (!ts.begin(0x48, &Wire)) {
#endif

Comment on lines +6 to +10
#ifdef TOUCH_CS
#include <Adafruit_STMPE610.h>
#else // use I2C
#include <Adafruit_TSC2007.h>
#endif

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some Arduino reason, the #define of TOUCH_CS in settings.h is not being seen here. So the logic always #includes the TSCC2007 header and the build fails at link time.

Suggest moving the #define of TOUCH_CS to this file and place immediately above this preproc logic. Can then add a comment in settings.h that this needs to be done for STMP. This worked with local testing.

@bmck202
Copy link

bmck202 commented Mar 16, 2024

sorry guys...this is all clear as mud to old simple over 60 people like me. anyway to get updated files with all the corrections and changes so I can download compile and run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants