Jump to content


Photo

2.2" Color LCD Booster Pack with Touch


  • Please log in to reply
127 replies to this topic

#121 Rei Vilo

Rei Vilo

    Level 4

  • Members
  • 1,218 posts
  • LocationFrance

Posted 01 April 2014 - 09:59 PM

v4 BoosterPacks use new display type, which has Y axis inverted when compared to the old one.

@username, @Rei Vilo, could you suggest changes to make this work?

 

I'm not sure to understand what "Y axis inverted" means.

 

The library supports all the four orientations with (0,0) always on the top left corner of the screen for each of the 4 orientations.



#122 StupidPig

StupidPig

    Member

  • Members
  • PipPip
  • 15 posts

Posted 01 April 2014 - 11:18 PM

I'm not sure to understand what "Y axis inverted" means.

 

The library supports all the four orientations with (0,0) always on the top left corner of the screen for each of the 4 orientations.

May be the energia lib I got is an order version, as it doesn't include the setOrientation function, and that's why I added myself, plus making the getTouch() function aware of the orientation setting.

 

For the "Y axis inverted", it just means when you touch the top, the Y result from getTouch() call is LCD_HEIGHT, and 0 when you touch the bottom (0,0 at bottom left corner). I tried both the energia lib, and the CCS one from Username, and both yield the same result. So it is very likely the v4 board got that part changed.



#123 PTB

PTB

    Level 1

  • Members
  • 72 posts

Posted 03 April 2014 - 08:27 AM

The earlier versions of Robs board have the opposite direction for the touch panel.

I had to change some code to flip the y direction and tweak the calibration.
The old code works great with the old screens.
But the new screens need a few lines changed.

I'll dig out what i did just to throw it into the mix.

These are fantastic boosterpacks. Absolutely love 'em.

Cheers

PTB
  • GeekDoc and RobG like this

#124 PTB

PTB

    Level 1

  • Members
  • 72 posts

Posted 03 April 2014 - 10:29 AM

    if (z>TOUCH_TRIM) {
//        x0 = check(x0, 311, 1632);//Old Style Screens from RobG (Green PCB)
//        y0 = check(y0, 195, 1859);//Old Style Screens from RobG (Green PCB)
//        
//        x = map(x0, 311, 1632, 0, LCD_WIDTH);//Old Style Screens from RobG (Green PCB)
//        y = map(y0, 195, 1859, LCD_HEIGHT, 0);//Old Style Screens from RobG (Green PCB)


        x0 = check(x0, 156, 1874);              //Edited by PTB New Style Screens from RobG (Red PCB)
        y0 = check(y0, 120, 1859);              //Edited by PTB New Style Screens from RobG (Red PCB)
        x = map(x0, 156, 1874, 0, LCD_WIDTH);   //Edited by PTB New Style Screens from RobG (Red PCB)
        y = map(y0, 120, 1859, 0, LCD_HEIGHT);  //Edited by PTB New Style Screens from RobG (Red PCB)

        
        return true;
    }
    else {
        return false;
    }
}

Here's the 4 lines of code change (to the old code) at the bottom of LCD_Touch.cpp I did to get touch working for me on the newer screens


  • GeekDoc and RobG like this

#125 StupidPig

StupidPig

    Member

  • Members
  • PipPip
  • 15 posts

Posted 03 April 2014 - 08:54 PM

@PTB, Yeah this screen is great. It is strange that I just use the same (195,1859) range as the original lib y axis range for the x axis, and it works great, let me try the (156,1874) range tonight. And I think I just take it one step further by supporting the touch with all 4 screen orientation.

 

BTW, here is what I used the screen with...... So many threads about making the MSP430 reflow oven kit, but almost none of them available for purchase, so I just got to make my own. :)

 

1623345_765546480131143_917271151_n.jpg


  • bluehash, GeekDoc, RobG and 1 other like this

#126 TDHofstetter

TDHofstetter

    Noob Class

  • Members
  • 5 posts
  • LocationBradford, VT

Posted 18 December 2016 - 12:59 AM

I realize I'm a little late on the scene... whatever happened to this project? The 43oh says they're out of stock, and your Tindie store doesn't seem to list them. I'd like to have one, possibly several.



#127 RobG

RobG

    Level 5

  • Members
  • 2,999 posts
  • LocationCary, NC, US


Posted 18 December 2016 - 02:46 AM

Hi,

due to problems with suppliers, I have decided not to make them anymore. I only have LCDs without touch panel now.



#128 TDHofstetter

TDHofstetter

    Noob Class

  • Members
  • 5 posts
  • LocationBradford, VT

Posted 23 December 2016 - 04:15 AM

Ah. Ok. I have one of your non-touch 2.2" displays (with μSD & no onboard SRAM); it's nicely built & does the job very well. A little slow, but that's because it's serial (and we really can't afford parallel with most MSP430s, we just can't spare enough pins).

 

If I could find a decent 2.2" resistive sensor overlay that I knew would fit my display, I'd add it to what I have & be done with it.

 

BTW... good to meet you, Rob.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users