TTP226 module touch panel serial mode library for Mysensors?
-
Re: How To: Make a Simple/Cheap Scene Controller (with video)
Do we have any serial mode library?
-
Re: How To: Make a Simple/Cheap Scene Controller (with video)
Do we have any serial mode library?
-
@AWI I need to use the Serial Mode ( 2 pins ) in TTP226 module instead of Direct Mode which requires ( 9 pins) on Arduino with Interrupt enabled on 8 inputs. Hence the request for the Serial Mode TTP226 library
@vikasjee sorry I forgot to attach the link to the thread where the serial interface is used. This piece of code is sufficient:
// fetch serial data, store in keyState int fetchData(){ digitalWrite(SCL_pin, LOW); // get first bit delayMicroseconds(100); // allow for stable input digitalWrite(SCL_pin, HIGH); for(int i = 0; i < keyboardSize; i++){ // read all keys keyState[i] = (digitalRead(SDA_pin) == LOW) ; // set key if pressed digitalWrite(SCL_pin, LOW); // get first bit delayMicroseconds(100); // allow for stable input digitalWrite(SCL_pin, HIGH); delayMicroseconds(100); } } -
@vikasjee sorry I forgot to attach the link to the thread where the serial interface is used. This piece of code is sufficient:
// fetch serial data, store in keyState int fetchData(){ digitalWrite(SCL_pin, LOW); // get first bit delayMicroseconds(100); // allow for stable input digitalWrite(SCL_pin, HIGH); for(int i = 0; i < keyboardSize; i++){ // read all keys keyState[i] = (digitalRead(SDA_pin) == LOW) ; // set key if pressed digitalWrite(SCL_pin, LOW); // get first bit delayMicroseconds(100); // allow for stable input digitalWrite(SCL_pin, HIGH); delayMicroseconds(100); } }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login