 Hello, welcome to the show it's me John Park and this is John Park's workshop the time has arrived Hello to our friends over in the YouTube chat as well as our discord You may be watching this on a variety of different platforms But if you're wondering where some of the chat is going on discord is a great place to check out There's our discord if you go to aid of fruit dot it slash Discord you can jump right in and you'll see there on the left side We have a whole bunch of different channels, and I know I mentioned these sometimes, but I usually crop my window so you can't see I decided hey Let's have a look at all these channels here today the broadcast Chat channel here live broadcast chat is where people are hanging out such as Jim Hendrickson and rich sad and Andy Callaway Hello, welcome. Thanks for stopping by Oh gosh. Look Todd bot is typing. There's three ominous dots animating and then you can Also check out the YouTube chat. Hi, Gary T. I checked that one as well That's right Todd. I've got my old perfect circuit audio back when they were called that shirt So let's see let's get on with some some business here shall we But yeah, actually I got distracted there you can see here. We've got our Live broadcast chat. There's also live broadcast announced that'll let you know when when shows are happening just the facts There's a pet photos. Oh cute. Look at that lab There's a pet photos channel here. Oh my gosh. Oh, yeah bunny rabbit. Hey bunny and There's off-topic Help with a whole bunch of different categories here circuit python 3d printing Arduino a to fruit IO and on and on and on and on and then a bunch of other Variegated and miscellaneous topics here. So Come on by some time. Yeah, here we are in the live broadcast chat so Next order of business is our jobs board if you go to jobs that a to fruit Com you can check out openings in the sort of maker engineer a to fruit adjacent job market and If we have a look at what's going on here Today on the jobs board this one's a fairly recent edition of about a week ago the manufacturing assistant See multiple openings at evil mad scientist laboratories up in Sunnyvale These are wonderful people good friends of ours window and Lenore not to be confused with the more and The rest of their gang they manufacture Some of these most of these kits and products in-house So I think they're looking for people to help with that. This is evil mad scientist calm You can see there's their plotter their axi-draw plotter, which is by all accounts one of the finest Pen plotters that you can get and use I should get one someday because they they look an awful lot of fun You know, we've got a lot of fans of plotter art around here And then they're also well known for some of these giant Discrete component versions of ICs. I love these and actually some of those are carried at ater fruit And a whole bunch of other products that they've made so they are looking for Fabrication assistance light-duty mechanical manufacturing assembly tasks as needed operate hand tools handheld power tools and support of those tasks Listen to precisely follow protocols for assembly So go check that out if you're looking for work starting ranges are $19 to $24 an hour and I'm sure you'll be treated well because they're good folks So that's just one of the many positions that you'll find here on jobs dot ater fruits comm so go check it out sometime Hey garlgamp two three seven doom nice to see you again Ethan arts more of our our YouTube gang YouTube chatting gang. Hello What else have we got? I think I should mention that on Tuesdays. I've got this show right here This is JP's product pick of the week show on it. I show some new or awesome, but not new product This week it was a new one a new actually kind of a new version of an older one Which was all in its of its own? Volition a newer version of an older one. So what I'm talking about is this here This is the CP 2102 and friend which was an update based on the CP 2104 friend Which was an update on the FTDI friend and all of them have one thing in common, which is they are USB to serial converters I found out I had a rude awakening It's got nothing to do with delicious cereal that you eat but instead for converting your USB output to serial as if Time it stood still and you still had an RS 232 port on your computer except this one is I believe five and three point three volts rather than twelve and Negative twelve I think was the was the spec on the RS 232 But the upshot is it allows you to program things via USB that really want to be programmed over Serial hi Johnny Bergdahl and for my demo. I showed this guy right here, which was a breadboard Arduino But don't take my word for it Take me two days ago's word for it. Oh Yeah, that's the product pick of the week right there the CP 2102 and friend It's a USB to serial breakout conversion board lady. Ada said why don't you build a breadboard Arduino in order to program this this is plugged in over USB C and then Transmit and receive to the Arduino to upload this I have Arduino configured to think it's sending out to a Duemila nove, but it's actually sending USB to my CP 2102 and friend Which is then sending over serial to the chip here to program it So I'll hit upload in Arduino and then I'll hit reset once it starts to upload that helps it And you'll see it very quickly flashes the board It's already done and now my LED is blinking at that sort of one second rate the CP 2102 and friend USB to serial converter Yes, so for those of you who got them, let us know how you use them foamy guy That's a lovely bowl of cereal icon you've got there and now I'm hungry all over again Alright, let's see what else is up here. This is probably an excellent time To take a look at this week's circuit Python parsec. So let's do it Oh Did sound not work on that sorry about that we get to do it all over again Zero DB do you hear me now? I think Let me know Because I've turned it back on so after this little lag and catch up If if you guys give me the thumbs up that my sound is back then I will I will redo that one from scratch Haha, he noticed I noticed because you guys were pointing it out in the in the chat. Thank you very much Let me know if you think that's that's working someone give me a thumbs up still no sound how about now Are you getting any sound? What is the? YouTube saying Too bad there audio good. Yes. Ah geez all right That was our dress rehearsal here we go ready for this Let's do this Can you guess what I did? I think you can but here we go Take two. All right, so for the first For the circuit Python parsec today, I want to show you how you can use Shapes and fill in display IO on circuit Python in order to draw objects onto a screen So if you look here what I have it's a feather m4 plugged into a feather doubler with our OLED feather wing And one of the cool things about this feather wing is it has these three sort of general purpose buttons that you can use connect it up to pins nine five and six and What I'm going to do is simply press a button to make one of these three little squares appear In fact, I can turn them all on all off and combinations of those if I want the way this works if you look inside of my code I've got some libraries to import including the display shapes rectangle library Then I set up the screen and I'm using this bg Which I'm just calling the background is a rectangle that's at the zero zero position at the full width and height And I've outlined it with white even though the fill is black Then I make these three shapes each of these are initially filled with black as well I set up a button for button presses and then in the main block of my code here I check and see if a button is pressed of those three when any of them are pressed the Associated box will change its fill using this command shapes dot fill and then in this case zero X F F F F F F which is white When the button is not being pressed then we return it to black and so it's a really quick and simple way to Draw shapes on and off of the screen inside of circuit python using shapes and fill and that is your circuit Python parsec Alright, thank you for enduring that. I'm pretty sure that the second one was easily five to seven percent better than the first one So thanks for for putting up with a live stream Glitch there, which was me all me not clicking the right button. Actually, it's interesting I think something changed in this setup because well, it should have had sound and then it didn't but But for me guys is hooray for display. I owe based parsecs. Yes, this is this is cool This is a neat way to do this. You don't have to move the objects. You just change change the colors also especially Effective on an OLED because we really just have these two colors kind of on and off a white or a or a black to work with on here so Let's oh nine point two percent better says rich said thank you appreciate it Sound wasn't off now says Michael. All right, excellent. So let's see. What's what's happening next? I Think what I want to do. Let me get a sip of water here. I want to do a quick Little gear plug sort of a gear report thing That is related to our project this week, so let me change out my screen here and I'm gonna Lift this up a bit and refocus There we go. I Used these little crimp connectors that we have for some of my wiring on this telephone project So I just wanted to give these a a plug These are kind of nice. All you do is feed some wire into it depending on the the thickness of the wire You've got a bunch of different choices here and then crimp down the end. I'm using a crimping tool That's not really made for this but works pretty well In fact, let me let me demonstrate this real quick. I'm gonna grab a little piece of Wire here and the crimping tool I'm using I can't remember if we sell A a crimping tool that is the proper one for that But I'm actually using this which has made for putting sort of DuPont connectors on to the ends of Of a wire, but if we take this this wire here, that's a that's a little long actually Let me make that so it doesn't go all the way through All I'm doing is twisting that wire a bit fitting this on to the end here and using the crimp in a couple of orientations and Now that's in there pretty good It's not really Coming out at all And I can now use this with other types of connectors. So the type of connector. I'll show you this Where'd you go? Oh, if I moved that I have moved that tray No, here it is So I was using some of these sort of a different type of Block, I think there's maybe called Euro block connectors and this is sort of a nice Improvement over just putting the bare wire in there that'll work as well But this gives you a little little more to hang on to so you can screw that a little flat head screw down in there And you have a pretty nice connection Todd bot suggests this crimping tool interesting Thanks for that So let me jump over actually to our Product page for these if I can find them. Let's see. Let's go to ater fruit go to shop What do we call these? Let's do crimp Connector it's probably under connectors. By the way, this is a search tip something I do If I find something that's pretty close, I'll click on the product and then I can see the Organization structure up here at the top so sockets and connectors is probably where we're gonna find this and then Depending on the size of the category you can you can scroll down in here. Oh Boy, I'm never gonna find it. Am I what do we call these? I don't have a lot. I don't have a sticker on here anymore No, it's not in that. Oh Okay, that's a failure of that that search technique. I got these from Adafruit, right? What do we call these things? Feral's Yeah, why are feral kit? Okay, that should probably be in in there And it looks like In this demo a little more probably just used some Needle-nose pliers I think to squish that down or maybe not a little more but whoever Put that together and there's a different gauges of these that you can use. So that's the little wire feral kit Feral's. Thank you, Johnny Bergdahl. You you helped me out. I appreciate that 800 pieces of them. Hey So that's not that wasn't meant to be another product pick of the week kind of thing, but it's just Kind of a nice piece of gear for improving some of the wiring depending how you're putting things together so Let's get on with the products or the project so you know that I've shown a couple stages of this project This is kind of the final one. This will be the wrap-up of this and I can show you a little more a Demo of how it's working how I've put it together for the final and what the code looks like for my dial-a-song project. So The basic idea is that as a self-contained Dial-a-song box in fact, it's even battery operated if you want to just have the phone and no wire coming off of it it'll work and This is what it looks like here the Idea here is to pick up the phone dial a phone number. Perhaps it's a phone number that you've been Given in an escape room type of thing and then a particular message comes back So it doesn't have to be a song I'm doing it as songs But it could be anything you want as a message that comes to someone based on Which phone number they punch in and part of the fun of this was using some of the real Tones for for pressing the touch tone DTMF buttons as well as dial tone busy signal ring and answer Even a message for when you've entered a number that doesn't exist So that stuff is easy to find you can just go on like freesounds.org or search in general online and find wave files of these and I'm using some of the techniques that we've looked at over the last couple weeks including our Mixer audio mixer inside a circuit python, which makes it easy to quickly duck sounds down and back up when we need them and I'm also using besides the buttons as a keypad scan matrix. I'm also using the switch hook so that we can hang up and pick up the phone and do different things based on that although Only when I put this all back together today I realized I I did way more complicated stuff in code that I needed to for that And I probably could have just had the enable pin of the feather board hooked up to that and that would have worked fine so let me jump over here and give a demo of how this is working and I'm gonna Double-check that You can hear it. Well, I'm gonna actually turn off this hopefully my camera doesn't overheat and turn off the fan It's it's yeah, it's still hot down here in Southern, California and I will also Fire up my discord So I can keep up. I can't see both Discord and YouTube at the same time on my phone here. I don't think so. I'm just gonna Prop up the disc the discord there. So here it is in action And I think I was worried about mic'ing this I was actually talking to see Grover about mic'ing it But then after making some some little changes, I think it's actually loud enough You should probably be able to pick it up on my lav mic, so Here a little bit and Actually, I'll switch you can hear that right So I've got dial tone playing If I hang up that Changes the dial tone and cuts cuts that audio actually sets the mixer volume to zero There it is and I'm not doing a hundred percent accurate I'm not doing like that little kind of pause you get and click before the dial tone comes So some of this you could refine depending on your your goals. So Let's dial in a number bringing and answering you'll see I have something I want to fix in code about that too Bartle beats song Could be louder So we can let it play forever I've just got little sort of short song segments that will loop forever Set that in code to not loop if you want So I hang up to cancel that now. I've got a Few other songs in there. I'll play some more And this is another little snippet from a Bartle beats song Daisy I think is this one and go ahead and hang up. I can do Songs here. This is street chicken on this one. You hear that I get a long Yeah, there we go street chicken I've got a long gap going there It's actually meant to be the ringing continuing and so I have something to update and fix in there. I think and Now what happens if you dial a number that isn't in its directory? so One other thing that I can't demo until I open this up to show you how it's all working is when This starts up if the phone is off hook we get that fast busy I think it's the beep beep beep beep beep beep beep beep beep beep beep one And like I said until I put this back together I was testing things with with a you know feather actually this one right here Sitting on my desk and it didn't dawn on me that I can't do certain things that I was planning So I have some updates on functionality to work here. So Some things I want to talk about with the project first of all The phone receiver here, so this is a classic Western Electric 2500 phone and It's actually the original Speaker element here from it that I'm using so this I think this is a maybe 800 ohm Impedance phone that we wanted to I thought I would have to change it out because our amp is meant for like four to Eight no four to eight ohm and this is what this is less than that Oh I can't remember now, but this one we thought it was out of spec Turns out it's not I think this is like point eight or something like that Turns out it works fine, and I'll show you the connection there. I'm using the built-in RJ 9 this is sometimes called it's a four conductor cable that gives us a pair wires for The microphone element Which actually just sets on those two contacts there, and if you pop this out you can see Those connections. Let me switch this camera over You can see this is the red and black wires go to the microphone and the green and white go Up here to the speaker, so I didn't have to touch anything in here I thought I might have to replace The speaker element, but it turns out that it is able to drive this just fine so I've got a I didn't go as crazy as the last time so I've just got through space there I've got a USB cable which means I can plug this in to charge up the battery that I have in here If I unplug that you see it's still working and I could also program it So this is running to the feather Which has the charger circuit built-in so we could still code that while while it's all put together So let's take it apart here Find a good screwdriver for that and I'll also say this is really minimally Invasive not as minimally invasive as my rotary phone project because you'll see I did have to modify the keypad And that's actually something I want to talk about in a little more details is what's up with the keypad These excuse me these screws are great because they are captive They they remain captive in the base here when you unscrew them, so you're not gonna lose them, which I love Okay, so if we look here Close the switch hook Let me show you that feature that doesn't really make any sense anymore, which is if I reset the board Find the can I get to that reset anymore? It's all kind of you know, let me let me take it apart a bit before I do that, but what you'll see here. I've got the original RJ 11 Jack which lives here. These are basically loose. They're just held in place by the case so you can just pull them out of the way And then run the USB cable through the gap in the back of the shell or that works pretty well And you can see I have a gigantic 4400 milliamp hour battery sitting here So this should last a long long long time Without the need for charging be cool for me to do a port here a USB port So I can plug cable in and out and have it be totally self-contained for whatever reason That's not necessary I thought I was gonna rest some electronics in there, but I don't need that anymore so the reason you don't see much here and Sorry, I forgot to bring one part. I think but We'll talk about the evolution of this this This Touchpad the keypad in a minute. Let me unscrew The keypad here. This is not the one that came in the phone This is the one that I ordered and it came in last week that is a Typical matrix keyboards an original part new old stock actually I don't think it's no it's like it was taken out of a phone probably, but it is an original keypad it's just not as old of a design as The one that was in there that freaked me out because this one's all mechanical switches these tuned inductors for the oscillators to do do the dual tone multi Frequency and there's not a good easy way to tap into that the way I wanted to so But what I am gonna do here, let's unplug battery and Now it won't now it won't be on and I'll unplug this USB cable too so I'm so excited about this the whole thing other than these connectors fit right on the back of the Keypad so there was the electronics that do all of the DTMF and they were connected via ribbon cable To the base of this matrix keypad, so I desoldered that ribbon cable Soldered in some headers, and then I was able to simply Plop on the feather wing here that has pretty much everything going on so that could be returned to basically original by Connecting the electronics that were meant to go here back on the back, but for my purposes this works great and then Let's take a look at the connections that we have so Everything on here could be restored because it's all just screw in to the what's called the network block here with these With these screws, so I you can see here I've got a Amplifier and I can actually plop that off of the board here So that's my little mono class D amplifier 2.5 watt and you can see the The receiver earpiece These are the two wires the green and the white wire that were coming from there To there to there. Those are just screwed into the terminals on on the little amplifier It has a little volume knob on here that you could sell trimmer And then could see I added some header pins to that to plug it into this feather wing So this is kind of a nice way to work with a feather when you're trying to add a circuit on the feather doubler here You get a little proto area so you can plug your feather in on one side and on the bottom you can kind of make whatever circuit you want so circuits Kind of three things going on here one I have wires running to the switch hook switch, which is Just a straight-up switch running to ground and pin D4 on the feather Which one is this RP 2040 so that's what I'm reading to see what the state of that switch is And that's the one that I could very easily and maybe should change to be the enable switch So it'll just turn the thing off and on it boots up quick enough then the next thing I've got are the connections for my amplifier, so this little amplifier just pops on there and Running on the bottom here. I've got connections to power Ground the a-minus goes to ground and then the a-plus goes to this little Sort of high-pass filter circuit and that just takes some of the high-end noise out of the the phone So we don't hear a wine So that comes from I just happened to use tx pin because it was convenient, but that is acting as a PWM Output for the audio you could do this using a different board like the m4 Feather m4 you could use the a0 pin to get analog you'd still probably want to to run it through a filter like this, but The reason I ended up going with the RP 2040 is it's got eight megs of Flash memory on there so that means I could store a whole bunch of these sounds which are some of them are fairly large Even even though I've made them mono and and Sam sample rates pretty low So this is running a 1k resistor from the audio output And then that goes to a filtering capacitor that goes to ground as well as a 220 ohm resistor that runs to the audio input a plus on my my little Mono 2.5 amp there and then Let's see the other thing is that you can see I've Put this little header On the bottom and that's just so that it matches up And allows me to use the matrix Keypad in pins. I think it's a1 through M o mo see so Rest of this is Connections there's where I use that little block and my little ferrule ends to go to this broke off By the way, this was a screw terminal. I could have used and the the brittle plastic Right here snapped as I was loosening that screw so that that originally lived there And it just connected up the earpiece and the and this switch So I have that laying out here this I should cover with some heat shrink or something like that That's just acting as a connection for me But other than that it's a pretty good fit I Probably could do better with how I have the USB because this this ends up Add a little bit of an angle here to fit the the USB connector for this feather Or I could have mounted it higher I also put in a couple of standoffs here so that this would stay put so if we Fire this back up. Let me just I'll show you just for fun because this is this it's kind of funny. This is sort of thing you come up with while you're designing a an open sort of non-enclosed thing You have access to parts and you're restarting it a lot I said, hey, what happens if it's off the hook when it gets turned on and so you'll hear that it gets Gives me this busy signal here So now I hang up and get my dial tone which was a lot of fun But I'm never really resetting the board anymore now that I'm not actively coding for it So that may be a feature that doesn't make sense or maybe we could randomize when that happens Let's see. So let's get That just popped back in there, I'll leave it partly open Oh, you know what in fact I'll just grab the feather and We can go over and plug that in to look at the code on it. I have the code saved somewhere else But this is this is the most Legit version of it because it's the one that you just saw demoed. All right, so let's do Actually, this is a good view for this now And I'm gonna turn that air back on because I can tell it's getting hot enough that my cameras will start to be angry with me Okay, so This one let's see this should work What we'll really care about is the code here But at least you can see what I'm talking about is that that word right there and Let's close this and open up there we go So you'll see actually there's some stuff still commented out here that's instructive of how I put things together Oh That's cute. I like this idea Todd and the discord said ever have ever you so often you pick it up You accidentally hear an ongoing conversation from another extension when you pick up the phone in here That your sister was on the other line. That'd be funny So looking at the code here I've got some fairly standard stuff I'm bringing in time random because I'm randomizing some of the delay there with the With the pickup while it's ringing Board for pin definitions keypad which is critical for reading the the key matrix digital I oh for Using the switch hook as a button the bouncer to help with that and Then I'm using audio core import wave file and audio PWM I oh so that I can play back audio on our And our RP 2040 chip. Excuse me. You can see here I also have code for that I can uncomment if I'm using the M4 another one that has an analog DAC output And then I'm importing audio mixer, and that's what I'm using to move the levels around This is actually kind of interesting. I was having some issues where With the speaker plugged into this when I restart There's a bunch of traffic going on with USB that can cause Noise on the on the PWM pin there. So you hear all the scratchy stuff going on On your speaker when you restart the board So what I did was have it wait three seconds before it actually starts the program for USB to settle down a bit Then I'm setting up the switch hook pin as that D4 pin a digital I oh, and I'm making that a debounce pin with a pull-up resistor then You can see here when I was using the keypad originally I had the Opposite Orientation because I kind of plugged it in using some ribbon cable from the top and so that set of rows and Columns I needed to change the row order Actually the rows and columns which pins I was using because I ended up connecting it like that So so I basically had to flip how I'm using the rows and columns which pins those talked to so this orientation up here That'll that'll that'll work with sort of a top orientation ribbon cable, and this is for plugging into the bottom Next I set up this dictionary Which is the key values or keys and value pairs the keys are phone numbers I can call Those are the four phone numbers that I have in here So again if you're using this to do sort of a cool message box With a game puzzle escape room then you could make any list of numbers you want I happen to make this look for seven digit numbers You could increase that pretty easily to require an area code or make it shorter if you wanted to simplify things But it's gonna take a long time for someone to just simply bang bang at the keypad and guess So they're probably not gonna just brute-force this thing so those have the Songs or wave files associated with them here and a little path. So on the circuit Python drive There's a songs directory that contains these It's also where I put the messages so you can see I have a thing called ringing and that's songs ringing wave Wrong number dial tone and busy signal dial tone is an interesting one because I was able to make an incredibly tiny file by chopping the waveform into just one cycle and now it doesn't look like one cycle because it's a Mix of two frequencies. So it looks like about six peaks or something like that But the the dial tone is actually also a multi tone multi frequency type of thing I don't have to have it playing a Seven-minute long one if I if I need to it's actually looping one nice seamless loop Same with things like busy. It's just one iteration of it. It's a couple seconds long And then I have these button tones so These are touch tones that I just found online you could record your own if you want and those are in this List so that we can call them zero through What 13 here or no zero through 11 Then I have some variables set up for storing which digits have been entered how many digits have been entered the sort of string That is just for debugging or when I was using a screen. We could see that I'm sending my audio out over the TX pin, which is a PWM capable pin could use any PWM pin You want then I'm setting up mixer and here you can see I'm using four voices Sample rates a little high here I could probably decrease sample rate on this stuff and and have even more storage But with the RP 2040 there's enough that I didn't need to worry about it the four voices I initially set to zero volume so this level is set to zero and You could see how I'm using those in the comments I have a dial tone voice on its own a touch tone voice the song or message that it's playing back and then the busy signal Initially I create some wave and wave objects that are grabbing things off of the disc and then Setting them to play so the dial tone just starts playing and it's looping The same with the busy signal those are both playing and then I can use the mixer to go between the two I set up the state for is the on hook happening or not and Then we check right at the beginning when I start up We're not even in the main loop to see are we going to be playing nothing or are we going to play the the busy signal? Then what to help what happens here is I have a another little function that I use a lot Whenever we dial in seven digits or hang up We want to reset things so that we go back to having a list of no numbers and the count of numbers at nothing And I also Found out that that's not enough. You also have to Clear the event queue of keypad. So this one right here Kiem dot events dot clear This is a really important one if you are using a keypad the way I am here When it's not when my code isn't accepting isn't really meant to be listening for Digits being pressed it's still Going to be storing them up in a buffer and if I don't clear that buffer out when I do start paying attention to the key presses again It just pops them in and suddenly we've dialed another number without knowing it. So events clear Is is a nice discovery that Dan put into the keypad library. So thanks for that Let's see. Okay, let me grab some water and then we'll talk about the main loop of this And let me know if you have any questions over in YouTube and in discord chat there So in the main loop what I do first check the debouncer for the switch hook Which is the switch hook dot update just checks to see what's happening in the switch hook And then we have two states if it Rows then it's because the receiver has been lifted. So it's okay to make a call So I turn up the level on the dial tone and I turn up the level on the second voice That I'm using for the touch tone So we actually hear both at once and I'll put this back together and demo it again in a second Then I am keeping the Message or song volume at zero and the busy signal volume goes to zero I set this little state variable on hook to false and then I reset the number So that means that if it were hung up and I was dialing stuff and picked it up I don't get those numbers that gets immediately flushed Again, this may not be necessary if I change my thinking and just have it actually turn off the microcontroller when I hang up Which probably makes a lot more sense the Switch hook fell That's when it goes back into the cradle and then I set all the volumes to zero and do the same reset if Mixer voice playing Then I will stop it and the reason for this is if a song is playing And I hang up and just change the levels when I pick it back up the song will keep playing It really lacked like I never hung up on that that call So this is a nice way to stop the song is just with this mixer voice whichever voice you want to stop hit stop You can also by the way check a mixer voice for its playing state So while it's playing you can do stuff because it can return whether it's playing and then have something happen Right right when it finishes or whatever you want So if it's not on the hook, which means if I've lifted up the receiver then we're okay to make a call This is when I start getting my button presses from the May matrix using this KM events get if an event happens means I've pressed the button I set the dial tone to zero I Think that's right. Yeah, when you start typing type in in numbers the dial tone goes away If the event was a press rather than a release It's the only thing I'm using then I check this is some stuff I went over last week or the week before I check the key to make sure it's not the star or the pound the way I'm using those you could come up with other stuff I'm using them just reset the number so if I if I dial in six digits and flub one I can hit star or pound and that just wipes it back kind of clears it without having to hang up Which isn't really all that realistic? but it's it's how I'm using it then if the Number isn't the star of the asterisk and I haven't dialed in seven digits yet I start playing the the the Multitone VTMF based on which button I press then If it's a nine If it's if it's under nine, it's gonna call the proper one from the array if it's the 10th one I am using a zero that's just to deal with the fact of the zero being the 10th object or the 11th object actually in the in the keypad the string here I just used for for Debugging and when I have the screen on it and then I increment that counter for how many I've hit when I hit seven then if the mixer Voice two is I will let's see set the Why am I doing that if not mixer voice to playing which one's mixer voice to oh If a song isn't already playing that's why I'm doing that. Okay, so this this means I can't Force it to play another song while one is already playing So I check if the mixer isn't playing then we kind of do the normal thing if it is then I just reset that number So I'm ignoring my input. We'll hear it beep beep beeping, but we won't Interrupt the playing song the only way to interrupt playing song is to hang up so if The song is not playing then I'm appending whatever numbers to that dialed string so we could print that If that dialed string is in my numbers dictionary, then we can go ahead and grab which whichever Item that is in that dictionary. It's that value is key Or that keys value rather which is going to be the name of the Directory song and the the message wave we're playing or song wave. We're playing Then we pause a briefly. We don't want to start playing instantly and then we play that wave file and you can see here here I've got oh Am I not looping those now? Okay? Let's see Oh the ringing. Sorry. So so this is the ringing here. This is the part I need to mess around with because I'm doing in a way that Initially I was doing it with a delay And so I was You can see answer wait time is a random Anywhere from four seconds, which is a little less than one full ring to nine and a half seconds, which is two plus rings then I Was using time on tonic to check it that didn't work out because it doesn't make sense Waiting this this amount of time here means that I can't really hang up on it if I press hang up I'll still hear it. So it's blocking. So I need to come up with a better way to do that the once it does Finish this though playing the ringing then it moves on to the song and that's grabbing the proper file and Setting the voice level to one and this one loops. That's why you heard heard the song looping there This else here is when the number is not in our list, then we play the wrong number The number of dial is not in service thing After it plays does finish all that then it resets the number and we're ready to go again so Let's let's see. I'll go ahead and hook this back up maybe not the full Fully plugged back together, but Jump over here Reassemble this a bit Enough to demo it and you can ask me if you got any questions. I'll pop up my discord again over here but this is a cool project, you know, it's a Lot of work between the prototype which just used one of these and a display To getting into the guts of the actual phone and making things fit. Luckily, there's a lot of room inside of these So so fitting isn't isn't so difficult But figuring out what What is what and now I've got some refinements to do since I Realized I don't have a way to reset it or turn it off. So that will Give us everything we need and I kept it pretty modular you can see that's why I'm using the headers on these and not soldering any of the boards down directly and So there's our little beep Hang up Pick it up. Let's hook the so let's see if I can remember the four songs. I've got on here Here's my 5551212 Okay, that's one of the songs off of Bartlebeats amplitude Street chicken You see it reflushes everything sets all sets all the counters to zero so you can immediately start dialing If I do if I do try to dial while it's playing a song you'll see I can Hit the hit the buttons That's the audio mixer at play But it's never gonna dial a number so I'm ignoring because we don't have a dial Hang up. We're back. Let's see. This is when I entered recently the nine second Bartlebeats song and Last one is eight six seven five three oh nine That's this a sensor realistic. It's giving me flashbacks He has a lot of good suggestions in the chat for songs to play I can't play any of them because we'll get copy strikes against us. So I'm playing original original songs either from me or from Bartlebeats on here and Then of course, I got to play this again because I love it. Todd. No way. I'm not doing a 900 number Remember joke lines. There's also dial a joke. We could you could do that too Oh All right, that is it. So that's the project. I'll be documenting that and and I've got some Fritzing diagram for the little circuit that we have going on there and some other stuff to share as well as the code so that you could build your own and I hope I hope someone does and I'd love to hear what you use it for. Oh, yeah Someone my co says he used to have zero zero two for the time zero zero three for the weather You could do information stuff a lot of interesting things you could do with this just Barebones simple, obviously. I'm not hooking this up to an Alexa or something like that or an iPhone I'm just doing wave files, but it makes it very nice and self-contained so that you could you could do a little Holiday things puzzle things spooky stuff haunted house escape room that kind of stuff and he always says you should use the Do the announcement in Lars's voice. Oh goodness All right Yeah, that's a that's another good point Todd says you could use this for your escape rooms and also dialing secret number to trigger relays or lights or something You could definitely extend this To do a lot of things since we basically have a microcontroller that knows what got dialed It's great and input device for doing other stuff All right, I think that's gonna do it. Thank you everyone for stopping by today. Thanks to our chats over in YouTube and discord Thank you Shashank Shekar says hi. I hope you're doing good. Thank you so much. I am That's gonna do it. Yeah. All right, thanks everyone and don't forget we have Actually, if you look over here in our in our discord, you can go to I mentioned the live broadcast announced to see what Shows are coming up. You can also do in our Live broadcast chat you can do question mark showtimes And you'll see that we have on let's see this Friday We've got Scott doing a deep dive at five and on Saturday at 11. There's gonna be a foamy guy circuit Python stream This isn't always a hundred percent accurate. Sometimes this is just Telling you what we generally do so do check and see if if there's confirmation from people I don't know foamy guys still around if you can confirm if you're gonna be doing that on Saturday, but People love those shows. So please stop on by for them. All right. I think that is gonna do it Thank you everyone for stopping by. I'll see you next week. Bye. Bye