Rei Vilo 695 Posted July 13, 2013 Author Share Posted July 13, 2013 The library for the Kentec 3.5" is close to completion. Thanks to its 8-bit parallel connection, writing to and reading from the screen are much faster! 49 ms only to copy-paste a 64x64 area instead of the 438 ms required by the SPI-connected HY28A. I have still to finalise the touch interface and obviously the documentation... Having the SRAM + EEPROM BoosterPack would be nice. Quote Link to post Share on other sites
reaper7 67 Posted July 13, 2013 Share Posted July 13, 2013 HY28A & ST7735 works great with LCD SCREEN LIBRARY SUITE ! On the photo - one stellaris, one wizfi210 and two displays together in action, measuring the wifi signal strength: ST7735 gauge, HY28A histogram TNX Rei! abecedarian 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted July 13, 2013 Author Share Posted July 13, 2013 @@reaper7 You're welcome Glad to know it works fine. I need to explore the WiFi with one of those WizFi210... abecedarian 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted July 14, 2013 Author Share Posted July 14, 2013 I'm experiencing unexpected difficulties with reading the coordinates from the 4-wire resistive touch-screen of the Kentec 3.5". When moving my finger horizontally, both x and y coordinates change. Same for vertically. Only one coordinate should change. I suspect some initialisation problem. See the specific thread HELP - 4-Wire Resistive Touch-Screen Reading with Energia. Thank you for your help! Quote Link to post Share on other sites
reaper7 67 Posted July 14, 2013 Share Posted July 14, 2013 @@Rei Vilo - two suggestions for additional functionality:- on screen keyboard for screens with touch- drawBitmap from *.h/*.c files or other sources like SD (two bytes per pixel RGB 565) bluehash 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted July 14, 2013 Author Share Posted July 14, 2013 @@reaper7 Do you have the code for the keyboard? Quote Link to post Share on other sites
reaper7 67 Posted July 14, 2013 Share Posted July 14, 2013 I have a ino file for old HY28A lib this is 10x6 squares drawn in loop and tables of chars drawn in the same loop too... I don't know if it will be useful for you: //KEYBOARD #define KBDROWS 5 //number of keyboard rows #define KBDCOLS 10 //number of keyboard cols #define KBDSTEP 32 //distance (in px) between the start of two buttons #define KBDLEFT 2 //absolute distance from the left side of the display #define KBDTOP 48 //absolute distance from the top of the display #define KBDFONTLEFT 4 //absolute distance from the left side of the display to the first letter (eq. 1,q,a,z,<) #define KBDBTNSIZE 28 //button size (without frame) #define KBDFONTSIZE 3 //keyboard font size #define KBDFNCBTNSIZE 60 //function keys h size #define KEY_SPACE 0x20 #define KEY_CLEAR 0x7f #define KEY_ENTER 0x0a #define KEY_EXIT 0xfe #define KEY_SHIFT 0xfd #define KEY_NULL 0xff const char keyboard[51]= "1234567890qwertyuiopasdfghjkl:zxcvbnm,.?<>-+*/=[]'"; const char keyboardshift[51]= "!@#$%^&_()QWERTYUIOPASDFGHJKL:ZXCVBNM<>?{}[]-+\";\\|"; void printquerty() { uint8_t x,y; char onefont[2]; for(y = 0; y < KBDROWS; y++) { for(x = 0; x < KBDCOLS; x++) { myScreen.dRectangle((KBDLEFT+(KBDSTEP*x)), (KBDTOP+(KBDSTEP*y)), KBDBTNSIZE, KBDBTNSIZE, grayColour); if ( SHIFT ) { onefont[0]=keyboardshift[((y*10)+x)]; } else { onefont[0]=keyboard[((y*10)+x)]; } myScreen.gText((KBDLEFT+KBDFONTLEFT+(KBDSTEP*x)), (KBDTOP+KBDFONTLEFT+(KBDSTEP*y)), (String)onefont[0], whiteColour, grayColour, KBDFONTSIZE, KBDFONTSIZE); } } } void printfunckeys() { uint16_t funckeycolor; myScreen.dRectangle(KBDLEFT, (KBDTOP+(KBDSTEP*5)), KBDFNCBTNSIZE, KBDBTNSIZE, grayColour); myScreen.gText((KBDLEFT+(KBDFONTLEFT*4)), (KBDTOP+KBDFONTLEFT+(KBDSTEP*5)), "exit", whiteColour, grayColour, KBDFONTSIZE-2, KBDFONTSIZE); myScreen.dRectangle(KBDLEFT+(KBDSTEP*2), (KBDTOP+(KBDSTEP*5)), KBDFNCBTNSIZE, KBDBTNSIZE, grayColour); myScreen.gText(KBDLEFT+(KBDFONTLEFT*4)+(KBDSTEP*2), (KBDTOP+KBDFONTLEFT+(KBDSTEP*5)), "clear", whiteColour, grayColour, KBDFONTSIZE-2, KBDFONTSIZE); myScreen.dRectangle(KBDLEFT+(KBDSTEP*4), (KBDTOP+(KBDSTEP*5)), KBDFNCBTNSIZE, KBDBTNSIZE, grayColour); myScreen.gText(KBDLEFT+(KBDFONTLEFT*4)+(KBDSTEP*4), (KBDTOP+KBDFONTLEFT+(KBDSTEP*5)), "space", whiteColour, grayColour, KBDFONTSIZE-2, KBDFONTSIZE); myScreen.dRectangle(KBDLEFT+(KBDSTEP*6), (KBDTOP+(KBDSTEP*5)), KBDFNCBTNSIZE, KBDBTNSIZE, grayColour); if ( SHIFT ) { funckeycolor=blueColour; } else { funckeycolor=whiteColour; } myScreen.gText(KBDLEFT+(KBDFONTLEFT*4)+(KBDSTEP*6), (KBDTOP+KBDFONTLEFT+(KBDSTEP*5)), "shift", funckeycolor, grayColour, KBDFONTSIZE-2, KBDFONTSIZE); myScreen.dRectangle(KBDLEFT+(KBDSTEP*8), (KBDTOP+(KBDSTEP*5)), KBDFNCBTNSIZE, KBDBTNSIZE, grayColour); myScreen.gText(KBDLEFT+(KBDFONTLEFT*4)+(KBDSTEP*8), (KBDTOP+KBDFONTLEFT+(KBDSTEP*5)), "enter", whiteColour, grayColour, KBDFONTSIZE-2, KBDFONTSIZE); } void getkey() { int xres, yres; xres=(int)(x-KBDLEFT)/KBDSTEP; //x from myScreen.getTouch(x, y, z) yres=(int)(y-KBDTOP)/KBDSTEP; //y from myScreen.getTouch(x, y, z) if ((xres<KBDCOLS) && (yres<KBDROWS)) { if ( SHIFT ) { pressedkey[0]=keyboardshift[((yres*10)+xres)]; } else { pressedkey[0]=keyboard[((yres*10)+xres)]; } } else if (yres==5) { switch(x) { case KBDLEFT ... (KBDLEFT+KBDFNCBTNSIZE): pressedkey[0]=KEY_EXIT; break; case (KBDLEFT+(KBDSTEP*2)) ... (KBDLEFT+(KBDSTEP*2)+KBDFNCBTNSIZE): pressedkey[0]=KEY_CLEAR; break; case (KBDLEFT+(KBDSTEP*4)) ... (KBDLEFT+(KBDSTEP*4)+KBDFNCBTNSIZE): pressedkey[0]=KEY_SPACE; break; case (KBDLEFT+(KBDSTEP*6)) ... (KBDLEFT+(KBDSTEP*6)+KBDFNCBTNSIZE): pressedkey[0]=KEY_SHIFT; break; case (KBDLEFT+(KBDSTEP*8)) ... (KBDLEFT+(KBDSTEP*8)+KBDFNCBTNSIZE): pressedkey[0]=KEY_ENTER; break; } } else pressedkey[0]=KEY_NULL; } Quote Link to post Share on other sites
Rei Vilo 695 Posted July 14, 2013 Author Share Posted July 14, 2013 Thanks to @@igor, touch issue is solved for the Kentec 3.5" screen. Stay tuned for upcoming release! Quote Link to post Share on other sites
reaper7 67 Posted July 14, 2013 Share Posted July 14, 2013 Keyboard example (screen touch to serial) for LCD_SCREEN_LIBRARY_SUITE: LCD_KEYBOARD.zip Rei Vilo 1 Quote Link to post Share on other sites
Rei Vilo 695 Posted July 14, 2013 Author Share Posted July 14, 2013 Nice Many questions: How to deal with the letters with accents. Most of the European language include many of them. For example, to name a few: In French: àâäæéèêëîïôöœùüû瀜 In Spanish: áäéëíïóöúüñ¿¡ Why not using a smartphone-like keyboard? Some popular smartphone feature four pages, each page with 4 lines and up to 10 keys per line. It saves a lot of space. How to deal with Backspace? Quote Link to post Share on other sites
reaper7 67 Posted July 14, 2013 Share Posted July 14, 2013 This is only old example / concept, who used my old Terminal6x8 chars(all) without regional Backspace realized by "clear" button on bottom line(KEY_CLEAR), in my case simply move cursor back (1 letter width), not included in example above. Smartphone-like keyboard? I use http://www.etaoikeyboard.com -> one line with 5 multi-keys BTW - I never thought about it, I just played with this a hour or two I think that You choose something suitable for most users P.S. in Polish: ąĄćĆęĘłŁńŃóÓśŚźŹżŻ Quote Link to post Share on other sites
Rei Vilo 695 Posted July 14, 2013 Author Share Posted July 14, 2013 P.S. in Polish: ąĄćĆęĘłŁńŃóÓśŚźŹżŻ You're the champions! Quote Link to post Share on other sites
Rei Vilo 695 Posted July 14, 2013 Author Share Posted July 14, 2013 New issue: /// @bug trim() doesn't work on Stellaris /// @see http://github.com/energia/Energia/issues/257 Now fixed with a manual function: uint8_t i = 0; uint8_t j = _text.length(); while ((_text.charAt(i)==' ') && (i<j)) { i++; } while ((_text.charAt(j)==' ') && (j>0)) { j--; } if (j>i) _text = _text.substring(i, j); else _text = ""; Quote Link to post Share on other sites
Rei Vilo 695 Posted July 15, 2013 Author Share Posted July 15, 2013 The library for the Kentec 3.5 BoosterPack is available here The library wouldn't have been possible without the help of the forum and its members. Many thanks to them! As a colourful example, I've included a tool for drawing. This is a cross-post with the 43oh forum. Quote Link to post Share on other sites
Rei Vilo 695 Posted July 24, 2013 Author Share Posted July 24, 2013 @@abecedarian, yes Ideally a in-between BoosterPack with room for 2x 1Mb fast SRAM for caching enough EEPROM for fonts SD-card or uSD-card slot All this on one single hardware SPI bus with 3 CS, and ideally with jumpers to select the SPI bus among the 4 of the Launchpad Stellaris... Well, back to the 8-bit parallel Kentec 3.5" screen... I posted a Call for Design - SD-Card + EEPROM + SRAM BoosterPack for Stellaris LaunchPad and also at the sister 43oh website. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.