 Hey, is this thing on? Hello everyone and welcome. Hey Dexter Starboard and C Grover and Mr. Certainly over in the Discord chat and hey everyone over on YouTube. Hey John O. Nice to see you all. Yeah, hey I'm back. I flew all the way to the East Coast and back here and boy are my arms tired. But seriously folks, it's great to be back. Great to have you all here. I'm excited about our new product pick of the week this week. Hey doctor, nice to see you. I'm gonna have a sip of delicious ice water. Mm, boy that's good. Refreshing. So let's do this, shall we? We're back, thanks for letting me get away for a week. It was nice to have a little bit of a vacation and now we're gonna dive into it. So, how does this thing work? If I remember correctly, what I'm gonna do is let you know that if you wanna watch the show from inside the product page, you're gonna get 50% off discount during the live stream. All you have to do is head over here to this QR code or to this URL right here and you will jump on over to the product page. You can watch this show from inside the product page and that's pretty darn cool but you can get that 50% off on this product this week. It's a discount that's only good during the live stream so be sure if you're interested in it to load up, I think you can get a maximum of 10 of them during this special pricing, no reseller prices or no reseller sales just for the people, the people who want this product. But before we go any further, why don't we find out a little bit about the product from Lady Aida. So I'm gonna have Lady Aida take it away. Niyuki, one by four QT. So, how do I explain it? Basically, you wanna add mechanical key to your project. You don't wanna time, you maybe only want four key switches. You want new pixels with them but you don't wanna do all of the like the wiring for it. You want to have it over I squared C and maybe also wanna chain it with more of them, right? You can actually connect multiple of these. So this is a way of very quickly adding four mechanical keys with new pixels to any board. It has a C-style microcontroller on the underside which does the I squared C to new pixel and key switch conversion. I've got my QT Pi here. So it's just something that has an I squared C connection and this is running Arduino but it works also with circuit Python just fine or Python to use with a Raspberry Pi or what have you. And each key has a neopixel underneath and this demo just when you press it, it does a little neopixel color swirl. So that's the demo and you can have multiple keys pressed at a time. They have Kale sockets. So these are socketed so you can use any Cherry MX compatible key. This is I think Cherry black or Kale black, I don't remember. And then of course you put your favorite key caps. Maybe it's a little kitten key cap or maybe it's these translucent ones so you get the glow through. And you basically have a very easy way to add four key caps. Okay, so key switches to your project and then the I squared C comes in. This is the chip that handles all of the key presses and the neopixel stuff. And there's address jumpers here so you can close these which allow you to connect multiple boards to one I squared C port. So you can have up to 16 of these on one I squared C bus. So if you're not enough to make a full 108 key board we're making like a macro pad, right? And you just wanna really quickly get a bunch of keys together without much soldering. You just plug in your favorite mechanical key and you have plenty of mounting hole options. So you've got four mounting holes on the corner. You can also plug into a breadboard if you don't want to use these cables for easy purporting. I just think it's like a fun way to get mechanical keys into your project without any key matrix handling without neopixel handling. It's all done for you. Hey, wrong button. Yes, so the question, the important question that doctor asked in the chat was did Lady Aida grow an extra hand in that video? I think that was PT's hand visible there but I thought the exact same thing. How about that? So I'm gonna go grab one of these myself and then we'll talk about this. Am I really muted? That was weird. Little thingy looked like it was going. All right, let's try that again. The product pick of the week this week is the NeoKey 1x4 QT, I squared C mechanical key switch board. It has four sockets for placing your mechanical key switches and it has four underlit neopixels. So you can plug this into any board that has I squared C and particularly convenient when you have STEMI QT connectors and you can plug in your key switches to the board. So there you can see I've got a set of four key switches on there, a couple of red ones linear, a couple of black ones, a little tougher to push and some different key caps on there. So what I wanna do is jump to the overhead here and we can take a look at this in action. So here you can see I've got a little QT pie and I've plugged in one set of our NeoKey 1x4 to there but since we have address jumpers for I squared C there I can in this case change the I squared C address for a second one and plug that in as well. So I'm gonna go ahead and just plug that in using a little STEMI QT cable and then I'll reset the board there and those should restart and then we'll be able to use all eight of these keys. So here you can see I'm not actually doing anything other than changing NeoPixel colors when I press but you could set these up of course as HID, as general IO, as MIDI, there's a lot of uses for these and in this case I have I think a maximum of maybe it's eight of these that we can plug in or 16 I think lady had said that. So you could get a pretty big array of these you can mount them to something using the little mounting holes on there you can also put these into a Perf board or a breadboard using the header cable or a header pins if you wanna solder those in. Now to show something a little more fleshed out here I've got a little demo board that I've put together and so what I have here are this is the NeoKey 1x4 QT plugged in over I squared C to a feather board and then I also have some of our little rotary breakouts here little rotary trinky breakouts and so what you can see here is I have some key caps that are relegendable which means the little plastic tops pop off and you can print something out and put a label or a sticker under there. So I've set this up to be a little keyboard shortcut board for use inside of Photoshop. So as you can see here I'm gonna go ahead and switch over to Photoshop which some things were acting really slow when I was trying to screen capture it and show it to you so we'll see if that still works. So right now you can see I have a little eyedropper tool picked there and if I press this first button I switch back over to a brush switch to the eyedropper this is the eraser tool and here is a gradient tool so if I go to the brush here I've also set up my little rotary encoder to be a brush size normally in Photoshop you can pick that with a slider but you gotta go click on it or you can use the bracket keys to go bigger and smaller but now I have a little rotary encoder and I can also change the softness and hardness of that brush. So I can go in here and paint a little bit and then let's say I wanna switch to blue I'm gonna hit my eyedropper, grab blue switch over here and start painting in oh did I get blue? Doesn't look like I did. Oh that's weird. What's happening with the eyedropper? Okay eyedropper, oh I'm on an invisible layer how about that? Let's turn that back on, okay. That's better, I was in a funny mode. Okay so here you can see I can paint in blue I can hit my eyedropper, switch over to this pink switch to a different brush maybe change the size of that paint in there a little bit and we can go in a race so I'll switch over to that eraser with this little shortcut and then we can start erasing. If I hide this layer here you'll see for real erasing straight up erasing. So that's one use of this is just as a little shortcut keyboard and I'll show you how that works it's actually really straightforward in whatever app you're using in this case Photoshop there will usually be some keyboard shortcuts in this case B goes to the brush I goes to the eyedropper tool E goes to the eraser and so on. So if we look at the code here inside of circuit python let me switch, put on my glasses in this case I'll go over the more standard case in a second but I'll just show you in this case the key things being I'm actually using the debouncer in this case and when I look at what happens during the main loop of the program I have things like if key zero rose which is a pull down so it rises when we press it. When that voltage rises we print to the serial brush just so I know that I did the right thing while I'm debugging and then I'm changing the neopixel color I'm setting all of them to white except for the current one which I'm latching to a color that's unique for that button and then I'm sending this key code this is using our USB HID key code commands to send a key code B and we have I set up for eyedropper E for eraser, G for gradient and so on. Now let's look at the sort of standard example so I'm gonna bring this back unlike some of the typical ways that you'll use buttons plugged into GPIO this is using our seesaw over I squared C so a lot of the heavy lifting is done for you by the seesaw library so here you can see in circuit Python what's going on I import the board for pin definitions I import this Adafruit NeoKey library and from that I'm grabbing the one by four so we have room to add other specific types of boards and I'm importing that object as NeoKey one by four we set up the I squared C bus and then since I'm using two of these boards I'll actually create two different NeoKey objects I just call them NeoKey and NeoKey two and those have the same command which uses the NeoKey one by four and it specifies this is on the I squared C bus and the address so one of them is at address 30 the other is at address 31 because I soldered that jumper under there and then the main loop of this is actually pretty simple let me go ahead and open up a serial port so we can see what's going on I'm gonna unplug the other keyboard so we hopefully grab the correct one okay so what happens now is when I press a key the seesaw library this is the only command you need to know if you wanna check one of these keys it's just NeoKey and the value of it at the address that it is so NeoKey zero, one, two and three or NeoKey two, zero, one, two and three those are the buttons and those values are true when they get pressed otherwise they're false so when I press this first button it says button A was pressed it changes my NeoKey color to red and then when I release it it changes the NeoKey color back to blue and then I have those set up to do a few different colors and names when I press them and then my second row here is just called button A two B two C two D two and you can press these all at the same time if you want it'll register them all it's a little hard to read that but you can see here A two is pressed as is button D and those will just scroll by there you can use this with the debouncer or other more sophisticated methods if you want but just to get you started it's really straightforward to just simply ask using seesaw and this NeoKey library you can just check for the value of a button to see if it's pressed or if it's not pressed let's see for, let me check and see if there's any questions over in Discord here oh yeah you know what let me show the page here which I forgot to show you so here is the page for this board you can see you got some nice pictures there of the backside front side of the board you can see this uses these nice little kale sockets which allow you to just press and remove no soldering required in fact you can use this entire board without any soldering and if you're using something like this cutie pie here since these both have the stem of QT cable you can simply plug them in with one of the different stem of QT wires that we have these are quick compatible wires and they come in a few different lengths so this is ready to go with zero soldering which is terrific you can of course solder we have all those same iSquared C pins broken out here on the board and so depending on your needs you've got a bunch of different options for how to set this up the key switches for this are any Cherry MX compatibles so that's Gateron, kale, Cherry MX we have a bunch of different kale box switches available on the site here too and in the clicky, tactile and a couple of linear types but you may have others that you like and as well we have a bunch of different keycaps so since we've got the Neopixel under there shining through you probably want to try something that's either translucent or windowed or has a silicone kiddie paw like that one there super cute and we sell a few of those as well on the AdFruit Store if I refresh this site right now you should see hey we have 55 of them in stock and they're half priced so $4.98 you can bring one home today or 10 if you want if my math serves me right that'll be $49.80 and let's see the library for using this is on GitHub I don't believe we have this in the bundle yet in the circuit python bundle we're working on there'll be a guide coming out that'll point you at all these things but if you get one now and you want to get started you'll go to GitHub and just search in the Adafruit GitHub for NeoKey and there you can see adafruit underscore circuit python underscore NeoKey that's where the library is and clicking on here you can download the whole thing so you just go to this green code button download zip then you'll have everything you need and what you'll place in your library folder of your circuit python capable microcontroller like the little cutie pie I have here is this Adafruit NeoKey folder that contains the library you need and in the future we may add more more boards to this right now the NeoKey one by four is the only one in there and you've got a folder of the example code so if you go to the examples and try this code here it's really similar to what I did with this basic example other than changing the LED behavior a little bit in the colors and then adding the second set so we can continue to add these on and get a pretty interesting board you can also create some interesting shapes right if you've got some unusual needs for your board you can lay them out in ways other than just sort of a simple grid or something that you could place on a perf board you could also turn these at diagonals you could create a letter Z I don't know why but you can or a V or an A so let's see the comment here over in Discord doctor says I can't afford switches for all my MX compatible things yeah when you get a lot of these going you start to pile up on the switches and the keycaps question can you get the value of the keys as a number so key zero is one key two is two and so on so if you pressed one and four the sum would be nine and you know two keys are down at the same time yes you could code that for sure you could set up some conditionals you could have variables or lists that are adjusted depending on which keys are currently pressed so there's probably a few different ways that you could do that but yeah it knows that multiples are down and you can query that you can also use things like the debouncer library which can go and check those as well without the need for pauses and things to avoid the key repeats or you can use little simple state variables that you flip a state of something when it's pressed so for sure you can do some neat sophisticated stuff so that you can do big corded macros and change the behavior based on modifier keys so you could have one of these act as a shift key or a control key, command, that sort of thing for sure as built to code asks can you string up you can string up 16 neat does Adafruit sell a larger four by three format version it is coming as on the way we have a four by three macro pad in the works if you check the desk of lady Ada videos on YouTube you'll see some progress being made on that over the past few weeks and including some really exciting work on the keypad library that will read matrix keypads and vector keypads using diode matrix layouts really quickly it's native C code that's running in the library even though you're using circuit Python so it's lickety-split I think it pulls the whole thing in three milliseconds, nanoseconds, picoseconds something small I can't remember what but it's fast was the thing and I think that's about it yeah so thank you for coming in and stopping by asking your questions this let me go to the full view of that for a second there this is what you'll get right here with the Neo key one by four QT I squared C mechanical key switch breakout key strip it's not exactly its official name but that's gonna do it so let's put this up on the big board that's our product pick of the week it is the one by four Neo key the product pick of the week is the Neo key one by four QT I squared C mechanical key switch breakout with Neo pixels and socketed key switches so I'll go ahead and place that on my new product pick of the week board of goodness and that's gonna do it so thanks everyone for stopping by and if you have other questions put them in the discord chat put them on over in the YouTube chat and I will see you next time be sure to stop by tomorrow for lots of different live streams on Adafruit including show and tell and ask an engineer and the 3D hangouts in the morning with the Ruiz brothers and I'll be doing my workshop show on Thursday so come on by for that I believe Scott is still off so no Friday deep dive with Scott but that'll be returning pretty soon I think maybe the following week so that's gonna do it for today I'm JP and I will see you next time bye bye