 Welcome to the show, it's me, John Park. It's time for JP's workshop. Here we are. And I want to thank people for stopping by over in the discord and in the YouTube chat. I see you. Thanks, Dave Odessa, for hopping in over there on live chat on YouTube and team LR who said, unfortunately, it's too late. It's 10 PM where they are. They wish this show were earlier. Catch it in replay. Sorry, the live time is. I'm on the west coast in the US, so we can't be in all time zones at once, unfortunately. But we're working on it. And if you want to jump in on the chat here, this is our Discord server. And you can head to adafru.it slash discord, and you'll get an instant invite. You can jump in. This is the live broadcast chat channel. You can see right here, and we have a whole bunch of other channels, off-topic, pet photos, Help with Circuit, Python, Help with Projects, and on and on. But this is happening right here in our live broadcast chat. Andy Callaway says, old school CRT back there. That's right. I bet there's a TV. Yes, there's a TV icon. I'm going to do a little bit of stuff with that today. Nothing too involved, but we're getting there. I may even, at some point, do some video synth stuff and maybe some dirty video mixer stuff. Who knows, Circuit Benda, Chiron? I don't know. But yes, that's the TV I found. I'll chat about that a bit more in a second. Hey, Johnny Bergdahl, Randall Bone. Nice to see you as well. Thanks for stopping into the YouTube chat. Delicious, delicious coffee. The next thing I'll mention is our job board. If you want a job, if you want to hire someone for a job, you should head over to jobs.adafruit.com. It is, as they say, second to none in the maker, engineer, hacker type of hiring boards that's free, entirely free, and vetted. So you know that's where the good stuff is. If you check out, in fact, our, let me grab that page real quick. If you look over there, this was one that caught my eye. It was just posted yesterday. It's electrical enthusiast frame rates theories in Dallas, Texas, is looking for some contract engineering help. So that's just one of the many jobs. If you look at the main jobs page, you'll see we've got a whole bunch of positions there that are looking to be filled. So remote, part time, contract, full time, it's all there. So go check that out at jobs.adafruit.com. Why don't you? Let's see, next up, I do a show on Tuesdays that's called JP's product pick of the week on it. I like to show a product pick, either something new or something great from our back catalog. And I give you about a 15 minute demo of it, show you some of the code that's used if it's the kind of product that uses code. And you get a big fat discount during it, 50% off in this case for this week's product pick, which was this very cool seven-segment backpack, which you may notice, by the way, there's no way that you could write seven-segment backpack with a seven-segment display. That font there is kind of a lie. It's not even a character one with the diagonals. That's just a fanciful thing. But typeface gripes aside. Here's a one-minute recap. Seven-segment Stem-A-Q-T backpack. It has that HT16K33 multiplexer there that deals with all of the pins of all these many, many LEDs. And then you get to talk to it right over Stem-A-Q-T. So here you can see I have one. This is the red. And then I've put a little bit of a diffusing gel over it. So here, this is actually scrolling the IP address that this little cutie pie with its little antenna there are picking up on my router. So I flash all the lights on, off, run a little animation a few times, say IP address. And then I'll blink a little bit while I'm waiting for that to come up. And this is actually a routine. This blink routine is built right into the library as well. So now once it grabs that address, it kind of scoots that other so the character's off there and just starts running my address on here. The four-digit seven-segment backpack with Stem-A-Q-T. Seven-segment Stem-A-Q-T backpack. It won't stop. There it stopped. Sorry about that. Yes, so that was the product pick, very cool one. You can get these in a bunch of colors. And by the way, we apologize. This one was in, this one went really quick. It sold out really quickly. We have some product picks coming up that have massive amounts of stock, like thousands. So hopefully we won't run out, or hopefully we will. And we'll make tons and tons of money, which helps us keep the lights on here at Adafruit. I have an echo. Why do I have an echo? OK, how about now? Did the echo go away? Let me know. I'll take a moment to. I had a different audio set up than usual. Let me turn down that external speaker. Yeah, something went weird with my audio right before the show, so I had to rejigger things. And I think it caused a bit of an echo. Oh, the video was echoing, eh? Yeah, that's my fault. Sorry about that. I want to see it again without the echo. If you do, go to YouTube. Go to the Adafruit YouTube. It's up there just as a little one minute pull out, or you can go to the live. Great, no echo for live. Mike, thanks, Sea Grover. I appreciate it. Sea Grover is our resident or at-large audio expert, live audio expert, so we appreciate it. OK, so next up, let's do a Circuit Python Parsec. Yes, Circuit Python. All right, I'm being extra careful that we don't have audio echoes during this part, too. OK, for the Circuit Python Parsec today, I wanted to show how you can use display text labels inside of Display I.O. for writing words on your displays inside of Circuit Python. Here, you can see I have one of our Pi gamers, which is a really lovely board based on the M4, and it has a display built onto it. But this technique will work with any display that uses Display I.O. pretty much. And you can see I've written the word Parsec here in a big terminal font. And I can control the position of this on screen using some of the buttons. And you'll also notice that I'm writing out the coordinates of the object, the text object there, as I move it around. So let's bring this up to 0, 0, because this is a point I want to make. If you look at the code, how this works, I'm importing terminal I.O. for the font, I'm importing display I.O. and importing Adafruit display text label. Then when I go after setting up the display here, I set the font to be terminal I.O. font. And then to create a text label, which is what a, essentially it's a type of group, a special type of group, in display I.O. that can have text in it. So I create this, I'm calling this one big text label, and then I use label dot label, and I set some settings. Which font I'm using, I'm setting the scale to three, so it's big, what text I'm writing, and the color here, which is green. Then I'm setting an explicit position on screen, X0, Y0, or actually when I start out, Y60. So it's scooted over from the edge. And then I'm also creating a variable that has both of those in it, so that I can print that to the screen down below. I append this text label to a higher level hierarchy group called text group that I created. That's so I can put two different things in here, but you'll notice I can move one of them while leaving the other one in place. And so this is one of the cool things about using text labels is that they are groups that can be lots of groups inside of one larger group, which is the main display. I'm doing a similar setup here for displaying the little coordinates at the bottom. And then I'm using the buttons to just increase or decrease the X and Y values. Now one of the reasons that I brought up the zero zero position is text labels are, their origin point is the far left of the text and halfway down into the text. So that means you can't really start stuff on zero zero with the font this size. I started at zero on X, but 10 down on Y. And as you increase in Y, it goes lower and lower like so. And so this is a little bit of an introduction to using text labels inside of display IO in circuit Python. And that is your circuit Python Parsec. Parsec. All right. We had a question over in the YouTube chat from Graham Rofi. Hi. Echo was just on the seven segment when it repeated. Can you still get the displays with the diagonals? So I don't think we have that backpack redesigned yet with STEMA QT on it. But if we take a look, let me go to Adafruit and bring up my browser for you. If you take a look, wow, that's a cool banner back there, it's a party. If we look up, I think it's a character display. No, it's a segment display. So there's seven segments. And keep going. I don't remember what we call these. Keep going. There's the seven segment backpack. OK, Alpha Numeric is what we call these. So here's an Alpha Numeric display. You can see it's two digits. So you end up buying two of these to put them side by side to get a four character display. And this is the backpack that we have for that particular, let's see, we have two heights. We have the 0.54 inch, which is similar to these. And this here, this 14 segment Alpha Numeric LED feather wing is one of the types of drivers you can use for. You can use pretty much the same driver, that HT16K33. And then I think we have one that is not a feather wing. What do I call this? 14, 14 segment. So here's the 0.54. OK, this is the backpack. And you can get this with different colors as well. You can get this one. It's a pair you solder them on, but you get the red one or the green one and the yellow one. And you can see there, these have the extra vertical segments, a pair of them, and the four diagonals. And that's what allows you to run with a bunch of other letters beyond what the seven segment will do. Yes, thank you, Charles Burnford. 14 segment, that's the word I was looking for. Otherwise, I think you control this pretty much the same way. I don't know if I've done it in Circuit Python. I've done it in Arduino before. Yeah, I've done it in Circuit Python, actually. A similar type of thing. You can just type in letters if you want, and it'll light up the correct segments for you, or you can go in and light individual segments. All right, thank you. Good question. And maybe we'll have a re-spin of that with STEM at QT. And if so, maybe we'll run that on the product pick. It'll be fun. OK, so let's talk about some of this CRT-TV stuff. You can see right there behind me. I have this little 13 inch Sony Trinitron that I picked up. And this was actually just something I found on the side of the road, lucked out. I've been looking for years for a good small CRT display. And let me turn this one back on. This one has just two inputs for video and audio. One is a composite video, which let me turn this around. If you'll remember those, let me switch maybe to this other view. OK, so if you'll remember these, crank up the brightness a little bit, hang on, wobbly camera for a second. There we go. There is an input here for video. So it's the entire video signal on two wires here, going into this little RCA jack. And then next to it is an audio, so it's a mono TV. It's only got one speaker in it, so you would send it mono audio. And it also has the coax RF input. So here, I'm using a composite video input. So that's red, green, blue, all sort of in one set of messages going over a single line with the ground. Unlike component video, where you have red, green, blue, or more modern things like VGA or HDMI. So that is one aspect of this. It also has a, if I hit input on here, you can see from the snow there, it has that antenna input. I don't have an antenna plugged into it, and I haven't tried pulling in a channel, so it's not really tuned to anything. But those are the two inputs on this. This also has very few controls. So I am actually going to open it up to try to adjust some of the focus and offsets and things, because it could use shoveling over a little. I don't know if that's pin cushion controls, but some monitors, more like broadcast monitors, you have those controls broken out on the front or the back, as well as brightness and contrast and color controls that are, in this case, on a menu system. Now that brings up the first of two mini projects I wanted to talk about today. And this is the fact that I didn't get a remote control for this. So I decided just last night, in fact, I was going to try to see if I could gin up a remote control for it using a circuit playground board. So circuit playground or circuit playground express or circuit playground blue fruit, they're great because they have an IR transmitter and receiver built onto it. So you can barely see it, but I think it's right there. There's a little transmitter and receiver pair for infrared. And a lot of projects we have, we use them to talk to each other so that we can play little games with them. But it actually works just fine to control consumer electronics like this TV. And so the first thing I did was try to figure out if I could simply switch that input. So you saw me go over here and hit this button to go from video one, which right now I don't have a signal going into it, and then switch it back over to video one to TV tuner. And so let's take a look at how I went about digging into this. So you can see here, there's a really nice Arduino library called IR Remote that I'm using. And let me go ahead and plug this in. I may have to fix that serial port because it might not be the right window. And I might have to mess with my broadcast software. But let's bring up a little down shooter there. So here's my little circuit playground. Fix that focus for you. And yeah, that's probably grabbing the wrong, let's see. It might be grabbing the wrong serial port. Let's find out. So yeah, hold on one second. I'm going to try to fix. Oh, it's working. OK, great. So you can see here, the code that I'm running, this is some of the example code. And I just tuned like three things in it and got it to work, which was great. So the IR Remote library, I got all big, has a bunch of demos and including this receive demo. And in the pin definitions file, it just didn't happen to have the Circuit Playground Express, but it did have, you can see here, different platforms, AT-Tinies, SAMD-21, which is what this particular circuit playground is. And I think there's NRF 52840, so that should work for the blue fruit or Bluetooth one. But if we look through these definitions, when I get down to that SAMD-21, I should make a proper definition. But all I did was edit that one, which was this SAMD. So if the chip comes up when you start up as a SAMD, it's going to use these definitions. And I just changed the pins. IR Receive Pin on the Circuit Playground Express is 26 and the send is 25. And also set the Tone Pin, which is the audio out and the little built-in speaker, which you can hear in this sketch. It actually does something. Other than that, I think I'm running just the vanilla receive demo. And I happened to have a Blu-ray remote. And none of the buttons on here work on that TV except for the volume, the power, and the input. So that's at least a start. There's a lot of information out there about different protocols with Sony. There are about three different ones that are pretty common among just their remotes. But by at least finding something that caused that TV to react, you can see here, if I hit my input, you can hear it beeping. So that's the little tone thing telling you each time it sends. And there's some important stuff I can find out here. If I clear this and just press my remote, that's as fast pretty much as I can press it. And it is sending, I think, a repeat of two or maybe three. I'm not sure how to read this. But the command is usually sent multiple times. And that helps on the receiving end. So that command being sent three times is a good clue. The address that it sends to, I need that, that OX1. And in this case, the command that was sent is OX25. So if I then plug that into this send demo, which I kind of did the same things. I changed the pin definitions to use the pins that are proper for the circle figure on Express. I cut out a bunch of, this demo tries every remote code known to man. So I just blew away everything except for the three Sony ones that were in there. There were three different protocols of Sonys with different bit lengths. And changed my address to X1 and my command I'm sending to OX25. So if I look in here, yeah, so this is sending input right now, which is that 25. I'm going to take this over here. And we can look at the TV, hide this stuff. And I think this is running that. Should be. Oh, I need to upload that code, sorry. It's not going to just work, yeah. Let's bring this here back up. And that, OK. So I'm just going to make sure that Arduino is sending to the right board. It is, I'll hit it. This will compile it and send it. And you'll see in my little output there. It should flash reset. This works pretty well resetting the board as well. It found it. It's uploading. And it's done. So now, you'll see this little red LED blinking. And that's something it does each time it sends. So that's one way of knowing that it's working. So I'll take this over here now to this TV. And luckily, it's not so powerful that it bounces off the ceiling and walls. Sometimes you'll find that with IR stuff. And it's really tricky to test things without turning off your devices. But now, if you see here, I'll just hold this in front. And every two seconds or so, I think every second and a half maybe, it just switches my TV. You can see no hands, no wires. The TV is just being controlled by that. And then, what I've done beyond that is, I then was able to search, since I knew two of the codes that actually worked, which were the power and the input, I was able to sift through a bunch of internet searches where different codes were being thrown around that weren't working. And I finally found two or three resources where people were using the same codes that I was. And so I've got this list here now. So channel up and down, or addresses 10, or commands 10 and 11, volume up down, mute, power, enter, which is the same as select. And you see, I've put them there. This is kind of redundant. But the remotes will often say select on them. So if you're looking through manuals, and it tells you how to use things. Todd says, now go to a sports bar with that, and just leave it on a table. Yeah, this is, as you may know, the TV Be Gone project is a similar sort of animal where it just blasts out with some really high power. LED is a big array of them. Every known shut off code, which makes people sad sometimes. So enter and select are actually the same. Same with guide and menu. So one of the reasons I was doing this is I kind of wanted to get to the menu and see, can I alter any of the settings for picture, brightness, and so on, even though there's no buttons for that on the TV? So here you can see I've made a bunch of variables, just so it's easy to try them out by name. And right now I don't have any buttons or cap touch or anything working on the circuit playground express to send these for me. So literally I just have to code in a different thing to test it out, which I'll fix that later and add some button presses to it so that I can use this thing as a remote for now. So now it should be sending out the menu command. And if I hold this up over here to the TV, switch over to that view. OK, here it is. And yeah, I brought up the menu. So now I can use up and down. It says move with up and down. Select is the select, and exit is menu. So if I hold this here, it should just get out of that menu again, because it's the same button to kind of go back in there. And it's got your basic picture controls. It doesn't do much else. I tried the down button and enter, and that isn't anything too fancy. It's like reset and parental controls and a couple other things. I don't have any of the more advanced picture stuff I was hoping for, which is probably all on Trimmerpots inside of the TV. So that'll be a different adventure. But I thought that was cool, and that was fun. And it meant that I didn't have to wire up an IR circuit on a different microcontroller, Circle Playground Express, super great, excuse me, for this type of project, because it's all built right in, and we've got a bunch of I.O. buttons that I'll be able to use to control this as well. So that is sort of step one in this process. Let me get out of that menu again, and I'll turn this off so it won't send me errant things. One funny thing is that I was pointing when I was first testing this. Some cameras won't filter out IR, and you can see the purple glow when the infrared is running. Modern iPhones filter that out. A lot of cameras filter that out. Some webcams will, some won't. And I was testing the camera that's pointed at my workbench there to see if I could see it. And I have a monitor behind that camera, and all of a sudden that monitor turned off because it's a, what is that one? Like a Vizio, I think, and it uses the NEC commands. I saw it was just testing the NEC stuff when it took that TV out. So the perils of doing IR remote stuff when you have a bunch of IR enabled devices around. So next thing I want to do with this TV, and this is somewhat related, is these are really great for retro video gaming, because it's kind of the dimensions and the technology that the retro era of games that a lot of us grew up with were played on, and there's something really charming about these types of displays versus more modern displays. So one way of playing retro games is not the purest way, but is using a Raspberry Pi and Retro Pi or other emulation software. And so I was curious, could I actually get a Raspberry Pi to communicate with this TV without using a converter box to go from HDMI, which is typically what you see on a Raspberry Pi over to the composite in. If you remember the very first iteration or maybe first couple iterations of Raspberry Pi had a big yellow composite video out on them, which was great. It's built onto the chip that they use. It's easy to do both HDMI and composite on it. But then that disappeared. And so if you look at a more modern Raspberry Pi, like this one over here, let me wiggle this a bit and I'll head over there. So here's our fairly modern Raspberry Pi going to a very modern little display here. What I realized was that I had this little dongle sitting around that came with the chip, the pocket chip single board computer. And I've had this thing sitting somewhere that I see it all the time. And I thought, hey, that was really cool that they used the tip ring sleeve type of connector to go out to three signals. So this has ground on the sleeve and then I think has the left stereo, right stereo and video. You'll see these on things like plugged in earbuds that have a microphone. They use that extra channel there for your microphone. And so I said, I just wonder, maybe I had this in my head. I said, I wonder, does a modern Raspberry Pi use the same trick where you can send composite out because I didn't think that the chip had lost it. I just wanted to make these smaller and get rid of that controller. So what I discovered was it does, it works. And what we have to do here to make this work, let me zoom out just a little bit here, is change one little configuration on your Raspberry Pi. So this will be small. It'll be better probably to just Google it than to try to read it off the screen here. But I'll do it just so you see this happen in real time. Let's see, do I know how to make that bigger? Get that a bit bigger. So what I'm gonna do is edit the config. And so sudo nano boot slash config.txt. That's what I'm doing here. I'm sure you can't read this, but what I'm looking for are, there's a line in here that's actually commented out but in here related to the standard TV output. And where did it go? Let me find it. Not there. Here it is, SDTV. So standard television mode equals zero. So zero is NTSC television. I think two is PAL. And I forget what one and four are, but here this is NTSC television. So I want the NTSC standard. And you can use some HDMI force hot plug commands. Some people will do, I've commented that out. You can also use ignore hot plug if you have to, but I don't want to. Because what that means is when it starts up, it'll have a preference for HDMI. But now that I have SDTV mode zero have that line uncommented, it'll try to send a signal, composite signal if there is not an HDMI plugged in. So I've already got this saved. I don't have to actually edit that. That's how I had it already. What I'm gonna do is I'm gonna do a reboot and I will unplug HDMI during the reboot. And this is great because it means that you can simply have it favor HDMI on restart, but send out a composite signal over that little headphone jack. What you think is just a headphone jack to your old television. And one cool thing actually is that a lot of these little LCD displays in the Adafruit store have composite video. They also have VGA and they have HDMI. So if you look at this one that I was using for HDMI, you can plug in to VGA and composite. This one has two composites, so two different video things and a little switcher on the buttons. So this is great for testing stuff. Also, if you want to do composite video and you don't care about having a CRT, there are some really cool things that composite video can do, especially if you wanna try things like DIY, video synthesizers, if you wanna create mixers, dirty mixers, those kinds of things. HDMI is really particular. Just plain won't work if everything doesn't align, but the composite is actually fairly forgiving. So you can feed it freaky signals and it won't get mad at you. You can just unplug it here and plug it back in and boom, it works unlike HDMI, which can get all crazy about handshaking and digital rights, copyright management, things like that. So I don't have anything exciting to show on here other than this is the Raspberry Pi now. And then you'll see if I do the reboot and plug in HDMI during the reboot, it should now favor the HDMI as the sort of nicer source. If I can convince it to come on this thing, is it on already? There it is. So you can see, even with the composite still plugged in, it is happy to go to HDMI when it finds it during reboot. So it's just sort of a hierarchy. I don't know if you can do a hierarchy of composite over HDMI, but I don't think I have a big reason to you can simply unplug HDMI output from the Pi and off you go. So that's another cool discovery there. And as you may know, that particular cable there, if we take a look at Adafruit Store, we have a version of this there. Let me bring up my Chrome. So this is an AV and RCA composite video audio cable for Raspberry Pi. So this is a good choice for that. It's got the tip ring, ring sleeve set sort of properly for using the yellow, yellow is typically video, there's a little yellow ring on this one for plugging it in. I have found some cables that I, let me see, is this one of them? I don't know where that one went, but I have some of these that came with video cameras, some of these that came with still cameras. I actually have a lot of these TRRS cables, not all of them actually agree about which order is which, which is strange, but I've had ones where the video is going over the red, the cable with the red jacket on it, which is strange. Sam Edwards says, this is super relevant to me. Good recommendation, YouTube. Excellent, was that the, was that the remotes or was that the composite out? Let's see. Just checking the chat here. By the way, thinking about this, and I've run across these cables for a couple of different things, this tip ring, ring sleeve thing. And it's kind of funny to me because the naming is a bit vague. Because you can see there's, there's two rings on there. What are they sending out to? Typically we have like tip ring sleeve or tip sleeve, which is mono audio or stereo audio. So I made a joke about this yesterday by creating a parallel port, tip ring, ring, ring, ring, ring, ring sleeve jack. And I just want to apologize to the internet for that because it's not real. It's just some photoshopery. But you can decide what you want to send over that, I guess. All right. So let's see, let's bring up the Discord. I think there's some discussion about the IR remotes going on. Yeah, Todd pointed. So the library I'm using is the Arduino IR remote library and it's fantastic. It's been updated recently I saw for RP2040. So it's being maintained and updated and it has all of the finicky timings and pulse specifications for a ton of different typical IR remote standards. Let's see. And I am thinking, FOMI guy said that there's a CircuitPython IR remote library posted that. Okay, I'll check that out. Very cool. That would be nice to have that working in CircuitPython so I don't have to compile. See Grover's going to make a mute, unmute everything control for the meteor room. Yeah, a lot of these, by the way, are they don't know anything about state. There's not a power off and a power on command. It's the same button on your remote. Well, it just sends mute or unmute. It's the same thing. The device, the TV just flips to the opposite of whatever its current state is, which is too bad because then you could accidentally unmute things that are muted even if your intention was to make a muting thing. Let's see, what else? Good. Charles Burnford says it is not the same as a old style version. I don't know what that means. Please elaborate. I'm not sure what you're asking. Jerry S. is funny how he's making it sound 50 years old and I still have a TV I use just like that. It's good TV. All right. Well, that's about it. As I mentioned yesterday on show and tell, I think I mentioned, I'm working on this little encapsulated web server on the ESP32 S2 Feather TFT. It's got a little battery in there, a little three-printed case. It's my first iteration of the case. I'm gonna do some refinements on that. I'm working on a guide and this is a simple, you can use just a UF2 if you don't wanna use Arduino. There's a UF2 for this and this is the web server running in Arduino and then there's an equivalent one running in Circuit Python that Dan Halbert wrote and I'm gonna put both of those into the guide so that you can set up a little web server in a box. This one I'm running the Wordle, sort of liberated pre-times Wordle, runs right off of here in HTML and you can get it up on a phone. Even makes an ad hoc network if all of our networks go down, you can use that. So that's project to look for a guide from next and then I'll be doing some TV stuff in a little bit. We have a cutie pie coming up with the same ESP32, what's it called, the Pico 4 chip and I think I'm gonna use that to make a little video composite video thingy. So if you're excited about this stuff, then I recommend you keep an eye out at yard sales, the side of the road, recycle center, thrift store and get yourself a little cool CRT TV. All right, that is gonna do it for today. Thanks everyone for stopping by for Adafruit Industries. I'm John Park and this has been John Park's Workshop. Bye-bye.