 Hey John Park, it's time for John Park's workshop right here in my workshop. You and me, let's get together and make some stuff and look at some things and have some fun. Let's see, what am I up to today? I've got a new project. I also want to do a little bit of a walkthrough of a learn guide from the previous project. I'm going to do a little update on the Frogger situation over there and some ideas for the future of that setup and some things I've learned. What else? I've got a coupon code for you today. If you want to go to the Adafruit store and get some good stuff and get 10% off on it, I will help you with that. I've got a Circuit Python Parsec. I've got a one minute wrap up of this week's product pick. I've got a really cool, with this new project for today, I've got a really cool artifact of the 1970s, late 70s to show you. You might have seen it on the show and tell last night. You might also see it sitting right over there, but we'll get to that. When I say we, I mean me and you and all of us together in our chats, and if you're wondering where the chats are, you can head on over to either YouTube or to our Discord server, that's the main place where we engage with the chatting chatness. You can get there by going to adafruit.it slash discord and then look for the live broadcast chat channel. This is it right here. You can see, in fact, I've got the whole list of, or part of the list at least of the many different channels that we have. You can see that we have a general chat. We have help with channels for all kinds of topics, including CircuitPython3, printing, Arduino, MakeCode, robotics. There's also these topics such as the CircuitPython dev where the devs hang out and you could be one of them if you're interested in working on CircuitPython itself. And on and on. So that's our chat. Hello, everyone. Hey, DJ Devon, Catney, Andy Calloway, Mike P., Paul Cutler, Todd Bot, welcome and nice to see you all. Hey, Dave Odessa, nice to see you over in the YouTube chat. Thanks for joining us today. Let's see. What else do we have? I think... My monitor's freaking me out. I think it's tilted a little. Is that normal? Looks a little weird. So to start it off, I mentioned that we have a coupon code for today and that is it right there. Brain battle. Brain hyphen battle. That will get you 10% off in the Adafruit store today. Just head on over to Adafruit and you can poke around in the different product categories there. You can look for new stuff by simply scrolling down into this new product section and click on View All New Products. There's some banners that pop out some different stuff, some featured products. And you can throw some stuff in your cart, as long as it's stuff and not software or gift certificates or subscriptions to things, but if you get physical stuff, 10% off. And if you want to get free stuff, check this out, Adafruit.com slash free. There are some of the goodies that you can get if you buy enough stuff. So if you order $149 or more, you get a free KB2040. If you order $200 or more, you get free UPS ground shipping in the Continental United States. For a order of $299 or more, you get a Circuit Playground Express thrown in there. And these stacks, so you can get them all. If you do the $299, you're going to get the $149 and the $200 and the $299 freebies. So some cool stuff there. If you're interested in getting a big order put together, do it. It's how we operate, right? That's why I'm here is because we sell stuff as well as, of course, putting together content and libraries and code and examples and help you use this stuff. But the stuff is actually what brings in the money and pays the bills. So we appreciate it if you get some stuff. And you probably will too if you want to make things. So it's good stuff to have around. What else? Hey, speaking of stuff, right? That's the show I do on Tuesdays. Pick of the week. I grab a new product off our shelf and I put it through its paces and show you how it works. And I got a 50% off discount during the live stream only this week on this one. So those Neo-Key BFFs were going like hotcakes for half price. Here is a little one minute recap. It is the Neo-Key BFF. This is a little best friend forever add on for a QT pie. So take your QT pie, take your BFF, marry them together. This one allows you to take a Cherry MX compatible mechanical key switch, plug that into the socketed receptacles for the two pins there. And now you have a mechanical key switch. I've put it in a very minimalist configuration with header pins. So it's just plugged right onto the bottom. It has a reverse mount Neo-Pixel and then it has the sockets for a mechanical key switch to plug in. But you can see it in action. When I press it, it is glowing red and it's also sending USB HID command to my broadcast software to bring on a delicious plate of Neo-Key. It is the Neo-Key BFF. That's right. That's what it is. Speaking of which, Todd Bott proposed the question, why don't we offer snacks for sale? You want to order some snacks along with your Adafruit stuff? Don't order Neo-Key. In fact, just hand make it. Don't. Neo-Key is only good when it's fresh. We will not ship you any Neo-Key. Sorry. Let's see. What else is happening here? I'm just going to disappear my camera by accident there. There, I'm back. Well, let's jump into, I like to do these every week. These are the Circuit Python Parsec if you're not familiar with it. I like to give you a little tip or trick on coding in Circuit Python or using one of our neat little boards or add-ons or sensors or breakouts in Circuit Python. So I've got a neat little one here for you today. So check it out. Okay. For the Circuit Python Parsec today, I wanted to show you how you can read analog inputs on an AT Tiny 816 Stemma breakout board. So here you can see I have this neat little breakout board and it is running over I squared C using this Stemma QT cable to my feather, but that could be any board with I squared C really. It has a bunch of inputs and outputs built into it and we can talk to those inputs which are being dealt with right on board with that AT Tiny over I squared C to find out what's going on. So you've got nine analog inputs on this. You could add a ton of analog input to a project and then communicate over I squared C to find out what those knobs or other analog inputs are doing. In this case, you can see I have three little knobs wired up to it. And if you look in my code window there, it's reporting those values as I change them, knob zero, knob one, and knob two, but that could be up to nine in fact on this little board. And if you want to know how to do this, first of all, I'm importing seesaw and I'm importing the analog input class inside of seesaw. Then I set up I squared C on the Stemma QT I squared C bus of my feather. And then I create that seesaw object. Then I'm setting up these variables called knobs zero, one, and two. And those are analog inputs on the seesaw pins zero, one, and two. And then I'm creating a variable called K zero, K one, K two. And those stand for whatever the value is of each of those analog inputs. I'm also setting up a variable set to compare and that's the last K zero, one, two. And then during the main loop, what I do is I pull those three analog inputs and say, let's find out what those values are. Then we run this little test. We say, if K zero is not the same as the last time, or one, or two, then we'll go ahead and print whatever those values are and then update that variable so that it holds those values for the next time we change them. And you can see it's a really simple, easy way for me to add these three analog inputs. And then I can go and use these knobs for other interesting things like lighting and sound and USB interfaces and so on. And so that is how you can use the ATtiny816 as a STEMA board to read analog inputs inside of Circuit Python. And that is your Circuit Python Parsec. Hey, all right, we're back. I wanted to set up a big, huge board of these, but I figured this would be a little simpler to keep it contained, but I might do a project in the future where I've got a ton of knobs running over one of these little boards. A super convenient way to add that kind of functionality as you can see there. All right, so next up, let's dive into the world. This is something the Ruiz brothers do. I was watching their show yesterday and I really like it, which is a bit of a walk through of a learn guide. So this is, let me set this up here, this is my keyboard that I made, the little text pad, and I can give this some USB-C power, I'm just trying to pull the blue tack off of my USB cable. I was using that the other day to keep stuff from bouncing around too much on the desk. That stuff is sticky. So this is my little QtiePie RP2040 base text keypad. And this right now, you'll just see a light show. I'm not using it to send any or rather it's sending MIDI, but I don't have any synthesizer running right now so you won't hear anything. But the way this was set up, I wanted to show you the learn guide that I put together for this. So if we jump over here, you can see this got published yesterday and the demo video in here is sort of a little placeholder. This is a really cool little demo video that Noah put together, but he's doing a full blown video in his really beautiful style of project build videos and project demonstration videos that will be coming soon, I think I'll be out next week. But first of all, I just wanted to show this one. I should be able to play, hopefully you can hear this. Okay, so that's a little demo. Sorry about the flickering camera. I don't know if you're seeing that, but my camera setup didn't love the video playing there inside of a browser window. So that's what it does. In case you haven't seen some of the previous episodes. It is a MIDI keypad that can play within a predefined scale or set of scales, either single notes or chords. And you can play the notes together or play chords upon chords together. And this is something I built from scratch. So it is running on the QDPI RP2040 just to keep it minimal. And it's a great board for doing HID projects, be it MIDI or USB. And then I'm using these Kale low profile switches. Do I have any right here? No, just inside of the thing itself. I don't think I have any on my desk. But you can see here, these are key switches that look a lot like the sort of typical MX switch, but they're a lot shorter. And they happen to have a different footprint on the bottom. So we couldn't reuse existing parts footprints for this. You can see I'm also using our little reverse mount NeoPixels. I heard someone call them gullwing NeoPixels the other day. In fact, the person who called them that was this person, Sol, who is the designer of these hexagonal keycaps, said, oh, I didn't know those little gullwing NeoPixels would fit under the chalk. The chalk has a little window cutout for LEDs to shine up through. And in fact, these do fit pretty nicely in there. And those key switches that you can see here, those are really beautiful diffuse keycaps that I inspired the whole project really. And those are not easily available at the moment. I think they're going to be going into production. And so, no, I put together a 3D printable version of it, and we'll see that in a second. There's actually some instructions there for ordering them to be printed in clear resin if you want to have them made that way, which is nice because it really tight tolerances and a great look. So the first thing I had to do was build these parts inside of fritzing because I wanted to use fritzing both for visualizing the design on a breadboard and then putting together the schematic and ultimately putting together the PCB. So that process, I've got some links in here that show you other guides I've done about breadboarding and part building inside of fritzing as well as some links to places to learn more about that. The process itself is largely something that you create in a vector illustration program such as Illustrator or Inkscape. And by building things on a certain .1 inch grid with certain colors and layer names you can then import that SVG into fritzing and it kind of knows what to do with it and then there's additional setup you'll do. So there's the PCB or rather the breadboard version of it. Here is my schematic, let's go to the full size one that you can see here. And one thing I'm doing in here if you're not familiar with schematic setup inside of your PCB software or your schematic software is the use of net labels. So rather than have a million wires running everywhere, we can use these sort of little remote tags. So if I tag something with a net label that says A1, then I can go put that A1 somewhere else and it's down here at the bottom right you can see. That essentially prevents us from having to really run the traces everywhere. It wouldn't be terrible in this project because it's not a huge number of parts but it's helpful to get used to this notion. Same with ground you can see I'm not running every part to the one ground on the cutie pie that I have there instead I'm using these little symbols to do a sort of abstracted version of that sort of an alias for the ground rather than running all the wires to the actual ground on the board. And you can see these parts are all made up of essentially two things. I have the key switch which is a two pin switch and then I have the neopixel which is four pins dealing with the voltage, ground, data in and data out. And so once I've gotten that all set up here I can then start looking at the PCB building. Now you'll see the next thing I mention here is custom PCB shape so this is what your typical blank PCB looks like in most CAD software including in fritzing. We wanted something a little more stylish, I wanted something that would sort of fit the aesthetic of the hexagonal sort of beehive honeycomb type of shape here. And so I have a little link there that shows you the instructions for doing this which is again creating an SVG in an illustrator or let's say freehand inkscape and giving your objects and layers certain names and then you can import that inside of fritzing and it'll take over that rectangular shape with your properly designed PCB here. So there's a little link there that'll show you how to do that. Then I have a link going out to another guide I had done on building your parts and building your PCB so this doesn't vary from that that much, it's just the specifics of this board and you can see here I've got my seven switches, I've got my seven neopixels, I've got my cutie pie which most of that stuff is mounted on the top but then I've got the cutie pie mounted on the bottom and I just had to be careful to fit that in among things so nothing overlapped but it was just possible, just barely possible. And then I went and routed it so that's covered in that other guide but you can see here essentially in this top view, the green one there, you can see little traces running out to their different pads and then the bottom view there, same sort of thing, some of that is little vias that jumper a trace underneath some stuff so things don't cross and then the majority of that is a big ground pad so a lot of the components that go to ground don't need to travel across a trace somewhere, they can just locally have that big copper pad copper fill there and then I've got the fritzing file right there so you can see there, hex board v2.3.fzz, that is the fritzing scene or session file, now the nice thing about that is it is actually a zip file, you can actually rename, I think you can rename that zip, open it up and look at it and what you'll find in there are a collection of files that include the parts so it embeds the parts in there as well as the schematic view, breadboard view, and the PCB view so all that stuff lives in there, you can just download that and open it into fritzing, it should not yell at you about missing parts because they're all baked into it and you can also open that up and explore those files if you want to. Most of those are XML files or SVG files so you can kind of noodle around a bit although sometimes it's difficult to hand edit things and have fritzing still be happy with it I've found, I'm not sure if that's checksums or something else. Then I've got a link to a page that goes into the details of ordering a PCB, you can get them through Oshpark, JLCPCB, PCB Way, the Digi-Key, who else? There's a number of services out there and I don't know, we may have a general guide on getting your PCBs made and those are all places where you can do that. It usually takes a week or two and you'll get your PCB in the board, usually a minimum order of three to five of them depending and then we get those in and put them together so here you can see the first thing I did was solder in the LEDs. Now I happened to for reasons of fritzing not loving my part being a surface mount part on the bottom of the board with through-hole parts on the top of the board. It was making some selections difficult so even though these kind of are meant to be surface mount pads on the bottom of the board, they work fine in this case mounting from the top so the only downside there is it would be impossible to get in there and touch up a cold solder joint on the Neopixel if it happened because the key switch is going to get soldered right on top of it so ideally these would be in from the bottom but I haven't had any problems with these in from the top. You can see then the next thing I did was solder in headers and this is really important so this is for these header pins that the cutie pie is connected to and you can see I laid that down on the table and then pushed down the little plastic spacers so that it was flush and that's because I want the tops of the pins flush with the top of the board so that that one key switch will fit on top of it without bumping into anything so we solder that flush don't solder the cutie pie in yet just get the header pins in and it'll look like this so you can see there it's a little bit of a mess there's some flux and stuff there actually had to desolder some stuff and ended up with it looking not so pretty but it all works fine so you can see they're pretty tight tolerance in the Neopixel next to the sorry I don't think there we go my thing didn't refresh let me zoom in on this properly you can see the Neopixel and that one pin they're kind of close yeah and these are just an artifact these little three pads are an artifact of the cutie pie part when you put that in though they're not connected to anything they're not going to bother anything they're just there but you can see these are all soldered in flush so that we can then flip it over and solder in the key switches so here you can see key switches that one's right on top of where those pads are or those pins rather for the cutie pie and you can see see one of the one of the pads right there are pins right there so you'll go through and add all of those you can't get the orientation wrong which is great because the three sort of registration pegs go into the holes and then the legs fit down below and that is oriented so that the Neopixel will shine through the little cut out in the bottom of the the key switch these key switches happen to have a black opaque bottom so we want to make sure we're shining through those through those little rectangles that are that are cut out there so that's with with two of them in there there you go there's there's all four or rather all seven then we can solder in the cutie pie so come back to this solder that cutie pie in on the other side and nothing will be blocked and then you can also snip those little excess pins if you like off the top and touch up the solder if you like then we get to this is cool this is the the case build so you can see I I printed mine in a single yellow filament this is a PLA I'm forgetting the name of the one that I like it's a matte finish is it polyfill it might be the brand polyfill it's kind of a matte finish that I like the way it feels and looks however I sent this file the the model file to Noe Ruiz and he decided to adjust it so that it could be printed with multiple colors using some filament change post-processing in the gcode setup so on his page here first of all we've got the CAD files you can download the step file and the stl file I think the step is still in there and then there's some instructions here these are particular to cura but these should exist in any slicer package you use is how to tell it to stop after a certain layer and initiate a filament change excuse me so you can manually you don't need a fancy machine that does it for you you can just say okay pop out the old one put in the new one let it do another quarter of the height essentially changes again changes again so you get to do multiple filament changes and you get the really cool sort of b stripes kind of shape I just noticed in the chat Todd said polymaker matte PLA I think that's the one I'm using not polyfill yeah I think polymaker matte PLA is the one I use that I really like yeah I use their black a lot and I've gotten a nice blue and a yellow now uh so here's more info about how to set up where you're doing those filament changes there's also some support material that no I put into you might be able to see I've got some little fuzzies here because I printed without support in my USB jack but no way shows you how to use a little sort of localized specific support so that it doesn't do that which is great and then you can see here from the bottom side there are six holes for an m3 screw you'll use six five millimeter long m3 screws and then he's got the info about the printable keycaps so I would say if you can buy the buy the ones that Sol Beckett created they're amazing they're awesome they're also not available I think through most retailers at the moment so if you're impatient then um print them for now but maybe go back and buy some of his to thank the designer for their excellent design and there are CAD files for 3d printing the similar ones I think these are flat on top they're not dished like like these are these have a nice little scoop in them you might be able to see if I unplug a little better and these are made from I think HDPE which is similar to like a milk jug material and so they have they have a really nice feel very durable and they have great diffusion properties if you want other colors though you're definitely going to want to 3d print them no way shows you how to send these to PCB way to get them 3d printed and if you want these incredible looking crystal clear keycaps then you can use this UTR 8100 transparent material and then there are some specific settings on there I believe you can also do a translucent version of that that is um sort of frosted and I think Ann Borrella created one of the floppy disk cases for the um pipe portal in that material looks great really nice frosty translucent finish so I'm looking forward to trying some of those I haven't tried any of those resin prints yet then I've got a mirrored page there for your circuit python setup for the QDPI just in case you wonder we do not rewrite this page every time we have a setup in our learn guide authoring where we can mirror in one page all over the place that's a standard that gets used a lot so this is the circuit python setup page for specific to this board so we have one specific to each board so that gets mirrored into the guide there but it covers all of the specifics you need about putting circuit python onto the particular board that we're using in that guide then this one is specific and this is coding and using your hex pad so tells you what to download as far as libraries go you can also just download the project bundle so this link here is automatically generated when we PR the code up into the learn repo it collects up any of the assets and libraries and puts those into one bundle fonts things like that we put them all into that bundle but this is the code so I've gone through this before I won't go through it again right here and now but it's essentially a usb midi project with some specific lists of notes that you can use and I've also got some setup on here which is kind of cool I'll show that actually in the in the overhead real quick let's go to this view for a second so I'll play let me let me turn on a synthesizer you should be able to hear okay so you can hear right now let me make that a little less grating let's go to keys oh that's not what I wanted at all a pad how about soothing sure so you should be able to hear that's playing a chord there's multiple notes playing there with different routes and the particular mode which is the sort of set of of notes that are playing together in this case is I think I have it starting out in a major with a root of c so what I set up was you can change in code what it defaults to but you can also now go and press the boot button on the cutie pie which serves as a user button after after you get past the boot part of the process it just can be used as a user button so if I press that this now goes into a config mode and if I open up this view real quick and you can see in my this is not the code that's running here but you can see oh that that did it hold on I think I broke it one second and palette terminus and open the code file off of this why not and then disco tool to the cutie pie okay so I just press the boot button it says launching config and then choose mode so essentially right now you can choose one of the seven modes that are presets here so we can choose major minor Dorian Phrygian Lydian mix a Lydian and Locrian so I'll do a minor so it just said okay mode one now choose which octave so let's have this start pretty high choose the root note and now do you want chords or single notes so I'll say let's do single notes okay so now it's set up oh midi panic sorry that's the other bonus feature I didn't mean that to happen but when I press the boot button it sends midi panic which turns off all notes but we're now back to picking the mode so let's do minor what did I do octave root and single notes hopefully this doesn't break is it the hold on all right bad demo I need to check that maybe I got an error in my code I don't know why it's I tested it plenty so I think that's it for some reason it's not sending the and now it is I don't know what was going on there but I'll double check that later but that's the kind of cool mode select feature and this is something I've shown in Circuit Python Parsec before it's a really nice user interface method when you want someone to answer some questions you can run things in this while not mode picked so I set a bunch of variables for whether something has been some condition has been satisfied or not and then I just run through I say pick the mode and now we can move on at the end of that function to pick the octave and so on so it just waits there for for you to pick something okay let's try it one more time all right so we'll go about single notes yeah it's definitely not sending a note off let's just try that again but with chords maybe I screwed up the single note thing so mode octave root and chords yep weird I tested that plenty I don't know what I broke let's see the let's look at our play note oh is it when I'm releasing it let's see if the key switch is pressed send note off note picked yeah it does the same thing whether we're in chord or single mode so I don't know why all right well I'll I'll get to go look at that that's the benefit of actually demoing it live is now I've found a bug so back to learn guide here there's the code there's a little quick demo there like I said no I was working on a full blown one and then I got some suggestions for some different synth software that you can run all these are I think these are all free ones even open source in many cases you can use this with an iOS device I recommend checking out audio kit synth one super fully featured synth on iOS devices both iPad and iPhone and run on even a moderately oldish one so if you have a spare older iPad or something kicking around you can turn it into your synth machine there's some browser based software we can use as well as some full applications for Linux Windows and Mac there and here is my since I mentioned the configuration mode here are your it's kind of your map for when you're doing that so that's what the different modes you can pick are these are the different octaves these are different root keys you can choose I don't have a provision for doing any sharps and flats so if you want that you can add that just in the code by adjusting shifting your numbers and then there's the cord versus single mode and I got a little bit of a code explainer there and we talk about LED colors and then the main loop of the program so that is it that is the the learn guide for my little hex pad there I hope you like it and let me know if you have any feedback if you put one together or if you if you notice what I'm doing in my code that's making the notes not release single mode I'd love to hear it could be operator error too on my synth software there all right let's see next up I wanted to talk about the quick update on Frogger so I've got Frogger over here let's jump over to the main cam and I'll zoom up in on that real quick focus a little tighter that's it okay I'll turn off at least a couple of these lights just to get rid of some of that glare too so I've moved it I've moved this setup I've now got the arcade board with my little homemade wiring harness I've got the power supply this is the coin collector box which I don't have hooked up to it at the moment I'm just using a button it's just way more convenient and I got a speaker over here here's my monitor and then I put I can't remember if I did this last week but I put the two buttons that I need for ones the coin I'm just simulating coin drops with that and this is the player one start and the joystick those are all I need for Frogger I have two other buttons plugged into the harness there and I'll go ahead and power this on the main thing I'll mention is that I figured out the dip switches they are now that everything else is working it's much easier to test the dip switches they are exactly as the Frogger manual states they are so I had it set to the first two dip switches I think were off and off which was giving me 256 lives or something crazy like that so I think they're both on now which is three lives yeah the when I hit a credit now it'll say one player only yada yada yada hit start you can see now I've got one frog ready to go and two sitting in the wings there game over so before I was never experiencing game over because it was it was set to unlimited lives or 256 lives the next dip switch is the upright versus cocktail cabinet mode I won't demonstrate this now until maybe later I'll tell you about some plans we have for this in cocktail cabinet mode the idea is that it would be horizontal on a little table and you would sit across from each other and there'd be a joystick on either side so if you're playing a two-player game when it switches after each life to the other player it flips the screen upside down so that it's in the proper orientation for the other player so that I now have gotten that to work and I just have one sort of jump or wire connected that I was using to test adding a second player and then the last two dip switches are how many lives or how many credits you get per coin drop so last week I was thinking that my coin counter was sending out only one pulse when this wanted two pulses not really it just wanted 50 cents the the dip switches were set to say you need two coins per credit so I flipped those both of those dip switches I think to up yeah the last two dip switches are both up and that's basically one play per quarter one play per coin drop now and that's why now when I press it's immediately saying ding I got a coin and credit equals one before it was going ding still on credit zero and then I hit a sec second time so that's the update on that the fun place this may be going is we're looking at trying to do possibly some reading of the direct RGB and sync signals that are on the arcade board when they're in let's see do I have a board available no when they're in their digital mode there's a there's a red green blue and sync digital signal which then go through like a ladder filter to become analog but it's possible Philby's been looking into this it may be possible to grab those signals in their pure digital RGB sync form which can then be potentially utilized in a digital video setup which is definitely interesting I love CRTs but it would be really interesting to see the purest possible signal coming off of off of the video circuitry of that board so that's what's up with Frogger there the other thing I'm looking at is so as you as I've mentioned I think that board I have is actually originally a Konami scramble board and the ROMs have been swapped for Frogger it's actually a bootleg of Frogger called Frog and there are some modifications some bodge wires on it that I believe were used to allow the scramble board to play those ROMs I could be wrong on that I think I've read I don't know a lot about it I've read the scramble board doesn't really have lockout security like later boards where they didn't let you swap ROMs but it's a really popular board for ROM swaps are a lot of different games that can run on that board so I'm looking into what it would take to get some of the blank ROMs and a ROM eProm writer and do some other games I'd love to convert one back to scramble actually but we'll see if anyone has expertise in that if anyone's done ROM swap kind of stuff on older arcade boards this is actually pre-jama this is Konami classic but very similar to jama it's just the pin out is different but the the voltages and so on are the same let me know because I'm looking for some some assistance with with arcade stuff let's see all right so that's what's up with Frogger and then I wanted to introduce this new project I showed it a little preview of it yesterday so this is computer perfection this was a 1979 electronic game and I just picked one up they're not that expensive on ebay although if everyone runs out and buys one they'll they'll become expensive I'm sure but this was made by lakeside who did a number of other sort of electronic led and button pressing and sound effect kind of games this thing is gorgeous and I've got it taken apart right now the guts are out of it we'll take a look at those in a second but when it's put together opening that dome turns it on there's a little switch a little mechanical contact switch that the dome presses and turns it on and I can't remember if I showed this last night I think so the thing that amazed me I was getting ready to take it apart essentially the game even though it's pulled out once it's on all the leds light up you pick different games and then it's essentially pattern guessing and pattern memorization you press these buttons and it tells you if you're right or wrong or it lights up a different led and then you have to know that the triangle lights up the circles led and that's that's the game makes some noises cool thing is I went to go take it apart because Phil Tyrone said hey what about turning this thing into a synthesizer want to pick one up and see how it works so I opened it up unscrewed the two obvious screws that were right here thinking I was going to be taking apart a lot of other stuff and pulling this out as soon as I pulled those out this thing just magically hinged up like that which is fantastic motherboard there or PCB rather was in there there's a little piezo buzzer that that's what makes all the sounds I just desoldered the wires that run to the piezo and the wires that run to the switch so you can see there that's the little metal contact spring steel type of switch there that turns it on or off so after desoldering those I've got the whole board out and now we can start to look at how this thing works so let's jump let me do this I think I'll do that first from the bench and then we'll come back over here to look at some some things let's see where's my not that one that one all right let me jump over there so I can turn this plate back on here okay let's let's dive into this actually pulled the the four-bit microcontroller that was in there and I and sorry I've left that in my studio office so it's not here right now but you can imagine zoom in here right here in the center was a microcontroller well I see that I've started to diagram how it's connected to the board but essentially look like that it's 28 pin and I've got the the number of it someone wants to look it up I think it was made by Panasonic the reason I'm mapping it out is that this thing has essentially one pin per switch so these little metal switches here are what get pressed by the blue buttons in the game and when those are pressed they're closing a contact between a common pin so all 10 of those share a common pin and the individual switch that's getting pressed as you can see this beautiful hand routed board here with these great squigglies on here the interesting thing is that this does not share or rather this does not have a separate pin per switch and led they actually share pins and I believe what the microcontroller was programmed to do was flip back and forth between a input and an output really fast so fast that you couldn't see that the leds were flickering but but essentially they are because every one of those pins I think is watching on an interrupt and when an interrupt pin notices that you're trying to use it as an input it for a moment checks all of those switches and then does whatever the game does when that switch has been pressed and then flips flips back to lighting whatever leds were lit so essentially the input pins for these buttons are there are 10 of those and those are the same exact 10 that are used for the outputs on these leds through these resistors these are 1.5k resistors this thing ran on two nine volt batteries that the battery cover of course is missing there I might 3d print something if I end up reusing that however what I measure uh there are there are two separate inputs for the battery voltage they're not running combined or anything they're not in series so what I've seen is with the board powered on normally we're getting like nine volts nine volts seven seven seven seven I think those sevens are all of the output mode of these button switches before they get pressed so I'm assuming that that roughly seven almost eight volts is what these leds are running on given their given their size of their resistors and their brightness I've tried just giving these three volts they're very faint five volts are very faint so I think those want closer to eight volts these two here are my piezo buzzer outputs and then I also temporarily soldered in a little slide switch where the the leaf switch was so that I could test that out so what I've started to do in in mapping out where these run is I've I've got essentially my buttons 0 1 2 3 4 5 6 7 8 and 9 so those are the 10 buttons and they all use this pin 21 here as their common so what I'm doing is checking the value of the common pin there which these are going to send a current to when they get pressed so I've got that hooked up to a little metro m4 right here I'll just demonstrate that real quick I've just got three yeah just three of those pins wired up right now and I'm going to switch over to this down shooter view of the world yeah we'll use that for now ignore the code that's there for the moment but I'll plug this in I just have to find the right cable there's one that might work okay so let me grab by the way if you're not used to this when you're if you're using a to or disco tool in your terminal to look at the serial output of a circuit python board that you have plugged in if you plug a different board in if it's got a different name a different usb port it's not going to connect automatically to get out of this it doesn't tell you this is when he's mystical things control t followed by q and then it says control t followed by q will cancel you out of the the session there and then we can rerun that now with me for metro so this should be watching for button presses now I can use my little and I've got I think zero one and two yeah so these these three pins are connected uh and I earlier tested giving it like five volts to uh run to those leds by flipping the input to an output um that's kind of slow to do in circuit python and I don't love that it's confusing and complicated and I'll have plenty of pins on my uh metro to run the leds kind of normal so I don't think I'm going to do that that um twiddling back and forth thing so I will probably end up severing uh traces on each resistor that runs the leds so I can just run run all of these two ground and an output gpio pin I got it working but it's I don't love it it makes the code complicated in it and it confuses me so we'll see maybe someone can talk me out of that but um by the way one thing I didn't mention is that this game was designed by Ralph Baer who is often considered to be the father of video games I believe he built stuff for Magnavox I think the Odyssey might have been his or even earlier like kind of prepong stuff often Nolan Bushnell uh who later formed Atari is also called the father of video games or Ralph Baer was a really uh important influential designer and he designed this this uh game as well which is pretty cool you go look him up or search search the computer perfection um sort of retro blogs that write up about this kind of stuff uh so you can see in my code here uh and it's big and messy at the moment but what I'm doing is I'm setting what I call pin 21 and that's just to map it to uh the 21st pin slot of what the microcontroller was in there by the way one thing that I've got happening here to make my life easier is that I'm using some of our stacking pin headers which happen to fit uh into the socket they're 0.1 spacing 0.1 inch spacing and they're thin they plug into the uh dip socket there and then I can plug in regular jumper cables into those so that's a way for now that won't be the permanent solution but that's the way for now for me to connect to this pretty easily uh so that pin 21 I'm I'm creating that as a uh an input pin with a pull-up resistor so that one is being read uh to see if anything is happening the other three pins I'm setting up as outputs so uh the pin running to zero one and two which happen to be pins zero one and two on the metro that was just to to make my life a little easier remembering who was connected to what uh those are outputs so those should be sending 3.3 volts when I press this button what I'm doing is I am periodically setting the value to false and then checking to see if this pin got an input if pin 21 got an input so that way all of those can act as outputs but we kind of are sweeping through and checking okay who was it who did we check just then so it's kind of pulling it through um like uh sort of like a way a matrix works so it runs through and checks which one got pressed um you can see there I've also set up some just temporarily some MIDI outputs so I can have it do something and I can hear if something's changing so if I run over to my MIDI software real quick and and say yeah use the use the metro as a that is a device okay so it's just running a little arpeggiator when when a note gets pressed and held um so what I wanted to do is show you part of this investigation process since it's such a uh a cool looking PCB and fairly simple let me bring in a uh image viewer real quick let's give me one moment to set something up I just need to open some images and find them first where are you okay so a little smaller and bring in let's see if this will work this might be a good way to do this I'm just setting up the edges I think it'll let me kind of slide show it yeah that should work okay one moment all right preview there we go okay this hopefully this will this will help uh so this is the bottom of the board mirrored uh so that I can look at it in the same view as the top so I just took a photo of each of uh the top and the bottom of the board kind of aligned them in photoshop um and then I erased everything except for the components so that that lets me kind of flip back and forth and I kind of made them slightly translucent so that helps me just look and see okay those metal uh switches there those contact these can you see my cursor yeah those contact these so there's one side of each metal contact that's actually just soldered to the board but has no traces that's just mechanically soldering it there the other side goes to the common so that that in this case is that pin 21 so that's the common for all of those and then the individual pins are what's in the center so you can see those metal switches hovering over the pins that they contact and then what I started to do was just color code these I'm just literally there's no magical way to do this I'm just tracing over stuff real quick with a mouse it'd be so much easier with a Cintiq or a Wacom pen but I just happened to have been using a mouse for that um and so that shows me the pinout of uh of the socket there going to each of my 10 switches uh and then the thing that I just started to do is you can see we've got these three nice um actual switches not not buttons not momentaries but these um three position switches uh so I want to figure out okay actually this one's four position where do those go what how can I use those so um part of my process is just tracing them visually uh and then I can go in and see what they or I can look at it or I can use the continuity mode of my uh multimeter to just check and see okay what gets closed when one of these is in a certain position um and that means I'll be able to potentially use these as one two three four five six seven eight nine ten different uh parameters that I could set uh the idea with this is to turn it into an interface for a synthesizer running on knock wood the metro m7 so I'm going to be talking with uh jeppler about potentially using the m7 to generate um waveform samples like single cycle waveforms that can be played back in circuit python on the m7 and I want to use these for parameters so if I want to maybe change the shape of the waveform maybe I have four waveform shapes that I can pick with this and I can do uh some different envelope things with these uh modulation with that one and then press my different buttons uh and also light up leds so that's the goal with it um this is part of the process uh the other part of it is also brought it into fritzing in fritzing by the way you can just say hey I'm going to grab an ic I'm going to make it 28 pins long or whatever you can pick from this kind of hilariously long drop down menu enumerated list of pin numbers it doesn't let you type one in you just pick from from a list so you pick a 28 pin ic and then you just start labeling it in there which is similar to to this uh sort of approach that I have just on on paper so that'll help me too as I start to integrate that with the uh with the microcontroller um let's see uh what is what is Todd giving me grief about all right we need to cut to the we need to cut to the uh the chat here for a second tuts is good luck with that jp you're saying good luck with the synthesizer thing uh oh well you know what single cycle waveform may be my I may have imposed that idea on it actually Lamar and um Jepler said making samples so not sure what what the what the synthesis mode and method is going to be there so yeah timing might be rough with single cycle waveforms um so we'll see uh we'll see how that goes of course I can always fall back on midi or um sample playback of you know wave files or something but be really cool to to do some actual synthesis uh on this thing so uh that is pretty much where it's at sorry I left the the actual microcontroller chip uh in the studio inside so I don't have uh have that to show you I can't remember if I've got any notes I don't have any notes up about what it is but uh yeah I'll show that next time if people are curious it's a four-bit microcontroller um Todd bop might remember we were talking about this earlier do you have notes on that let me let me look real quick it was heck was this thing scrolling scrolling um by the way hold on this is can I show this yeah let me show this um that is sort of the beginnings of my um schematic in fritzing you can see I did not use net labels here just because I wanted to to really visualize where things were connecting I did use it's not color coded the same as my my paint over there uh but you can see I did start to color code stuff because I noticed that fritzing does not draw very big uh junction uh points so it's hard to see where stuff is crossing and not connecting versus connecting so I used some some color there to to help but you can see this is um this is me trying to figure out the led situation as well as the switch situation so that blue uh pin 21 there that's the common that's running to the two switches or calling them buttons your own button one there uh and then they each run to unique pins uh in this case pin 15 and pin 2 the leds however have this uh what should I've labeled as 3.3 volts that should probably be 8 to 9 volts um that is running through the resistor to the led and then that is going to need to have the um the pin twiddled to um sink that uh to ground so the led can light up when it needs to light up um let's see let me see it's an enmos microcontroller that I remember I found a website with a schematic of this thing so mn 1400 m is in michael n is in november 1400 yeah actually you know what I'll just take that little squished image and drop that in there uh yeah so that is the mn 1400 made by I think it says mezzoshita on it and also panasonic on the board um I think they're one and the same so imagine that flipped on its side you can see uh what which of those were used as different uh io pins um there's the ground and voltage to the microcontroller itself which I kind of don't need or care about since I'm going to be using a separate separate board there um and yeah vj piss pussy cats says you can always bend it add stuff at the risk of destroying integrity of it I think I'm going to like I said I may end up cutting some traces and just um bodging my uh leds to unused pins because there are a number maybe even 10 unused pins on this 28 pin thing should be maybe no maybe not because of those switches those those eat up a lot so the buttons are 10 the switches are what did I say like another 10 so I don't have enough to to use um route through that but it doesn't matter I can I can bodge to it so we'll come up with a way anyway that is uh that is the glorious and beautiful computer perfection dome uh look it up because this thing got used in some episode of buck rogers and the movie ice pirates just as a background prop because the designers of the of the day saw that and said oh yeah that's uh that thing looks beautiful I got to use this thing so and that's why we grabbed it it looks beautiful all right uh I think that's going to do it before I go I'll remind you if you want to go get some parts maybe you want to build your own maybe you want to sign up to get a metro m7 when they're in stock those should be I don't think they are right now but those should be coming back in stock uh maybe they are I'm not sure we have that new dvi uh rp 2040 feather this little dvi hdmi socket on the bottom that's a cool one also uh coming out soon so sign up for that one but if you want to get some current stuff some things that are in stock uh use that coupon code right there on your way out brain battle I did that backwards ready brain battle why'd I call it brain battle that's one of the games on it's one of the four exciting games that you can play on this thing countdown black hole brain battle and light race uh so type in brain battle you get 10 off at the eat fruit store on your way out all right well hey thanks everyone for stopping by and hanging out in the workshop today uh I will be back next Thursday uh to to poke around with this some more and show some other cool things I will not be here on Tuesday I'm going to be out Tuesday so there will not be a product pick of the week on the what is it the fourth but there will be on the 11th uh so I'll be back the following Tuesday at my usual time four o'clock eastern one o'clock pacific 15078 swatch beat time I made that up I don't know what that is all right thanks everyone for stopping by 484 industries I'm john park this has been john park's workshop I will see you next time