Featherwing Keyboard + Huzzah32 Nightmares

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
lars2893
 
Posts: 2
Joined: Mon Jan 28, 2013 3:31 am

Featherwing Keyboard + Huzzah32 Nightmares

Post by lars2893 »

Hey friends, so I've been toiling over getting the demo code for the Keyboard Feathering (https://www.adafruit.com/product/4818) working on a Huzzah32. I have the TFT display working and the keyboard updates the screen; however, no matter what I try I cannot get the touch screen to register any events. I have reduced the script down to just bare necessities and have tried every constructor and troubleshooting step I can find but I am at a loss. I'm also a little worried because the TFT arrived with no adhesive to the board so it was dangling by the flex cable and I'm worried there may have been some damage.

Here is some of the example code (note the pins have been updated from the samples to match the Huzzah32):

Code: Select all

#include <SPI.h>
#include <Wire.h>

#include "Adafruit_STMPE610.h"

// Pick one of three wiring options below!

// Option #1 - uses I2C, connect to hardware I2C port only!
// SCL to I2C clock (#A5 on Uno) and SDA to I2C data (#A4 on Uno)
// tie MODE to GND and POWER CYCLE (there is no reset pin)
//Adafruit_STMPE610 touch = Adafruit_STMPE610();

// Option #2 - use hardware SPI, connect to hardware SPI port only!
// SDI to MOSI, SDO to MISO, and SCL to SPI CLOCK
// on Arduino Uno, that's 11, 12 and 13 respectively
// Then pick a CS pin, any pin is OK but we suggest #10 on an Uno
// tie MODE to 3.3V and POWER CYCLE the STMPE610 (there is no reset pin)
#define STMPE_CS 32
#define STMPE_SDO 19 // SPI MISO
#define STMPE_SDI 18 // SPI MOSI
#define STMPE_SCK 5 // SPI CLOCK pin
//Adafruit_STMPE610 touch = Adafruit_STMPE610(STMPE_CS);

// Option #3 - use software SPI, connect to *any* 4 I/O pins!
// define the following pins to whatever 4 you want and wire up!
// Tie MODE to 3.3V and POWER CYCLE the STMPE610 (there is no reset pin)
Adafruit_STMPE610 touch = Adafruit_STMPE610(STMPE_CS, STMPE_SDI, STMPE_SDO, STMPE_SCK);

/******************/

void setup() { 
  Serial.begin(9600);
  Serial.println("Adafruit STMPE610 example");
  Serial.flush();

  // if using hardware SPI on an Uno #10 must be an output, remove line
  // if using software SPI or I2C

  // If using I2C you can select the I2C address (there are two options) by calling
  // touch.begin(0x41), the default, or touch.begin(0x44) if A0 is tied to 3.3V
  // If no address is passed, 0x41 is used
  delay(500);
  if (! touch.begin()) {
    Serial.println("STMPE not found!");
    while(1);
  }
  Serial.println("Waiting for touch sense");
}
I have tried with or without defining the CLK, MISO, MISI pins, with or without an entry delay, with different versions of the STMPE library but no matter what I do the

Code: Select all

touch.begin()
function always returns 0 implying the initialization is failing. Would appreciate any help on how to proceed!

User avatar
adafruit_support_carter
 
Posts: 29157
Joined: Tue Nov 29, 2016 2:45 pm

Re: Featherwing Keyboard + Huzzah32 Nightmares

Post by adafruit_support_carter »

The TFT display and touch overlay both use SPI. So you need to make sure to manage the chip selects for both even if you aren't using them.

Have you tried the touchpaint example here? Changing pins as needed for the Huzzah32:
https://github.com/arturo182/keyboard_f ... hpaint.ino

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”