Jump to content
Sign in to follow this  
dubnet

Testing the Noritake 3x4 glass touchpanel

Recommended Posts

Decided to try out the glass touchpanel that Noritake so graciously sent to me a while back (see http://forum.43oh.com/topic/5167-noritake-capacitive-touch-keypad-sample-offer/ ).  Used Energia to talk to the panel via I2C and was pretty pleased with the overall performance of the panel.  I used the numeric underlay that was one of the included paper templates. The key mapping codes weren't intuitive so hopefully this can save some time if you decide to put one of these panels into play.

 

Test setup (please forgive the phone camera picture quality):

 

post-183-0-01107700-1402964774_thumb.jpg

#include <Wire.h>

void setup()
{
  Wire.begin();                
  Serial.begin(9600);          // start serial communication at 9600bps
  pinMode(P2_3, INPUT);
}

int reg3 = 0;                  // setup variable for Noritake key press status register 3
int reg4 = 0;                  // setup variable for Noritake key press status register 4

void loop()
{
  if (digitalRead(P2_3) == LOW)        // check if CHANGE line from touch controller has sensed a key press
    {
    Wire.beginTransmission(28);        // Initiate I2C to touch controller PC at address 0x28
    Wire.write(byte(0x03));            // sets register pointer to read from register 3 (0x03)
    Wire.endTransmission();            // 

    Wire.requestFrom(28, 2);           // request 2 bytes from slave device at 0x28

    if(2 <= Wire.available())          // if two bytes were received
      {
      reg3 = Wire.read();              // receive byte from register 3
      reg4 = Wire.read();              // receive byte from register 4
      if (reg3 == 8)                   // Test values to see which key was pressed and print translated result to the screen
        {
        Serial.println("Keypress = 7");   
        }
        else if (reg3 == 4)
        {
        Serial.println("Keypress = 8");   
        }
        else if (reg3 == 2)
        {
        Serial.println("Keypress = 9");   
        }
        else if (reg3 == 32)
        {
        Serial.println("Keypress = 4");   
        }
        else if (reg3 == 16)
        {
        Serial.println("Keypress = 5");   
        }
        else if (reg3 == 1)
        {
        Serial.println("Keypress = 6");   
        }
        else if (reg3 == 64)
        {
        Serial.println("Keypress = 1");   
        }
        else if (reg3 == 128)
        {
        Serial.println("Keypress = 2");   
        }
        else if (reg4 == 8)
        {
        Serial.println("Keypress = 3");   
        }
        else if (reg4 == 1)
        {
        Serial.println("Keypress = *");   
        }
        else if (reg4 == 2)
        {
        Serial.println("Keypress = 0");   
        }
        else if (reg4 == 4)
        {
        Serial.println("Keypress = #");   
        }
      }
delay(200);                  // delay to prevent multiple print outs of the data to the screen
    }
}

Here is the terminal output when a familar three key sequence is entered. :smile:

 

Keypress = 4
Keypress = 3
Keypress = 0

Share this post


Link to post
Share on other sites

@bluehash  That is a nice offer.  This touchpanel is a really nice alternative to a mechanical keypad.

 

I tested the panel becasue I have a project where I have been struggling to come up with good user interface. Also looking at putting LEDs behind the template to indicate which button is currently active.

Share this post


Link to post
Share on other sites

@bluehash  That is a nice offer.  This touchpanel is a really nice alternative to a mechanical keypad.

 

I tested the panel becasue I have a project where I have been struggling to come up with good user interface. Also looking at putting LEDs behind the template to indicate which button is currently active.

Ok..  would love to see pictures once you are done.

 

@@bluehash Unfortunately I don't have 100, but I would take one kit if you need to clean your desk one day ;-)

@@yosh I can send it to you provided you detail your project here and what you are planning to do with it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...