Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. TTP226 module touch panel serial mode library for Mysensors?

TTP226 module touch panel serial mode library for Mysensors?

Scheduled Pinned Locked Moved General Discussion
ttp2268 oeysserial modetouch module
5 Posts 2 Posters 2.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vikasjee
    wrote on last edited by
    #1

    Re: How To: Make a Simple/Cheap Scene Controller (with video)

    Do we have any serial mode library?

    AWIA 1 Reply Last reply
    0
    • V vikasjee

      Re: How To: Make a Simple/Cheap Scene Controller (with video)

      Do we have any serial mode library?

      AWIA Offline
      AWIA Offline
      AWI
      Hero Member
      wrote on last edited by
      #2

      @vikasjee no need for a library there. The thread contains an example for using the TTP226.

      V 1 Reply Last reply
      0
      • AWIA AWI

        @vikasjee no need for a library there. The thread contains an example for using the TTP226.

        V Offline
        V Offline
        vikasjee
        wrote on last edited by
        #3

        @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

        AWIA 1 Reply Last reply
        0
        • V vikasjee

          @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

          AWIA Offline
          AWIA Offline
          AWI
          Hero Member
          wrote on last edited by
          #4

          @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);
              }
          }
          
          V 1 Reply Last reply
          2
          • AWIA AWI

            @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);
                }
            }
            
            V Offline
            V Offline
            vikasjee
            wrote on last edited by
            #5

            @AWI Thanks for the piece of code. Now i can see where i was wrong! Let me run it... this seems to be missing the interrupt part though. I will try using DV on Int2...

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            22

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular