 here with us hanging out Who've we got here? We've got our YouTube chat. Hello to Dave Odessa and Max Crafts 7050 and Johnny Bergdahl Guido Lennox Boom Welcome. Thank you. What is this about is the question Guido asks? This is my workshop and I'm gonna show some projects. I'm working on I'm gonna show a circuit Python tip If you're interested in that sort of thing, I've got a coupon code for you You can use to get a discount in the Adafruit store today What else I'm gonna show you some time-lapse photography tips Excuse me using the Memento camera our little circuit Python hackable camera. I'll show you a couple of The time lapses I've shot with it and a little guide that I've put together. What else? I've got a follow-up on the string controller This thing over here. I'll just tease it right now That is the the wild and weird game track controller for PlayStation 2 and Xbox 360 era I think it was Or maybe regular Xbox no for regular Xbox That's a that's a weird one, but it's cool, and I've got it working I'm just reading a couple of the z-axis Retraction cables on it and using those for some MIDI stuff big surprise there, right? So I'll show you that and how that works and how you might incorporate that into your project What else I've got some tea I'm going to take a sip of and That'll about cover it so let's get started right first of all what's this chat all about that's the discord chat right there What is happening there? There's oh my? That's the discord chat if you're somewhere like Twitch or Facebook, and you don't know where the chat is happening head on over to adafru.it Slash discord that'll take you right to our discord server, and then you can look for this live broadcast chat Channel that's where the discussion around the show is happening And who we got over here Andy Callaway. Hello Paul Cutler Johnny burgdoll Gary Zee Starman Blitz CD DIY Jim Hendrickson Todd bot DJ Devon 3 good afternoon and hello so That that about sums up what's gonna happen here. I hope that answered your question there Guido and As promised first of all I've got a discount code for you today So that right there that's the discount code that will get you 10% off in the Adafruit store today Just type in groundhog because tomorrow's groundhog day type in groundhog into your coupon code slot when you're checking out from the Adafruit store. There's the store right there You can see we got some new products listed there if you click on this little link that'll take you to all new products Go and find some stuff you want there throw it in your cart and then type in Roundhog at the end to get yourself 10% off. That's good for stuff That won't work for gift certificates or software or for subscriptions, but it will work On all of the stuff stuff that we sell in the store Also, we have some other enticements some freebies And Kelly said that should be the discount code for every day. Isn't it I feel like I do this show every day And it's always that that's coupon code, right? But anyway free stuff if you want to Place a big order if you've got a big order you're placing you will get some little Enticements here if you spend $99 or more you will get the free PCB coaster with the Adafruit logo on it If you spend $149 or more you'll get a KB 2040 Microcontroller as well as the coaster these stack if you place an order of $199 or more you can get free UPS ground shipping in the continental us as well as the KB 2040 and the coaster and if you spend $299 or more You will get a circuit playground express for free as well as the ground shipping KB 2040 and the coaster And as far as I know I never tried it, but as far as I know the coupon code works along with all of that I don't know which is figured first the discount or the threshold on the freebie stuff I'm not sure. Maybe you should ask someone At some point about that and let you know, but if anyone's tried that What happens which which goes first right order of operations there Hopefully you hit the threshold and then the 10% comes off and you still get the free things. That's my hope. That's what I'd want So that's your coupon code for the day groundhog. That'll get you 10% off and that works every day always for all time Or until midnight tonight If the day doesn't just reset Something like that. All right, let me turn off this HVAC. It's getting warm enough in here All right So Guido says they were looking up instructions on how to control their winch. What are you winching like on a Jeep? winching curious and That brings us to so I have a show on Thursdays. I did not sorry on Tuesdays I did not have it this week because I was out of town, but on Tuesdays I normally have my product pick of the week show. It usually looks something like this right here good grief and You can tune in next Tuesday. I will be running the show during that show. It's at the same time during that show on Tuesdays. I will Showcase a product pick something new from the store Something old but good from the store and we'll give you a big discount if it's an 80 fruit product Usually we give you 50% off and that's good just during the show So tune in next Tuesday to see what my new product pick is and to get a big whopping discount on it But since I don't have a Recap to show you usually I'll show a recap on this show of that show since I don't have a recap this week I will jump into a circuit Python parsec. So let me get a couple of screens Set up for that and close some little alert windows that are bugging me there Don't bug me Here comes All right, sorry, I'm there's probably an echo on that This is good. Yeah, we're set up. Okay for the circuit Python parsec today I wanted to show you how to move an object on a display in a circle using sign and cosine So if you look at my code window here, you can see in circuit Python I've got some libraries to import Most importantly here is math bringing in the math library means that we can use sign and cosine I'm then doing some pretty typical display set up stuff and I'm making a little box. It's a little five pixel Bitmap box that's going to be on screen and it's green I will set the center of that to be the center of the display. So I'm just I'm just I'm dividing the display by two G's I'm just fly it. I can't say this I will then divide the display width by two and divide the display height by two and that gives me the center point of the screen And then I am setting a variable called angle to zero and I'm choosing the radius of the circle I'm going to move in then in order to update my Display shape on every step to move it in a circle I'm setting the y and the x based on or I should say I'm setting the x and the y Based on sign and cosine which helps us define a circle so you can here see I'm setting center x and an Intiture an integer of the radius that I've chosen here in this case 35 times math dot sign math radians and the angle and then for the y It's center y plus in radius times math cosine math radians angle We then update that position so it moves it to that spot We refresh and then we're updating that angle that we are multiplying by so that on every step We are moving to a new position on that circle and then we have a little bit of a delay So what I'm going to do is start up the code again, and you will see on my screen there I have this lovely little box that is moving in a really nice smooth circle We can change things like the radius of that we can change things like the speed of that here We're gonna update that to be a little tight Radius of 10. Let's see if we can still see it out at a hundred That's gonna start to get I think a little bigger than the screen. Whoa. Yep, run it on it off But that is one way that you can move an object on a circular path using the math sign and math cosine Library and that is your circuit Python parsec And when you know one thing I didn't go and play around with on here, let's set Radius back to say around 50 If I want I think I can get a smoother Motion here by adjusting the Amount that I'm incrementing that angle so here we'll set it to increment only two And you can see if I set this down to one and I'm gonna drop that delay time we should get a Really nice clean smooth circle there, which is just a lot of fun And I had some suggestions or some requests to do some other Motion things with the display so tune in next week I've got an idea that sort of builds on this that we can use again to create some pretty neat motion right in circuit Python on your Display this one by the way is a feather tft ESP 32 s2 With the little tft built right onto it there And yes, DJ Devon 3 said this definitely gives the So NAR radar what is that a radar display vibes for sure I love it All right Take that and set that off to the side. All right. Oh and now I see I Don't know if Guido is still tuned in I think they were looking for instructions on how to control a winch and ended up here on this page I love I love when the algorithm sends you somewhere confusing It's always always possibly interesting and We have a question over in the YouTube From a user named is this YouTube. Hi is this YouTube. I love to see something done with the air Drop feather. What is the air drop feather? Air drop feather. Is that a product we have are you trying to use air drop like apples air drop in a feather? Let me know elaborate in The chat that would be great Okay So next up let's talk a little bit about some of the time-lapse stuff So here I've got one of our memento cameras if you're not familiar with this in fact, let me switch the display focus on that Screen is gonna be a little bit Reflecting there. Let me see if I can just set that prop that up on something Go And I'm gonna go ahead. Let me talk about this for a second. We'll take a look at some examples We'll talk about the code a little bit and take a look at the guide Oh airlift. Maybe some maybe someone. Yeah Was asking about the airlift So if you're not familiar with it if you're someone who tuned in thinking they were gonna find Instructions on controlling their winch, but you stuck around this is a circuit python Controllable and Arduino controllable camera and it's called the memento We are working on code for it and it does some basic sort of snapshot camera style things Including now we've added to it the ability to do a Give it some power. I think the battery is Dead on it, so that'll charge just by plugging into USB We've added the ability to shoot time-lapse photography I think This may we'll see if it's Yeah, okay, this is the right code. I won't try the right code on there I don't have an SD card in there right now, but that's okay, and I'm gonna actually get Quite a bit closer right now So you can see right now I'm not I'm pointing at the dark Desktop there, so we're not gonna see anything on screen But this is the essential pie camera library Camera example file. I was calling it fancy camera or fancy cam But in this we've now added a new mode, which is this time-lapse mode so if you look at The different modes that we have here I can go stop motion mode gameboy mode, which gives us this Dithered one bit look a gif mode that'll shoot little 15 frame gif animation Regular snapshot mode which saves JPEGs and then there's this new mode, which is time-lapse just as lapsed there so LeMort added this and gave us some really cool features including the ability to Set this kind of the main thing set the interval To anywhere from there's a sort of a menu of presets in here five seconds up to an hour And what that means is when you hit go which is done with this little okay button here changes that Right there where it says stop when you hit go hit Okay, it will count down however long the interval is on this intervalometer baked into the camera So in this case it would wait five seconds counts it down takes a photo repeats that forever saving to the SD card on There I don't have one plugged in right now So what you can do is you can set this as a documentation camera Let's say you're building Something built soldering together a kid or something like that and you want to get a little time-lapse if you shoot every Five seconds every ten seconds every twenty seconds something like that You can then play those frames back and you get a nice sped up, but really clear Type of time-lapse playback video that can be played back as a video it can play back as a gif animation you can just use it as still frames for documentation and There are generally Some benefits to shooting that sort of thing with a with a true time-lapse mode that's taking still photos versus Just taking an hour long video first of all there's the space right so if you shoot a long video It can take a lot of space. Also you will end up with Just a lot of frames to kind of pick through and find the good ones with time-lapse you get essentially real photos real snapshots I'll be it with this they're there of limited resolutions of five megapixel camera But for artistic time-lapse for certain types of documentation time-lapse really cool I've I've I've said I will show you some examples. Let me go Over here real quick just to YouTube. So these are some that I posted here is a I'm gonna turn the sound off on this here is a Lego set time-lapse that I put together and So I had this shooting. I can't remember now. Was it every five that might have been on every five seconds and then I just strung those together as a Single movie could also save it as a gift and told each frame to hold for I think maybe set six frames per frame So it doesn't just go by like that since you have just a limited number of frames You can retime that and that's something you can retime in video editing software It's all something you retime using a gif animation software and I have a page now in the memento guide that shows you how to do that Here's a different type of example. By the way, I'll confess This is just played back in reverse. I had already built this set I actually did the time-lapse of me taking it apart just because that's a much faster easier way to do it It's it's a it's a way I like to cheat sometimes on on the build videos Let's build it first and then you don't have big pauses where you're digging around trying to find a part But if you just play the frames in reverse, you can get what looks pretty convincingly like a like a build so here's this one doesn't lie, so this one is a Sky time-lapse so the there were some clouds in the sky and a little bit of wind which was cool Also somewhat unusual here in in Los Angeles area so I put this camera up on a rooftop and set it I think to every One minute I think it's every one minute. It took a frame Then again strung them together in Premiere And held them a little longer just so it wouldn't go by too fast so you can see it has like a steppiness to it But it's kind of a nice artistic looking Cloud movement there some really neat clouds we had it rain today as a result of clouds coming in Not too surprising. So that is I think two hours Sped up into one minute increments, and then those are each played back for I think maybe eight frames or six frames something like that and so the Time-lapse This is by the way, these are on our YouTube and those are now going into I think I already put these into the learn guide so the time-lapse instructions if I take you to learn guide and Here's the Memento Guide we have some Projects along the side here circuit Python Memento starter projects if you open that you'll see there's one called time-lapse There's the gif and you can see I didn't hold it as long there, and it's a subsection of it But it's maybe 8 30 frames. I think it's 30 frames of it There's the YouTube version of that funny I didn't do anything intentionally to change the colors But we do get some some differences in the colors between the gif and and the video there So this takes you through shows you how the settings work another interesting one is this high-power medium-power low-power, so I'll show Show you this as a larger example So if you look here pop a SD card into here as well So you can see on the screen here. It's going to It's going to detect the card when you press that in and then it says SD Okay, so there's a little switch built into the SD card reader can tell when a card goes in and then it checks its health to see if It's it's going to save photos or not So in time-lapse mode here If I go ahead and hit okay right now you can see it's going to count down We have some screen flickering. It's just kind of unavoidable right now. It'll take that photo and then it's going to Start to count down the next one Snap save count down the next one and you can see the whole time. I'm getting an update of the Viewfinder so this is a high-power mode if you have this just with battery. This will eat the batteries the most of any of the three modes that we have for for power if I Hit the Select button I Can go to medium power mode What medium power mode does is it stops updating the viewfinder in real-time and it only updates when it takes the photo So you can kind of use it for framing But not a lot of real-time framing and then the last one is the low power mode And this one I think never updates the screen. Let's see Now it does update the screen, but it does drop the backlight a lot. You can see how dim that is So this is a really good one if you're trying to conserve battery life But you at least do still get to see what's what's framed in the image Especially if you tip your camera over and want to set it back up or if you're moving things in and out of frame That can be a help so you can switch between those at any time, which is nice it'll keep running everything and then you can see if I hit stop now and Pop that card in we would have those 10 frames or whatever of animation there that we can then stitch together So if you look in Back in the learn guide here We tell you how to get to the time-lapse mode how to adjust your intervals there How to adjust those powers settings you can still do the focus lock which I didn't do so you'll notice here in The Camera view it looks kind of blurry. Let me let me sharpen up the camera that's looking at the camera first This right here So you may be able to tell that little USB stick that it's looking as kind of blurry if I press and hold the shutter button It just focused to just autofocus the lens there. So now it's nice and sharp. It's going to Maintain that focus it for all of the photos So if you're shooting something like the sky leave it alone It'll do infinite focus if you're shooting something happening kind of in the foreground get your sort of average Distance focus when you start and then you can click and hold it'll just autofocus then you can go and hit the Okay button here to start the time-lapse The other thing it does that's really cool. This was based on a suggestion I think it was some nice who is in the discord made this suggestion. It'd be nice to lock the Exposure or gain the white balance and the shutter speed When you start your time-lapse because if those things are auto Adjusting between photos during a time-lapse you tend to get sort of strobing and flickering It's better to have those locked down and then whatever lighting changes you can tell relative to the previous and Previous frames and the frames that come after so that has now been implemented and it's great I'm actually gonna shoot a little demo of before and after and put some gifts side-by-side on the site Just you can see what those are and point you at the code where that Happens so that if you want to turn that off in the library For some reason and allow it to still do auto exposure auto white balance auto shutter speed You'll have that that option in your own code And let's see what else do I have in the guide here second Start stop and it will just go until it fills the card. I think it just starts failing at that point I haven't filled a card and you can see I'm shooting typically at this 1024 768 is kind of a nice size if you're gonna make a gift for a Sort of medium-sized video, so I'm not shooting it at the full resolution, but you could you'll just fill your card faster You just want to do some math based on the size of your card and the size of the JPEG images at stores And that's what stores is individual JPEGs And then I added this page Frames to gifts so this is also in the memento guide And this will show you how to take your big pile of gif Rather your big pile of frames which are JPEG frames that you start with and Use a website free website easy gift to convert those into a gif animation And it's pretty simple you upload your files using a file browser I've provided the sky laps This the sky time-lapse images all hundred and some of them there So if you want to use those to try them out you can grab that zip file right there So you upload your frames and then this is this is nice in Go to the full View in the gif maker on easy gift comm here. You can see I've uploaded about 30 frames It shows them all you can then go in and do things like Skip a particular frame. Maybe you have Someone walked in front of the camera for one frame. You can just turn it off Even if you upload it, you can just hit the skip button. It'll skip that frame if you want for some reason To duplicate frames maybe to move a copy of that frame somewhere else you can click on copy It'll duplicate the frame. I think you can reorder them here. I haven't tried that But I think you can reorder your frames and then you can change the individual frame delay So it's kind of nice sometimes to hold the first frame and the last frame longer Depending on the type of animation you're doing so you can just set the delay I think in milliseconds there and You can also just change to a certain frame range if you want to Using this toggle range of frames Then if you scroll down a little more You'll see in this make a gift Box you can do a delay for All so if you want to just take all the frames and adjust how long they're held for in the gift You can do it right there. You don't have to do it on every single one Usually gifts are set to loop forever so the loop count if you leave that empty will just loop forever if however you want to Maybe play four times and then stop so that a web page isn't too annoying and distracting in the side You can change that. I don't know if all browsers respect that or not I've usually run gifts as forever looping You can do some compression things here There are also other places to change the size so use the global color map will apply the same color map to all Frames and reduce the file size You can crossfade frames Don't stack the frames. I think that's if you're using a transparent background And then you click that big make a gift button It will show it to you in the browser and then you can decide to download it or you can further adjust it There are some settings And options down the bottom there to crop it resize it rotate it run through a bunch of the optimization options Reverse the thing add effects adjust speed add text overlay Add some sensor bars if you need to other overlays cut it split it a bunch of really neat options and they're very fully featured and There's the finished gift coming out of that process. So that guy will take you all through it now So let me know if you have any questions about Doing your time lapses. That's a new new section in that guide there also that Section on creating your gift will apply to stop motion animation as well If you use the stop motion mode on memento, you will get a series of JPEGs on your SD card And then if you want to stitch those into a gift do some simple editing through the timing stuff you can do it all right there and We are not affiliated with easy gift. I assume they're good people. I hope so they're free and don't seem to be covered in ads so we've Been recommending it for a few years as a good option for people Okay, and then Let's see. Let me remind you again your coupon code if you want to go buy some cool stuff We had some memento cameras back in stock last night. I don't know if they are Still it is out of stock again, but we're putting Batches of them into stock periodically so you can sign up to be notified If that happens to happen before the day is through you could use the ground hog coupon code to get 10% off Otherwise use it for maybe some other good stuff Okay, so last thing I want to do is go Back into this cool thing, so let me zoom in here a little bit up so If you tuned in Guess it was a week ago Maybe it was previous week. I can't remember now. I showed this wild thing Which is a game peripheral that was designed for PlayStation 2 and Xbox there was a revision of it that ran on PC and this is a Dual three-axis joystick. So there's two of these they have XY Analog joystick control and then they have This wild retraction cable here the string kind of an orange monofilament Cable pretty heavy-duty And the idea was you put on these little gloves hooked those to them and you could do things like boxing games swing a golf club and it couldn't track your position in 3d space doing some snazzy math about the Distance away from the two points that it knows their fixed location as well as the Orientation of the XY axis so it can tell you've done a golf swing follow you and put that up on screen So it was pretty neat. It came out before the we So it was pretty innovative in that sense, but I think in the end We've never heard of this one in the we kind of took over as a method of motion control Using optical sensing and as well as an IMU But this thing is pretty neat. So what I wanted to do was Get inside of it and figure out how to use that string retraction cable as a control input, so You open it up here There were just some screws on the bottom. You'll see we have this pair of Pulley Systems that route that up-down motion to a sideways motion that is rotating a little worm gear And that in turn is rotating the shaft of a potentiometer that has that gear on it there. So that That potentiometer that potentiometer they are what we're measuring The original Controller board here is just kind of an epoxy blob Who knows what microcontroller? So I'm not going to try to get USB info out of that I just pulled that off it actually happened to have some nice JST Connectors there so you can see here's the XY For the second joystick. Here's the XY for the first joystick. I went ahead and added some socket connections there for the JST Pins that I can then solder to or make a PCB for this one is both of These two as well as since it's a voltage divider. We have the power and ground so By reading those two as two analog inputs on that metro board that you see there. I can get the 12-bit in this case you could use a 16-bit ADC I've been using the onboard 12-bit ADCs that are on the RP2040 Metro And I can measure where those things are in space. So let me move it all over here and Connect that up Give you a little demo of it Just spewing out some numbers for us at first and then we'll use it to Spit out some MIDI CC values that we can use in our audio software so Set some things over here. I give you a camera view of what I'm doing and I will Brighten this up here Keep it kind of far away so you can see That sort of string motion happening there Light yeah, that's a little better so what I've got here is just a I ran some ribbon cable off of that socket so I can still just unplug this and then put it on a little Minton perma proto board and then ran some jumper wire Over to the metro and I'm going to give that Some USB power Now turn that down a bit Thank you turn that down all the way while I add one window. I'm going to add an Ableton Live window here and we're just gonna look at this little bottom section here. So I'm gonna Scaling and cropping There so that's a little easier to look at the top of that Okay So what I'm doing here is I've got and we'll look at the code for this. It's fairly straightforward I'm I'm taking in the the 12-bit DAC Values that I'm that I'm reading on the RP 2040. I am converting those to a 0 to 127 range, which is what a MIDI knob is a MIDI CC control and then I am spitting that out on a couple of MIDI CC numbers that are being read in Ableton as the Loop start and the loop length of a looping piece of audio So what we're gonna have is just a piece of pre-recorded audio. It just wants to play you can play it with MIDI keys So if you press a C, it'll play it in one pitch if you press a D. It'll play it a little pitched up I'm actually just holding that note. That's why you heard it just kind of scream in that one. I'm just holding that That pitch it's playing the sample back But then in real time we can turn these two knobs essentially by pulling these strings that will adjust how long of a window of this sample we're playing As well as where this little sub section is Sort of scrubbed along the timeline. In fact, I'll do Let's see do I have to make you I might have to read. Oh, there we go. Okay So it is smoother in real life, then you're gonna see the play back there But you should hear it pretty pretty nice. So you can see here as I move this left string I'm essentially changing where along that Waveform that sample waveform. I Am that's just changing the start Percentage zero to 100% and then I can change the length of the samples. I can make it really short I can make it all the way at a hundred percent. It'll just play the whole sample back And and we can adjust those two things So let's Turn up some sound. Let me know In the chat because I'm gonna mix in a microphone that's playing this sound back And I want to know if that's terribly loud. Let me go to a So I'm gonna leave this like this for a moment just so that I can get some things are a lot longer than this So I actually Essentially reached the end range that I'm using but it actually goes about twice that far It's a really long range thing because it was probably meant to use onto the Wing span of your so that is one demonstration of using it as a sort of granular control so there's a Name for doing that with a sample that that gets more complicated than what I'm showing but to some degree that is Adjusting the window of a loop to be pretty small and then adjusting where in the loop you're playing Along with some other cool stuff gets you towards this notion of granular synthesis where you're using little Grains little nuggets of the small part of a waveform as a looping repeating Waveform of its own so that is a kind of a neat type of interface you can imagine if you had Keying if you were playing chords or notes or other things with your hands in in little remote palm type of Arrangement, but then can still do these kinds of expressive things pretty neat also Keep in mind. I'm not reading or using the two other axes that I have on each joystick So we can do a lot more with it. We could do things like adjust the Amplitude of it or filter of it pitch bend of it all based on This motion as you move around so it really tracks essentially a 3d a point in a sort of 3d Hemisphere around this object it can it can Determine where that spot is or just use the three Values discreetly depends on what you want to do So once I that was strangely hypnotic and I think Andy Callaway has been hypnotized So I want to show you what that Looks like here. Let me hide that See that view anymore And let's go open that code up Are you it? Did you reload yourself? You did. Okay. Good. Let's I don't think I'm printing anything, but I will let's Reconnect disco tool to the metro and What I'll do is enable These print I'll disable the MIDI send. Let's see if that's enough or if I need to mess some more Kill that note there. Okay. Yeah, so I made a little sort of graph a little printable graph There inside of The circuit Python repel So it actually loops on its own, but you can see I'm only letting it I'm kind of clamping it from zero actually doesn't always want to get all the way to zero Zero up to 127 as I move that and I can hold that one where it is. Here's the other one It's wrapping around just because my screen isn't a hundred and more than a hundred and twenty seven Characters wide there So how this works is We've got some MIDI stuff here. It's a big bulk of what's going on We can kind of ignore that for a moment main thing is I'm importing the board definition So that I can use the pins by name and I'm importing analog IO I'm setting to analog read pins for that analog to digital converter that's on pin 0 and pin 1 or 12 bit ADC's I'm setting a State of the value that I can compare against using a threshold to see if We've moved so we're not constantly spamming that that value Since I've got the 12 bit read, but I'm dumping it down to just the seven bit MIDI useful type of information I can set the threshold to a very low number a threshold of one so That means I can Get it get get a pretty granular use of that in in MIDI there I'm not using this play note really So we can ignore that Just for simplicity I'm sending one MIDI note when this starts so that it just holds it and that's since I don't have a Sustained pedal or actual MIDI keyboard hooked up here. It's just playing a note in Ableton Which is why I was then using the keyboard MIDI like my typing keyboard as an input just to turn off the note later But you could play you can also have a keyboard you can have kind of any other type of MIDI controller involved a sequencer that sort of thing The question from see Grover is it playable with both Strings in one hand yes and no you might want to set it up on something like a marionette string Let rod so if you had hold of a rod and these were on either end then you could pull them together But you could also tilt To do that kind of stuff and I was thinking this could make for kind of a neat puppeteering interface if you had a Marionette type of puppet in CG 2d or 3d CG you know a lot of marionette stuff is Moving the puppet up and down leaving the feet on the ground usually so the knees bend and then walk Type of stuff where we would pick up with the XYZ controller So that might be a future project for me is to see if I can turn this into a An input for something in real-time graphics, which would be kind of neat Good question though. Yeah, they're a little close together if they're one hand, but you can see there I do get some some difference between them need controller And then my main loop what I'm doing is I'm getting my analog zero and my analog one value It's just reading these two potentiometers here I set the maximum you can see instead of zero to 65,535 which is the full range that circuit Python reports it Converts things into 16-bit internally I'm just clamping that down to this little range of 45,000 to 65,000 just because I didn't want to walk All the way over here To use use the whole range. These are long Then I'm using some remapping to turn those values into 127 to 0 I just kind of needed to flip the flip that you could probably also just flip the Power going to those potentiometers if you wanted to And then I'm clamping those to 0 to 127 So it doesn't give an error if it tries to throw a number outside that range to a MIDI message. We'll have an error I was doing some stuff with pitch bend and that's a different range so 0 to 81 92 or negative 81 92 to positive 81 92 is kind of the full pitch bend range for MIDI pitch bend and What else then I'm checking to see if they've changed so I check last value 0 to see if the Absolute version of the mapped value minus the last value is greater than the threshold so if You're getting like a lot of noise when it's just sitting there You can tune that threshold up and that'll that'll get rid of some of that Analog noise sort of false false positives that would you have a lot of data spam a lot of data We didn't want to use Oh, see see your grove says yeah, you could also do yo-yo tricks if you grab one mid string Fun fact I was in Chico, California recently where they have the yo-yo the National yo-yo museum It's just this back of a small shop, but they have That's where like some big yo-yo conventions are and they have an incredible collection of yo-yo So I randomly happened there and had to check it out. It was highly cool. I got a t-shirt. I'll wear it something I don't yo-yo. I don't really know anything about it then what I'm doing is Setting the last value to be the current value so that kind of resets that process of checking against the state and then right now what I'm doing is printing those mapped values out and also setting the number of spaces Or underscores there to equal the value. So that's why we get zero to 127 we can change that To be a smaller graph By just cutting in half So now 127 stops there And I need to turn off that note again, let me And a little bit of a delay in there and that is it so Andy Calloway says the yo-yo industry has its ups and downs High dive off You say I was excited about this before you opened up live Glad I found this even if I'm supposed to be doing other more practical things right now good Well, thanks for joining us. I'm glad glad you stopped by. Yeah digital marionette. Wouldn't that be fun? It really just it feels it feels so much like a marionette type of thing. So Could be fun. Could be really fun I just the I think the the kind of Easiest thing may be the most elegant thing may be Let me focus here And let me make this big You're the wrong screen here. Uh, so what I'm thinking these are These jst sh Ph so these are jst ph connectors, uh that that we're on there. Uh, that's what's on the original Board that shipped with it. There was a little bit of hot glue there I just kind of pried it off because I couldn't find any isopropyl alcohol here in the workshop But use the isopropyl alcohol that'll usually pop off if it's hot glue So those there we do sell a little kit, uh of these and so if you if you've got some of these four pin Uh connectors, that's what the cables plug into. That's what's on This board here same same old guy there. That's a nice little standard. So That however is not point one inch spacing. So you can't use that on a regular breadboard or perma proto board Which is why what I did was grafted Some silicone ribbon wire to it and then soldered that to this intermediate board and and now I can Plug sockets into that or solder directly to it or it just kind of breaks it out. Uh, what I'd like to do though is Design a little pcb that these can all plug into with a maybe cutie pie uh, and Maybe a 16 bit adc. We have I couldn't find this one last night and I found it in here this morning, but we've got some of these little stemma qt Uh, this is the Which one are you ads 1115 is a 16 bit Uh adc So there might be one we have that's multi channel. That's a better option. I can't remember how many channels that one has Uh, is that four channel? Oh geez it is. Yeah, that one might work great. Um, because I've got One two three four five six Uh channels here to read so two of those or if we have a bigger one Uh Get all that put onto one little pcb maybe even make it to fit here So these can just kind of plug back in. I think we could get pretty close to just fitting back in that same spot Uh, and a usb cable will plug in Right through the back there because you can see here this one This one here just came bolted on in fact, I might even reuse this cable and another jst connector for usb there because it's four pins And then it can be all nicely self-contained put the cover back on it Uh, the one other neat thing is this has A switch That is meant to be a foot switch since this whole thing is meant to be on the ground we've got This nice sturdy foot switch here that has a 2.5 millimeter um Kind of old school cell phone sized trs jack that plugged in there So plugging that in the front and getting a little uh extra Uh i o extra input button there would be kind of cool so Then it's just general purpose who knows what marionette could be midi osc, which is higher higher resolution could be cool too uh So go look for these you can still get them for between 30 and 50 bucks. I think on ebay Uh, they were they were made they made a lot of them. They just didn't stay around for long So they're they're they're out there and they're not not crazy expensive. They're not particularly desirable for collectors, so So that's that I just wanted to update you on actually doing something with this. I know I did a little Tear down of it the other day Once again hats off to the place. I saw this used which is a What was the name nervous squirrel calm check that out they made a uh, I think a five u uh modular Uh synthesizer module and now a euro rack version called string thing that reads those Three axes there's one of these that has like a little ring for your finger And allows you to do some essentially cv send out cv on three channels based on This manipulation so you can get some modulation on your other stuff in your synth rack. It's super cool Uh, I think these pull out you don't actually need that pulley you can go direct Right there just like a string toy on the back of a toy and uh That module there kind of fits barely but kind of fits into a deep euro rack case. That's how they had that set up Um side connected jst connectors. Yonezcu seven says that's a good idea. Yeah if I have if I have like a 90 degree angle Ones like that so they can take up a little less space. That's a nice way to do it Uh, is that eight? I think that's gonna do it. So hey, thank you everyone for uh, for sticking with me for this Hope that you found that entertaining um, particularly our new accidental Viewer die evolve the evolve. Thanks for stopping by glad you found that to be cool. Um And uh, oh carter has a suggestion on 8 bit adc that I can consider. Yeah, I don't know Probably if it's fine if I'm just doing midi stuff. It's already Twice the resolution we need So there you have it Last thing I'll do is remind you if you want to go get yourself a discount over in the store Groundhog is your discount code today. So that'll get you 10 off. Just type that in in the coupon code slot on the way out and Save some money All right. Well, hey, thank you everyone for stopping by. I will see you on tuesday I believe scott is planning on doing a deep dive tomorrow If everything works out with uh daycare and kids and things like that. So, uh, check it out. Check our blog Check the live broadcast chat channel to see And then we'll start back up on our regular slate of shows on, uh, Tuesday Also, there may be a foamy guy deep dive over the weekend. I'm not sure. So again, check Check the blog and check in the discord. All right. Thanks everyone, uh for Adafruit Industries I'm john park. This has been john parks workshop. See you next time. Bye. Bye