 Welcome to the show, it's me, JP, and you have tuned in just in the nick of time for JP's product pick of the week. So let's do this, shall we? What I'm first going to do is send you to this very web page because you're going to get 50% off on today's product pick of the week if you point a thing at that QR code or type in this into a box and press enter and go to a web page. What's that web page you might ask? Oh, I thought you'd never ask. Check it out, there it is. This is going to be the product pick of the week, don't tell anyone. And what's going to happen here, I'm going to refresh this and you're going to see the price drops in half. And these are available, I don't know how many we have, so get a bunch if you want, you can get up to 10 of them, no resellers allowed. So that's your massive, massive hint as to what today's product pick of the week is going to be. It makes my one eye big. All right, so before I go any further, in fact, what I'm going to do is have our own Lady Aida tell us a little bit about this product. So take it away, Lady Aida. Neo Trinkie, Neo Trinkie, your best friend who's NeoPixels and it's a Trinkit and it's a USB key. It's Neo Trinkie, I don't know, it's from Bandai. No, it's not, it's from Adafruit. It's a USB key and as you might expect, it's got the USB connectors here as we plug into USB. It's got a SAMD21, it's our favorite little microcontroller chip, so it can run circuit python, in fact it's demo circuit python. It's got a regulator just to get you that three volts you need, doesn't need a lot of components, there's a reset button and then there's four NeoPixels and two capacitive touch pads. So these contacts here at the end of the body, we zoom in. You can see that there's a split in the middle, left and right, so when I plug this into USB, so I got a little USB extender, when I press one, it gets bright and when I press the other, wait, hold on, sorry, this one gets dim and this one gets bright, so I can dim, dim them, brighten them. So they act as two separate inputs, the capacitive inputs. You can control the NeoPixels separately, so I just have them doing this kind of rainbow glow thing and then of course you can get into a boot loader or you can load Arduino code, you can use circuit python. It's very small and simple, we just wanted to make like a keychain circuit python board, it has a little slot here that you can put onto a keychain ring if you'd like and then you plug it in and you can immediately start coding and again you don't need an IDE or anything, you can just go straight into circuit python and write code for it. It's very cute and it's got an extra thick PCB so it plugs into USB quite nicely. So Trinky, Neo Trinky, why not? Yeah, Neo Trinky, why not? In fact, I'm going to head over to my mystery cabinet and grab one for myself. I'll be right back. Yeah, that's right, there it is. The product pick of the week this week is the Neo Trinky. What is the Neo Trinky? Well, like Lady Aida said, it's a USB key, it is four NeoPixels, it is an At-Sam-D21, it runs circuit python, it runs Arduino, it is your best friend, it is a keychain and it's a whole bunch more. So let's get into some demos of this lovely little thing, shall we? First of all, let me show you it on the overhead, a nice close-up here on the down shooter. There it is, such a cute little thing and if you're not familiar with this type of construction, this is the PCB USB where we can, just with those four traces, plug into power and data on a USB device. Now this will work on pretty much any computer, so Windows, Box, Linux, Raspberry Pi, an Apple, a Mac OS machine, no problem. I even got it working on iOS and I'm guessing it would also work on Android, I haven't tried that. I'm going to give you a demo of that in a second, but first of all, let me show you some sort of straight-up demos of it. So Lady Aida mentioned using this as a flashlight, this is sort of a product segment that exists out there in the world, let me go to full camera here. So what I've got here is just a little USB battery bank and if you plug this in like so, it's going to immediately run whatever code we have on there. This one is running CircuitPython right now and this is the simple blink code example that is in the learn guide, I'll show you that in a moment. So let's now take this and plug it into the computer so that we can code it to do some other things. Let me switch to, my gosh that's blinding, let me switch back to this overhead view here and I've got a little USB hub here that's plugged into my computer and I'll go ahead and plug this in so it's going to run that same code that we had before, boots up and then bam, that's bright. Now what I can do is let's bring, how about, let's place this one down here and bring up Adam and I just have a few different bits of sample code. So this one right here, if you can watch along with that blinking, and I'm sorry we should probably have a blinking warning on this one because it's really bright, I'll cover that for a moment, no I won't. The code here you can see is super simple, it's importing time so we can pause, it's importing board so we have the pin definitions and it's importing neopixel. Set up the neopixels, there's a single neopixel pin on here with the four neopixels on it and then the loop here is just fill it with a color, in this case red, pause half a second, fill it with black which is turning it off, pause again. Another little bit of sample code from our learn guide, I'm just going to copy and paste that and hit save and that'll rewrite the code on the board. So here you can see I'm going to drop down my exposure so you can see that a little, a little better, how about like that. So here what I can do is touch the capacitive touch pads in order to change the brightness, so if we hold this far pad it dims and if I hold the close one it brightens. We can also tap that, there you go. So for this one here let me dim that a bit, leave it still running and I'll give you a bit more exposure on there. If you look at the code for this what's happening? So we're importing, it's a little more complicated but not, not bad, not much, importing time board, touch IEO and that's how we access the capacitive touch pads, neopixel and from the pixel buff library we're grabbing color wheel which makes it easy to do this rainbow cycle. The two touch pads are being set up as touch one and touch two, set up the neopixels, define the little rainbow pattern here as a function. Then when we want to time things it's based on the touch there so that we know we've touched it for long enough to proceed and then here is what's happening in the main the main loop of things is the touch value while it's being held increases the pixel brightness by 0.5 and then it shows the pixels and then we compare that so we can do little like bursts of touch. If we touch the other pad then we're subtracting negative 0.5 so it dims it and then the third one I wanted to show on here I'm gonna go ahead and save that okay so in in this case the neopixels aren't doing anything by default uh you could set one sort of dimly on if you wanted to just know that it's running but what I'm going to do in this one is actually use the HID human interface device this allows us to act like a keyboard or a game pad or a joystick or a midi device so in this case I'm going to act like this is a keyboard and what I'll do is I'll place my cursor in atom here into a little empty commented out spot so you can see what happens if I touch this first pad it types in hello neotrinky and and enter it's a carriage return so each time I hit that oh it was I said it and I confused it hey that's weird and then this other pad is typing in a capital a and a space each time I press it and you can see I've also got a little bit of lighting feedback there and the way this works if you look in the code here we're importing same stuff we did before plus usb hid and from that we can bring in keyboard and the keyboard layout for the type of keyboard we have we set up the keyboard and then when we touch either the first pad or the second pad I'm doing a little bit of a lighting a little animation there a little feedback so I set the pixel colors a little different from each other and then I'm sending this simple command keyboard send in this case I wanted capital A and a space so key code shift key code a followed by key code space and then the other one when we press the other pad this one is doing the keyboard layout right and that's what allows you to type in a whole phrase and this is a sort of thing you could use if you wanted to build a address book of URLs onto a keychain or a not so secure password holder so you can touch it and it'll type in a long password for you those are all things that are possible now I want to show a demo of this iOS setup that I have before I do that I'll answer some questions so over in the discord chat and I want to say hello to everyone over in YouTube and also everyone over in the discord chat thanks for stopping by let's see John Kenton says awesome can't wait to give this a go I know a bunch of people have gone in bottom so yeah just a reminder if you head to that URL there it's product 4870 so you can do adafru.it slash 4870 that'll take you to the to the discount and the video is playing right inside of that page so you can watch it from there if you if you feel futuristic let's see Ben Harper when you have time to think for a moment because you've done such a good job supporting lots of platforms oh you're very welcome so at maker bill just bought 10 of them all right use them at cap touch keyboards for assistive technology that's excellent the okay so the setup I want to do I think there's one other question do you have a detect when you press both of them or can only do one at a time yeah I can detect both I believe at the same time and I think I think I'm going to show that actually you'll see that with my my little camera trigger setup that I have on iOS because I can do sort of a take two very rapid exposures if I touch both pads at the same time so let's let's do a little setup here so what I have this is an iPad and I've mounted it on a little arm here so that it's pointing at me and I'll flip that camera around so hey everyone that's that's the the setup we have and then you'll see here I'm using a long USB extension cable about I don't know six foot long and then I'm going into one of these little adapters that goes from lightning to USB they call it the camera kit in in iOS land and then I have my neotrinky plugged in there this is currently set up to act as volume up and the volume up is one of the only hid commands that you can send to get the camera to do much of anything I think you can also change the brightness of the overall system but this there's really one thing to do with the sort of default Apple Apple system camera and let's take a picture by by holding down the volume up or volume down they both work uh so you'll see here you can see in here when I take that picture takes that picture very nice wave everyone uh and the I just have them both doing the same thing but you'll notice is when I touch both of them it's going to take two in a row oh there we go maybe it's not it seems like it's doing one oh wait is it doing on let go no that was a different sketch so this was actually there was a I was playing around with different ways of doing this there's a suggestion of doing it on release so sort of like the dead man switch which I think one of our piece of example code does do it that way it's kind of nice you can hold and then let go to trigger something but that is sort of a nice use for it that's a little different than the typical either bluetooth remote with like a selfie stick remote or using the earbuds clicker is another way to do it but this way I can use usb I can get pretty far away from I keep my hand out of out of the picture there more excitingly you could code this to do some things like build your own intervalometer let's say you wanted to hit a button and then have it automatically take a picture every second or a picture every half hour or whatever you want to do there are there's an intervalometer sort of built into the apple camera but it might not have the settings you want maybe you want to spend five minutes taking a picture every minute and then you know something exciting is going to happen and you want to increase that rate so you could code your own pretty sophisticated intervalometer in arduino right now arduino is working most reliably with ios for whatever reason probably usb composite device reasons but that should be changing with circuit python seven where we can have this show up as the hid device that we want it to on ios if i'm wrong on that let me know in the comments some people may have used the hid keyboard on a circuit python device on an ios device that would be great so that is how i've got that set up and the code for that is very similar but rather than sending the keyboard command a or hello neotrinky i'm sending the consumer code which is what those keys play and pause and volume up and down those are called consumer code in usb land so the consumer code volume up or volume increase is what causes that to take a picture all right so let's see what i'm going to do is jump over to the page here again and so this is where you can go and buy one or some if you want hopefully they're still in stock i think we had quite a few let's see uh yes still in stock and then if you scroll down you'll see not only this very video happening right here but we have a guide that just came out cat and wrote this excellent guide if you head on over here you will see how to uh anything you need to know about the location of the neopixels the pinout the capacitive touch numbers and so on it's just a couple pins then there's info about using this with circuit python and arduino and so if you head down to those pages those will tell you how to get it set up and give you some example code so those those examples i showed there such as blink there's the blink one something interesting i wanted to mention here is that there are some libraries baked in to keep things small since there isn't much flash memory on this you don't have to import things like usb h id or neopixel or capacitive touch the main libraries that you would use for most projects are actually just baked into the circuit python cut for this board so different circuit python uh you notice how you always download circuit python uf2 for the specific board you're using and that's one of the reasons why there's things like pin definitions but there's also some modules and libraries that are baked in so in this case you don't need to add any when when you run this code it'll just run on its own i found that out the hard way when i started trying to add libraries in a random space that's why and let's see in uh downloads we have the data sheet for the chip the at samd 21 one of our favorites and then some of the design files for this um and i think that is going to do it yes so um i think one of the other cute little features that i'll mention actually of this board if you look over here is the uh if i can point at it in a mirror land you'll see there's that little notch cut out there and that's for a key chain so that you can loop this over key chain or maybe you could attach it to your zipper on your jacket or something like that i've attached it to a cute little key chain here and you'll see this one actually is is up and running i have some code on there to do a little rainbow uh little rainbow animation and i put a little piece of diffusion plastic on there so that is the product pick of the week it is the brand new neotrinky your best friend and mine and i'm going to go ahead and place that on my stem of qt board of goodness even if it's not stem of qt in this case it is cute so that counts uh that's going to do it for this week's episode of jp's product pick of the week i want to thank you all so much for stopping by and uh comment top out says not sure how long the trinket will actually last if you put it on your keys yeah that that'll probably knock a few parts off if that's janglin around in your pocket uh but it's cute anyway right all right uh thank you everyone thanks everyone for stopping by over in youtube and over in discord and uh i will see you next week thanks everyone bye-bye