 the show it's the Halloween episode of JP's product pick of the week thanks everyone for stopping by and I hope you dressed up in a costume that is not quite so last-minute as mine or Lars's for that matter my Viking Lars is a creepy baby what are you tell us in the chat I'd love to know and speaking of the chat hello to our viewers over in YouTube chat hey oh gee think stir and tackle the world welcome thanks for stopping by if you're wondering where the chat is if you're over on the Facebook or the Twitch or the Periscope or the LinkedIn learning one of those other places and there seems to be no one in the chat then head on over to our discord you can get right there that's the discord right there head to Adafru.it discord and you can jump right onto our server and then you'll want to look for that live broadcast chat channel also apologies to Vikings and our northern friends I know we have some people in the chat sometime from I think Sweden and Finland and some other places I know there were probably no horns on these helmets but I grabbed it out of a closet in the house it was very last second what are y'all wearing what are your costumes what do you got going on I will send you right here if you want to get a jump start on this week's product pick head to this URL right there or to that QR code this show is happening inside of the product page and you can go ahead and get it for half price during the show right now no coupon code needed just throw it in your cart it's a great deal buy it before the show is over or even sooner if you're worried about it selling out because the price will go back up at the end of the show so head on over to that URL but before I tell you any more about this week's product pick let's jump back in time just a little bit to Lady Aida telling us all about this take away Lady Aida Oh it's our TFT shield reborn like Phoenix from the flames this is one of the oldest boards that did not make it through COVID slash part shortages slash TFT pricing inflation it's been a journey so you know we redesigned this completely it's in the same size and pinout as the original but we have updated the touchscreen controller it used to be the STM PE 811 or 610 that got discontinued so now it's the TSC 2007 which is a iSquad C sensor so in the back you can see it says TSC 2007 we also added a STEM IQT port because hey you know we like having this on there it makes it easy to add sensors and devices as needed we made the reset button right angle we made the defaults for the TFT connection be through the ICSP header the two by three header not the pins 10 11 12 13 because a lot of people using Arduino shapeboards but they're not literally in Arduino anymore and it's also like a cool 804 black and we connected up the touchscreen IRQ pin and we've got Arduino and circuit python libraries already for this and I have it showing uh not a little demo yeah on the um I have it on the metro in l7 which you get free with your order when you buy a bunch from a to fruit so uh the circuit python demo um I just have when I touch the screen it looks on the SD card and it displays a different image so beautiful full images of flowers or tigers and so on so forth um I mean it's an older product but I'm really glad that we bought it back in stock the price also dropped because we were able to manufacture it for a lot less the screens the screen pricing basically came back down to a reasonable level this is resistant we also have a capacitive touch version of this which did not go out of stock because enough of the components were available so check it out uh it does work with anything that is Arduino is shaped uh we'll also work with things that are mega or grand central shaped because it just uses the SPI connector and the two i2c pins plus a few digital io and people often ask well what if you want to connect to other pins because it kind of uses all you know all the pins don't come through they're soldered on we have the wing shield which was co-designed by Todd Bot and JP who are Adafruit hackers and friends and they still get a cat every time we sell them so pick up one of those and that will bring out all the GPIO if you want to connect more stuff to your screen yes that's right where did it go here look that's it right there I just want to show it to you on the nice down shooter for a second uh but without further delay that's the product pick of the week this week it is the 2.8 inch tft touch it is the 2.8 inch tft touch shield version 2 with resistive touch this is arduino shaped there were some questions in the comments uh what do you mean by arduino yes you can use it with the arduino IDE you can also use it with circuit python the pin spacing and pinouts are designed for that classic arduino shaped board I happen to have a metro rp2040 here that i'm going to use but you can use it with a arduino you can use it with a grand central you can use it with any of our metro boards they all fit that pinout so let's go ahead and show that connection first and i'll also address the the topic of additional pins if you need to so what you'll see here is this has a hardware icps connection that's this little two by three connector here that is a full-time spi hardware spi connection and that is the default you can see here on the bottom of the board you can use icsp by default or you can cut those traces and then solder these jumpers if you want to use the the software spi or the the spi pins along the sides but if you use it this way you just want to be careful to align the little icsp header as well as the other pins there plug that in this is now getting the touchscreen over i square c and it is sending the screen data as well as if you're using the little sd card reader that's built in there over spi so let me find somewhere hidden in here a usb c cable and plug that in adjust my white balance and exposure a little bit there okay so for the first demo with this uh let's connect to it in the repl so i'm gonna do some screen rearranging here uh and let's do disco tool uh name is metro so you can see here as i touch the screen we're registering x and y coordinates uh and this this element kind of thinks it's sideways so you'll notice that x and y look reversed there uh so as i go down that first number gets down to 400 goes up to about 4 000 as i go left to right that second number uh goes about 270 or so up to 3700 or so uh and that final number there is the pressure uh so that you can see the harder i press on the resistive element without just breaking the screen so be a little bit careful it can register some degree of pressure it's not super precise uh this is much less expensive than the capacitive touch version of this and so if there are cases where you want to use something like a little stylus uh or some other um way of actuating this that isn't a finger and you don't need that kind of precision you can save some money using a resistive touch display kind of like your old palm pilot if you remember those uh so that if you want to look at the code here you can see it's pretty straightforward i'm importing the board for pin definitions and i'm importing the tsc 2007 that is the new chip there was a previous chip that's not available anymore that we used to use for resistive touch so we have a library for this in circuit python you can also uh do this in arduino we're setting up i square c on this board we don't need to use an irq for that pin and then we're setting up the touch screen element here is tsc adafruit tsc 2007 on the i square c and then the main loop here is just saying if it's touched so that is one of the things you can just ask tsc dot touched if it's not being touched we don't do anything if it is being touched we'll go ahead and create this variable called point which is the three pieces of data that come from the display which are the x y and pressure and then uh we're saying okay if the pressure is greater than a hundred we'll go ahead and print that out so we just don't get any false reads if it's kind of on the edge there now to do something a little more interesting with it what i'm going to do is copy this slideshow code and this code all this code is in the learn guide for this display so what am i doing am i yeah let me open up code and i'll paste the new code into there and save restart that board it might need to reset uh just because of the the display uh-oh why am i seeing no image we should see we should see a slideshow image in here let me see let me double check i've got everything plugged in yeah is there a chance i saved to a board other than the one i think i saved to yeah sure is i have two circuit pie drives i think i just saved that code over my camera switcher over here whoops i usually usually uh yeah i should have noticed the code all right here we go let's fix that later okay here we go uh so it's booting up now this is being used as a sort of slideshow display everyone loves a good slideshow and now the touch screen is just being used as sort of two directions so if i touch over here on the right we're going to go to the next image if i touch on the left side of the screen we'll go back so this is a really simple primitive use of the touch screen but it's almost fail fail safe you can use something like a user interface that has some big buttons on it maybe four buttons five buttons on it uh that are big touch areas and that'll work great so you can see here i'm advancing forward through we have a pretty fast refresh of these uh bmp files oh look when did that get on there i saved somehow i saved an image of this fireworks i didn't know i had done that oh that's the gif yeah uh is the gif turned into a bmp for a spreadsheet what are you doing there that was a todbot project uh okay so there you can see in the code i'm doing uh similar stuff i'm importing that tsc 2007 for the touch screen i'm also now importing the display which is this ili 9341 display driver uh i'm releasing displays setting it up on board's uh spi that's that icsp header and then we're setting up the chip select and data pins d10 and d9 and then i'm telling it the size of the display 320 by 240 it is by the way a gorgeous 320 by 240 tft with 18 bit colors a really nice resolution on the color here you can see the the color rendering is nice and the angle viewing angles are quite good as well setting up our display bus using that ili 9341 chip and then we have some code this is code by liz clark in the main learn guide for the touch shield that you can check out this has you grabbing some images this could be off of the sd card built onto the display or just on regular flash is how i'm using it and i just have a series of bmp files that are being displayed we're doing a similar thing here we're checking okay have we touched and we don't want to sort of have any debouncing uh issues so there's a state that gets flipped when we're touching it and then it just checks if the uh side of the screen is the left half then we'll go ahead and go backwards in image if we're on the right half of the screen then we'll go forward in image and that's just used by incrementing or decrementing that index there uh of however many images it found on the operating system uh so if you want to check out let's switch over to this for a second uh the page let's see if we still have them in stock crossing fingers we do good okay i think we stashed uh a good number of these so you should be able to get these without too much trouble uh maximum of 10 per person but look at that price $12.48 for this excellent shield which again you can use on pretty much any of your um the grand central the uh mega the uno sized boards which includes the metro and other spark fun boards they have the red board so if you've got these types of boards uh these this is a good one for you uh do i have any others around here no but i'll show you a trick in a second so before i do that uh if you scroll down a bit you can see this big uh paragraph here that is a link that will take you to the learn guide for the tft touch shield v2 and you'll see here this actually covers uh we don't ever like to throw away information that may be useful so if you have the v1 the original version of this you're going to want to use this stmpe resistive pinout page and the code examples if you're using this new v2 then you're going to want to grab the tsc 2007 resistive pinout there uh this will tell you how to do this in arduino as well as some examples uh there's a resistive touch screen demo with the previous board i don't think we have one up yet in circuit python for that but i believe there is one in arduino right here uh and if you click right here the resistive tsc 2007 page that will give you uh this exact uh demo that i'm showing you here with the um ate a fruit circuit playground characters the puppet characters uh and using the touch screen and that should work on most any board that it'll fit onto um the other thing i was going to mention let's jump back down to this view is actually well we'll do it that way uh let me turn up the exposure a little bit so if you want to still use some of those pins right this is actually using very few pins i think we've just got the uh hardware uh spi there and then a couple pins for um s square c couple pins for the um chip select for the for the display if we need to use some of these many many other pins that are available zoom out here a little plug for the screw shield so uh lemur mentioned this this is something that todd and brian jeppson and i put together a number of years ago a sort of two-piece version of this lemur revised it with this version that's just a full single board lots and lots of prototyping area and you can see here again the same familiar pinout and it has the icsp header here as well as the uh opposite side there so that will sandwich between the boards so we can take uh let's take it this way if we take our touch shield you can plug it carefully make sure you get everything lined up before you press down so you don't bend anything that looks good so squish that together uh and now this has these stacky headers which will fit into your metro or other arduino shaped board uh same thing we want to make sure that those are all aligned nicely including that okay so now we have a whole bunch of pins broken out into screw terminals so if you want to add buttons to it that aren't uh you know of course we've got our little uh stemma qt port there for stemma qt things but if you have some analog stuff you're reading some buttons uh maybe external displays that are that are in need of some external pins there you can do that all through that uh shield there and now if we go ahead and plug this in we should see uh the same same behavior as before let's do a little restart there we go and now we can use the touch shield but you have those extra pins in full disclosure todd and brian and i each get uh a small cut of the money when you buy one of those so um just want to make sure that that's clear all right let's see what else anyone have any questions uh let me jump back over to our discord there for a second uh rufus had a question about using metro mp2040 works really well for sure thing uh larz does have a mask he's hiding now that's creepy larz why can't you be something normal um what else i think that's it yeah that covers the questions over in our discord um tackle the world's live demos are magic yeah i completely obliterated the code on my poor camera switcher over there uh dcd asks does the screw shield give access to the six pin connector so it does however the old version did not um so if you look right there there's the ic sp header um and those are if that's what you're asking about that's replicated there so yeah this this works and is is working over hardware spi right now uh the old version did not i think the images in the guide don't show that but if you if you get one today it comes with the uh the sort of long stacking version of that two by three header that you need and a space on the board for it so um maybe we'll update those photos someday but that's a that's a newer version it's been around quite a while but it was a revision after those um after that i think it was one of the arduino uno v three or revision three i think that was the one that added that so um this came out before that that uno so it didn't have those pins all right anything else that we've got i think that's going to cover it so don't forget head right over there go pick up one or ten of these if you have some resistive touch tft needs let me check my notes anything else i forgot oh yeah another nice thing about this is it has the angled uh side angled button for the reset there just like the metro actually has a similar one but if you're on another board used to have to kind of go in there and find that uh reset button so if you want to hit the reset button just on the side of the tft it lives right there which is convenient and it has a demacutee port right there so let's pull that off of there i'm just going to set it back on to just the metro and give that power a battery pack anywhere let's see we can battery power this take that off of there let me grab a lipo can i grab it no i can't grab a lipo for that what am i thinking i need either a double a pack which i had one floating around i think i just took it inside or we'll use good old usb all right usb you win like that okay and that right there is my product pick of the week this week it is the 2.8 inch tft touch shield version two with resistive touch screen for arduino and metro shaped boards thanks everyone for stopping by for adafruit industries i'm john park happy halloween this has been jp's product pick of the week and i'll see you next time bye