 and welcome to the show it's me JP and this is JP's product pick of the week so before I get started what I want to do is send you to the page where you can pick up this product this week that's the URL for it right there that's the QR code if you want to point your camera out there and land on the page and what you're gonna see I know this gives it away a little bit or a lot but what you're gonna see if you head to that product page is the product pick of the week and it is on discount just during the live stream only so if you head over there you can pick up one two three five ten of these at a super 50% off discount price but I think I've said too much already so let's back it up a moment and ask lady Ada to tell us all about this product pick take it away lady Ada this breakout lets you plug in a cherry MX compatible switch like you see here this is a Kale box switch which is cherry MX compatible you plug it in to the breakout board and there's on the bottom you can see on this photo there's a socket and so the switch doesn't get soldered in it actually kind of press fit plugs in there was also on the bottom you see that white square thing that's a neopixel and there's also a diode and the diode is what lets you create key matrices with this thing and the neopixel you see here there's this kind of like you know there's the two sockets on the left the center is the the mounting post on the right there's actually a little slot in the keys and the key itself is meant for like having an LED miss the soldered in perhaps but you can also just have a reverse amount neopixel shine through and then you can kind of backlit the LED with RGB colors so you have a QDPI board you know it's just using Arduino or you can use circuit Python whatever and these are the keys and I'm just gonna remove them to show you that the key itself plugs into the socket so this is the key and it's got these two connectors and that those when this key is pressed those connect together and then there's the mounting post where to keep it mechanically stable so you can plug it in and then you know it's pretty stable I would say look you want to have a glued or taped or something to keep it from coming apart because you can pull it off and here's another one so you have two of them connected together and then on each side you have multiple pinouts there's power and ground here these are for the neopixel and then this white wire you see you know goes in here and then chains over to this one that's the neopixel data line so just like neopixels you chain them together this has neopixel data going through and then you have two pins for the switch the top and the bottom that and in the cathode of the switch again there's a this diode in the middle so you can make key matrices if you're not doing key matrices you can just ignore that died there to avoid key ghosting if you're making a complicated matrix but basically you have one pin for every switch and then for this demo when you press the key the LED turns off so you know you can just use it as a switch and then control the neopixel separately so there you know the neopixel is not connected to the switch at all they're totally separate you can have the neopixel all the time off all the time you don't have to power if you don't want to it's just kind of a bonus extra it shines underneath here's a demo of the opposite when you press the button the new pixel shines through so basically a breadboard friendly way of connecting a mechanical key that is cherry MX compatible to your breadboard all right I'm convinced in fact I'm gonna run over to my mystery cabinet of wonders and grab one so that we can have a look at it and do a little bit of a demo I'll be right back yes there it is my product pick of the week this week is the neokey socket breakout for mechanical key switches it has a neopixel built into it so that can underlight your keys it has sockets so that you can push your mechanical key switch into it without soldering and then you can try different switches out whenever you want and it also has a diode built onto there to do diode matrices and it has pins for soldering in headers so that you can plug it into a breadboard for prototyping it is perfect for prototyping key switch arrangements in fact let's have a look at the key switch and breakout itself and then a little bit of a demo that I put together on a big old breadboard camera view here of it so you can see there is a little set of sockets that's actually what one looks like bear on its own there's the kind of key cherry MX compatible key that'll plug into there you can see our little neopixel pointing up and underneath and there's little sockets these are the pins for breakout plug into your breadboard so I'm gonna go ahead and fit this into here you just want to align those little legs they're a bit delicate so you want to make sure those are aligned and then gently press in and it's stuck in there mechanically and electrically of course this can come back out if you want to try a different key and now you'll usually place a little key cap on top of there and it's nice to use ones that are made for lighted key switches so this one's just perfectly translucent you can also get ones with little window cutouts sort of like this type here they have a little light pipe kind of window let's take a look at this board so this is a big old breadboard and pull my camera out and focus that so you can see layout on there that'll work and I'm just gonna refocus that a little bit it's good so what you can see on this one is I have an itsy-bitsy m4 plugged in this will work with nearly any microcontroller because all we need are digital pins to read the switches and some neopixel compatible pins and I'm running circuit python on here you can see the arrangement of wires is essentially this blue line is the neopixel connection so that runs in and then out in out in out in and I also have a blank spot here that we're gonna plug a switch into in fact let's go ahead and do that now so you can imagine we're doing some sort of like an ergonomic layout and so I've got a switch here I'm just gonna align that left top left there with power so that's in fact it's it's duplicated on top and bottom some of these so that you can have more flexibility in your arrangement on a breadboard or a perma proto board how I'm using it is power and ground for the neopixel or here the input for neopixels is blue one at the bottom and then I'm using a ground for the cathode side of the switch and the anode side of the switch is this gray wire running into one of my digital inputs on the itsy-bitsy so I'm going to plug that in and what you see is I have the animation led animation library running on here so we get some cool effects right now I'm doing a kind of pulsing pink something else is interesting is that I have these set up as usb hid keys so these are sending shortcuts to my broadcast software which means if I press one we get this current camera view of me in the corner two it switches to a duplicate three is that little product webpage four goes to a little product photo and five clears that layer out entirely so the way that's working is just simply sending the numbers one two three four and five and then I've assigned those as shortcuts inside of wire cast here and you'll also notice as I do that I'm switching the animation so here we have this nice little chase animation we have a blinking amber I have pulsing between three colors color change and this is a sparkle pulse which is kind of nice so we'll bring me back there now if you want to see how this is coded I'll jump into my circuit python view here and I'll just bring up a smaller camera so what's happening in the code I'm importing time so that I can do any timing based things that I need to pause or something like that importing board so I get the definition of the pins importing neopixels so we can drive those neopixels using digital IO digital in and the pull it's a pull down resistor that I'm using then I have the debouncer that allows me to do things on key presses and key releases then importing usb hid and the keyboard and keycode libraries so that way I can press hid keys then I have a bunch of different led animation library imports here and then here's what happens for the setup I'm setting up the essentially the key pins are separate from the neopixel pins so even though you have sort of both of those things built on to here they're essentially separate circuits and you can use one without using the other so I import the key pins and I have those on board d12 11 10 9 and 7 and then I'm creating the debouncer on each of those pins and then I'm setting up the neopixels on a5 that's the pin that's running out and into the first of these switches and then they sort of daisy chain along and I'm setting it to have five neopixels in the strip set up the neopixel strip and then I'm setting up these different animations I'm setting up an animation sequence and that's actually what I'm cycling between when I hit each key I'm going to a particular sequence pulse chase blink color cycle and sparkle pulse and then I'm setting up the keyboard device now when we're actually running in the main loop of the program here's what's happening the animations animate just says keep looping whatever animation is current from those sequences and then we check all of the five key switches so for I in the range however many key switches we have there in this case five we will update that's the debouncer checking to see if anything has changed if something is changed like we've pressed a button that's the fell condition then I'm printing to the serial port which one I pressed and then I'm also keyboard send the appropriate key code that I have in this little list that I built here and then we animate we set to the current active animation so what I'll do is I'll open up my serial view here and now when I press the keys we should see zero being pressed and released one two three and four and you'll notice my little animation cycles are changing it's not changing my camera views right now because that's based on focus so I'm pressing a one two three four and five in fact we can watch them get typed in here as I press them but since I don't have my broadcast software highlighted right now or active it's not changing the camera views like it did before and that is it that's what happens in the code it's very simple we have the web page set up here like I mentioned before if you want to go and find out more if you want to go and order some head on over that's the product ID 4978 and that's about going to do it so let's jump back into this view here uh and let me pull one of these apart that is my product pick of the week it is the neokey socket mechanical key switch breakout and I'll go ahead and place that on my wall of stem of qt goodies and others and that's going to do it for another jpeas product pick of the week we'll see you next time