 of John Park's workshop here on this lovely Thursday afternoon. Thanks for stopping by. Thanks for joining us. All kinds of fun stuff to show on the show today that I'm super excited about. So thank you for coming by to let me show you some neat stuff, stuff I think is neat at least. What have we got going on? I've got a fresh, crispy coupon code for you today so you can go and buy some cool stuff from the Adafruit Store and get yourself a bit of a discount. What else? I've got a recap of the product pick of the week. There's a pretty nifty circuit Python Parsec. I've got a gear report I want to show you. I want to talk about multi-tools. I have a new multi-tool that I'm excited about that I think is going to replace my current everyday carry multi-tool situation. So I thought I'd geek out a little bit about that if you don't mind. Andy Callaway, I am feeling very bearded. Thank you. Very bearded. What else? And then I've got the sort of project of the day that I wanted to show you a learn guide that I'm working on. This was originally going to be a page in the main guide for the Memento camera for this little gizmo here. But it is sort of enough of its own thing, own animal that Lamore asked me to write it up as its own separate guide, which I think makes sense because there's a bit of setup involved and a couple pages, three pages, something like that would work well for it. And that is going to be the wireless remote camera control as you can see here. Remote camera control is the project of the day. What else? Yes, so you see me looking over here. Who am I talking to? I am talking to these good folks. I broke it. Let me go point that back at Discord. That's just a black hole right now. Discord. Yeah, right there. That's the Discord chat. So if you're somewhere else, like the Twitch stream and you're wondering where is the chat happening, you can head on over to the Adafruit Discord, which is at adafru.it slash Discord. I don't know if I got the slash in the right direction there. And then you'll look for the live broadcast chat channel. You can see we have a bunch of channels, a bunch of different types of help where people hang out and ask and answer questions, as well as development for Circuit Python devs here and a hug report and a project and a 3D printing and a whole bunch of different channels. But the channel for the show you want to be in is the live broadcast chat channel. I'm also keeping an eye over on our YouTube. So hello to Dave Odessa and Randall Bohn, Johnny Bergdals. Thank you so much for stopping by there. And then in our Discord chat, who's here? We've got, looks like Todd Pot, Paul Cutler, DJ Devon 3. Hello, hey, Gary Z. Thanks for popping in. Finn Man, UNESCO 7, Andy Callaway, Pete Curry in a hurry. Hello, Finn Man, DJ Devon, Pete Curry in a hurry. Jeff, hello, Jeff. Looks like that's the gang that's here. So come on in. The water is fine. We'll hang out. And the first thing I'll do, let me give you something. Let me give you a little money off about. So here is our discount code. Today it is Ocelot. So Ocelot, O-C-E-L-O-T, Ocelot. It's kind of cat. Meow. It's also this guy right here. Ocelot, that'll get you 10% off in the Adafruit store today. So you can head on over to Adafruit. And oh, you know what? I think I didn't fix that, that capture window either. A whole bunch of my capture windows blew up. Let's fix that one. All right. So let's come back over here and point you at the proper window. I swear I did this. And studio live streaming. No. That one. Okay. That's the page we want. That right there. That's Adafruit store. So head on over to Adafruit.com. You can throw some stuff in your cart. Oh, look, Revolver Ocelot is now kind of not in as cool a place as he was there. And you can buy pretty much anything other than there's no back ordering on Adafruit. So you won't need to worry about that. We're not we're not doing any back ordering kind of stuff. It's there. You can buy it and we'll send it to you. The discount coupon Ocelot for 10% off that works on products, but it does not work on gift certificates, subscriptions and software. I don't know if we have any software for sale right now, but sometimes we have. So we like to give you the blanket statement there. Also, if you want to figure out what you can get for free at Adafruit, if you spend enough, we have some incentives here for $99 or more on your order, you will get the coaster right there, that PCB coaster. Do I have one here? If you spend $149 or more, you'll get the free UPS ground shipping in the continental U.S. as well as the PCB coaster with the Adafruit logo. For $199 or more, you will get, no, I'm sorry, I lied. $149 or more, you get the KB2040, free KB24. $199 or more, you're going to get all three of these things. It's the free UPS ground shipping in the continental United States, the KB2040 and the coaster. And if you spend $299 or more, you can get yourself a free Circuit Playground Express, super cool board, lots and lots of sensors on it, input, output, lights, capacitive touch, alligator clip connectors, lots and lots of, it's got an IR, I think it has IR sensor. Yes, you can send and receive IR from it. Really good for getting your software, hardware worlds to collide. It's a really great development board if you're first starting out in particular. So those are some of the freebies. And you can always go to Adafruit.com slash free to see what's what's available. So that's your coupon code. If they're missing, they are also lost. Okay, there's puns happening. Oh, young ones are also little. Okay. We'll move on from this. So that's that's your coupon code today. Aselot. Next up, so I have a show on Tuesdays, that is the product pick show. And on that show, I like to pick something from the store. We stash a bunch of them before the show. So we make sure we don't sell out and or we at least make sure there are some there when it starts. Some of them do sell out pretty quick. Why you ask? Well, a they're good products and B we put a huge discount on them usually 50% off. So that was this week's product pick. Here is a little recap for you. Airlift Bitsy. It is an Itsy Bitsy Wi-Fi co processor add on using the ESP 32. You can then inside of Circuit Python or Arduino, add some Wi-Fi or Bluetooth capability to your project. There's my Itsy Bitsy RP 2040. And there's my airlift with a little short header pins on there. Just set those in and set it down. I've specified a Wi-Fi access point SSID and the password. The Itsy Bitsy is going to go and tell the airlift to jump on to that Wi-Fi. And then it goes up to this board API.com every 15 seconds and grabs a new activity to do when you're bored. So right now said learn woodworking. And now it's going to go query that again says fetching Jason from board API, grabs a new one, hold a video game tournament with some friends my product pick of the week this week. It is the Airlift Bitsy. That's it right there. All right. So next up, what have we got? Let's do a Circuit Python Parsec for you and get this set up and make sure it's up and running here. Before I start that process, I need to, here we go. Connect to that board. Starting to connect make sure it actually there we go. Okay. Here we go. All right. Here we are. And I'm going to actually zoom up a little closer. You'll be able to see this in the REPL as well. But since I have a little board, little feather board with a TFT on there, I should be able to focus like that. Okay. And let's try to optimize the glare removal. There we go. I won't I won't touch it. I think it's gonna fall off there. All right. So what's this? Okay. For the Circuit Python Parsec today, I want to show you how you can use one of your Wi-Fi enabled microcontrollers to check your ping time and to see if a server is up and responding as normal. So sometimes you may just need to figure out what how's my local connection? What's my ping time looking like? Or let's check out a particular website, a particular server and see how my connection is doing there. So what you can see here, I'm going to go ahead and resave this and what you can see when this starts up, it says okay, it's jumped on Wi-Fi. My IP address here gives me the local IP address. And then the site it's pinging it's pinging 1.1.1.1, which is a cloudflare server. And it is telling me I've got a 22 second millisecond, 22 millisecond, 14 millisecond, 15 millisecond. So it's telling me what my ping time is looking like. I'm going to go ahead and stop that. So it's not endlessly pinging. And so here's how you do this actually pretty, pretty efficient, pretty little. What's the word I'm looking for? Pretty minimal amount of code necessary to do this. So what I'm doing is importing the operating system with OS time, Wi-Fi and the IP address library. Then I am grabbing my SSID and password information from the secrets.toml file that's also sitting on the board. And then we are using Wi-Fi.radio. connect with that SSID and password to jump on to my local access point. Then we have an IP address that we tell it we want to ping, as well as the timeout. And that's how long it would wait before it says we're not getting any response. And then this is setting up the IPv4 variable as IP address dot IP address, and then the IP that I gave it. And then in the main loop, we simply say ping results is Wi-Fi.radio.ping. And then it's IPv4, which is all of that info we gave it as well as the timeout. It then prints out the information. And then in this case, I have it waiting 10 seconds. If we want to ping it pretty quickly, we can resave that. And that's going to now every second, it's going to go and check and see what the ping time is like. And so that is how you can ping a server and check how long it takes inside of CircuitPython on your microcontroller. And that is your CircuitPython Parsec. All right. We have a question over in the chat that someone asked in the chat here. David Glaude, hello. Some customers have the Adabox, no one leaked, no launch video. So I have not done a unboxing yet, there's no launch video yet, we're waiting to get a little bit more critical mass of numbers of boxes going out there. We were determined to get a small batch out before the end of the year since we had some pride and some promises to get at least some Adaboxes out in 2023. So a small group went out to some customers, some of our earliest Adabox customers, people had subscribed years and years ago. We are now working on our next batches and we'll be putting out small batches and then hopefully more medium size and eventually larger batches of Adaboxes over over time. So there's no yeah, it looks like no leak yet. No one spilled the beans about it and like I said, there's no launch video yet. Look for that. Probably we're thinking somewhere towards the end of February is maybe more likely or beginning of March, mid-March somewhere in that range I think is when we'll probably have enough momentum going that it makes sense to do the full unboxing event, live event and unboxing video. And that's also when we'll be putting out the main learn guide for the Adabox that'll show all the parts and any assembly and things like that as well as links to projects with it. So thank you. Good question there. Let's see. What else? Any other questions? I think that is it. Okay, so next up. So I promised, oh my God, what's Lars doing there? Get out of there. I promised I mentioned that I wanted to do a gear review type of video about multi tools. So I've had this same Leatherman super tool that you see in this photo here for maybe 25 or 30 years now. I can't remember exactly. I think I got it around 1995, something like that. So yeah, we're getting close to 30 years if my math is right. And is that right? I don't know. I don't like to do math. I think that's right. Yeah, I've been here near 30 years. And I'll show you that one there. And then that's a I've had a couple of those I lost one and got another one. So probably for at least 15 years or so I've had one of those spider co clip it knives. So let me let me jump over here and show you those and then show you my new multi tool situation. So deal with this the Leatherman super tool is enormous and heavy. And so you see wear it on your belt in this case. It is a great one because it really does cover a lot of stuff. You've got the rulers on the edges there. Everything is contained inside. So it's a sort of the old fashioned original style where there are no tools accessible until you open it up. So you've got a really nice big honking set of pliers which you can use both these sort of needle nose tips and the main grip as well as a wire cutter and a little bit of a wire stripper down there in the bottom. And then all the tools are contained within they all lock. So if you pull out let's say this large flat head screwdriver it clicks into place with this large spring and then you can fold it back partially or all the way to use that in order to close that you then open some number of tools so that they're putting pressure on the the spring there and then you can push that back into place. You know what I'm going to refocus just because my hands are going to be a little higher up here. Maybe like that. One of the tools that I love in this is does have a nice full size Phillips head there. So that's that's a heck of a screwdriver right there. It's not much of a compromise screwdriver. It has wood saw in it and on and on a lot of parts a lot of knives in there. There's there's both a serrated and a straight blade has a metal file on the side here. So great tool but it is a bit big and heavy for everyday carry for me. So I grab it if I'm if I'm doing stuff but I don't like to carry it around all the time. And so generally I carry this little Spyderco clip it clips in your pocket or what is this one named Delica Spyderco Delica clips in your pocket you can pull it out open it with your thumb it has the little hole there for putting your thumb in and opening it that locks as well and it uses a little spine released to to close it so it's fast to deploy easy to use. And then years ago I found this magnet happened to fit here perfectly which is kind of a fun little fidget thing. And it's nice to have a magnet on you. So that's something I'm gonna probably solve that that problem in the new tool that I'm using. Funny thing about that is I lost this magnet for about a year or so and then one day I found it on the side of my workbench here which is steel under this wood part this is a steel bench and some somehow I was doing something and it got clipped there. So anyway that's what I've been using but I looked around actually because my son was asking about getting a tool he's working in a scenic shop and wants to get a multi tools I was looking around at okay what's the current state of the the Leatherman tools which I think are excellent and I came across this so I am sure this is not news to people this has been around for quite a while I don't know when they came up with this line this is the the Leatherman Skeletool and I think what they're after with that name is that it is lightweight and sort of a skeleton of of the tool you can see it's got a bunch of holes drilled in it to just reduce the weight of the thing I assume the speed holes there and it's also pretty minimal so it does have the pocket clip just like my existing knife I carry in my front pocket so you can pull it from there and it does not have a lot on it but it kind of has the stuff I need so pull it from your pocket you've got very similar type of blade which is the straight and then half serrated blade and I really like this type of blade they also make one that's just just the flat straight blade this has one of these little leaf spring type of lock mechanisms so you push that in and then close it and get your thumb out of the way before you slice it open it's not too bad actually because you tend to actually have your nail right there where where it's closing down on but you gotta be a little bit careful with those or do it two handed you don't have to be a hero so that I love that it has that accessible without opening up the pliers part of it so pull that out use that knife put it back put it away then what else does it have pretty much nothing until you start opening it up but check this out it opens that side first so I'm pulling on both sides but they've put a stronger spring on this side which means you can get to this screwdriver bit right away so that screwdriver bit is tucked away open that up and now you've got a phillips screwdriver and it's in kind of you know in line screwdriver mode and this is their own little bit system that is pretty pretty snazzy it's these flat bits so you can flip this one around and it has a little flat head on it and then you can get a little five pack of others for these or if you lose them and there's also one stored in the handle on the other side so this one over here pops out that way is two flat head bits but you've you've got a bunch of different options I think that might make hex heads and other things like that I haven't really looked into it and all of them are are sort of this flattened design so they they have to have to be fairly small to work but anyway that super useful because what I need often is a knife and a screwdriver and then last thing you've got is your pliers and wire cutter wire stripper there and that's pretty much it the last thing it's got on it at this end that you can't miss is the carabiner slash bottle opener I used it just to try it out it works fine and that's convenient if you need to hang that off of something like a belt loop if for some reason you can't go into a pocket that's that's fairly handy I was thinking hmm how would this look without it if you ground that off you'd have a little bit smaller tool but then you'd have this screwdriver bit exposed all the time so I don't love that so I think I'll leave it as is I got one used pretty cheap on eBay about forty dollars these go I think usually about eighty dollars new now so not super cheap but not super expensive and I am already a fan of it I've switched over to carrying that so and then the last thing I'll say is that I don't only have that I also always have this money clip Swiss Army knife and that one's great because I like having a money clip for cash in my front pocket and there's nothing better than Victorinox scissors so you'll notice my Leatherman didn't have scissors some Leatherman I have a little Leatherman juice from a few years ago that has scissors on it and they're they're just not that good nothing beats the Victorinox scissors in their small knives or any of their knives so this this one here is a sort of medium-sized scissor and then it also has a small blade and a large blade actually sorry it has a file nail file slash screwdriver slash clean your nails gunk out blade on there in the main blade I don't really need that stuff because I got the multi-tool but having the scissors is it's always worth having a small Swiss Army knife of scissors I think so that that is the the state of things not that I'm getting rid of these but I won't be carrying that around that much anymore and this just goes on my belt when I am more likely to need it oh the other thing is just because I brought I kind of was curious and I haven't done this yet I brought a scale in here and wanted to see what's the weight of this thing compared to the other one so it's 145 grams for the new one old one is 250 yeah so they've they've gotten the weight down obviously this has a lot more tools on it but good for them and neither of them is all that heavy you need to worry about it but those are the kind of things that tool tool people like to debate is the weight of tools and such all right so that's that's my gear report there and I'm not making any money with endorsements or anything like that we have no that is not sponsored that's just happens to be what I got we have sometimes carried some Leatherman stuff in the Adafruit store I think some of the smaller not the micro what was the other small line that they got rid of the squirt is it the squirt I think it was the squirt we had some of those for a while I think actually in the early days of make magazines maker shed they had engraved um engraved Leatherman tools especially like the anodized aluminum ones that had that said make and then like a little slogan on them and actually the the Leatherman juice I have is one of those I think LeMore did the engraving for them I think I ask her about that but I think when when LeMore was first starting Adafruit and she got a laser cutter one of the things she was doing was engraving so she may have done the engraving for that in fact wait if we go to the go to the website I think some of the ones oh man it's not oh wait check discontinued if you're looking for old stuff on the side of the pro tip on the side of the Adafruit site once you've done a search click on discontinued yeah the midnight hacker okay yeah I have one of uh I have one of these that is Radio Shack branded uh and yeah so that's the engraving I think we'll more put the midnight hacker on there um but that's I think that's the Leatherman Squirt ES4 which has the wire strippers on it which is pretty cool I like that one uh some reason Leatherman discontinued this whole squirt line so now they're kind of expensive if you go to buy these on eBay uh there's those scissors that I just don't think are all that good they definitely don't want to trim your nails with them there they'll they'll make a hack job of it but uh but otherwise a neat tool uh and then there were also these uh tread crazy bracelet multi-tools I do not have one of those but uh those are pretty wild all right thus concludes my Leatherman segment uh I hope you enjoyed that what are people what do people have uh TSA loves JP says says Todd in the chat I kind of regret this at one point a few years ago I took a Leatherman Squirt uh I think the blue one that I had that was a regular um pliers in the middle or might yeah I think it was pliers in the middle uh I dulled I think I only have one knife blade on it I dulled that knife blade uh cut it down to size to round the the point so that it would be TSA compliant and it worked I think for a few months I traveled for a few months with it and got through and then at one point uh I was in an airport and the TSA decided they didn't like the the look of it or me or something and they kept it so uh I regret that now I think there's kind of no getting away with you just can't can't bring your multi-tools on planes they're just even though there are some that are legally within the the guidelines if they feel like it they'll just take it anyway uh David asks since when are you working for Adafruit are you talking to me I think so maybe there's a lot of question marks at the end of that which makes me think you're talking to someone else but I don't know uh since when I'm looking for Adafruit I've been working for Adafruit for about seven years now I think I think this is my seventh or eighth year um so do that time math there I don't know what that 2016 is that right something like that uh DJ Devon three is the Leatherman Micro Keychain version I have a micro somewhere I can't find it was actually a a a gift from uh my friend at his wedding for the the Groomsmen I I have it but I don't know where it is yeah some of them have scissors some of them have pliers and then there's that one um electricians one that has the uh wire stripper slash plier okay good tool talk uh so now let's move on to uh this this project here the um remote control for the Memento camera so Memento camera is running an ESP32S3 as its chip so it's got Wi-Fi built onto it and we have pretty pretty robust libraries for for talking to and using that Wi-Fi capability in circuit Python as well as in Arduino so um I'm gonna rearrange this camera right here a little bit so that you can see uh see what's happening I just set some boxes here so I could try to get my iPhone on the same plane uh vocally as the Memento so I'm clamping the little Memento into a uh tripod there uh let's turn it on and I'm just gonna put some little objects in uh the view so you can see the the viewfinder there with some objects in front of it let me go and focus that a bigger monitor I can check against over here that's pretty good uh so this is um let me fix get that out of the frame a little bit this is running essentially the um Jeff Epler's Pi camera library uh camera example I call it the fancy camera um so this one allows you to use the d-pad here to scroll between menu items uh and then change their values and so you can see we've got um resolution so I can change the resolution here and then if I head right I can get to the uh why did that go out of focus again because I'm manhandling all right it's a little better now I can go to effects so we can turn on the solar eyes effect or invert it go black and white and then I can head right over here to the mode so this uh this has modes where it will be sort of a standard snapshot camera saves jpegs to your sd card uh there's a stop motion option is the Game Boy mode which I love it does real time uh dithering to one bit image uh similar to a to a Game Boy camera love that one using a bitmap tools and then we can shoot little uh 15 frame gifts little gift animations so uh the actually final menu item is kind of a hidden one here if I go to the right we can get to the led level so I can turn on the front leds my gosh those are bright a little ring and neopixels to act sort of like a flash or a fill light uh so we can change their level of brightness as I think five brightness levels and if I go right I can adjust the color so led colors there's a green uh yellow red blue purple cyan magenta and rainbow uh so let's go back I'll turn that off uh so those are all of the menu options in this camera of course you're welcome to write other functions for uh for the memento it's all open source and hackable both are we know in certain python but one thing that I was interested in doing was creating a remote for it so that I could either do a you know group photo stand in front of the camera and hit hit go or just take pictures without touching the camera especially useful for stop motion so if you want to lock the camera down uh and then pose your animated figures save a frame move save a frame move save a frame you don't want to be wiggling the camera so ideally some kind of a remote trigger and that could be either shutter release on a on a wire using an arcade button that kind of thing plugged into our little stemma ports there are little three pin stemma ports uh that would work really well uh or do a full full on remote so that's what I decided to to dive into and the question is how to how to do that so we have um really if you're using circuit python the option is one option wi-fi if you're in arduino you could also use ble because the bluetooth is available for this chip in arduino it's just not available right now in circuit python so if you're using either actually I think micro python or arduino you should be able to do bluetooth but I said that's okay I'm thinking of doing this not kind of out and about but really more in the studio doing little stop motion things how I'll have wi-fi around so how will I how will I trigger that um yeah some nice raises a good point a two second and a 10 second delay would be great features it's absolutely such a good idea to look at what did point and shoot cameras come up with 30 years ago that have always been around and pretty much all of them have a two and a 10 second delay so you can jump in front of the camera I'll hit beep and then it'll it'll blink and you get your get your photo get yourself in the photo so those are good ideas I think we're gonna add those features as part of the time-lapse photo project and then I'm thinking those will probably roll into the main camera as well those are great great great idea to have those functions so nice so the the solution I came up with for this and you may have seen it on the show until last night is to use OSC which is open sound control open sound control is kind of like a more modern version of midi in a way it's meant for some similar applications for instruments synthesizers talking to each other talking to computers talking to mobile devices it's very popular among people who like to create their own user interface on something like a tablet like an iPad to control whatever functions they they come up with on either software like ableton or hardware synthesizers that have a way to communicate with with wi-fi or ethernet using OSC so OSC generally runs on UDP in your either wi-fi or ethernet environment and there is I've shown this before on the show a really nice library that Todd Kurt wrote which is the micro osc library so that's what I have running on here and that allows me to take incoming messages and do something with them so let me do a little demo enough talk let me do a little demo here of what we're talking about so I'm gonna open up my phone here and I'm gonna launch touch osc so you can see touch osc has a very customizable interface it's not one thing it's kind of a blank canvas that lets you introduce different user interface elements such as buttons which can be different shapes in this case I've got a couple round buttons on here it allows you to add labels boxes and then more specialized elements like faders radio buttons which are kind of groups of buttons that have exclusivity and then rotary encoder like shapes and potentiometer like shapes those are some of the the key ones that you run across and it allows you to also create multiple pages of your interface with different elements on them so you can see my main page here I just wanted something simple really my first thought was I just want a shutter release button so you can see here if I tap that button it took a picture it said snap it saved that image onto the sd card one of the features in the esp camera and pi camera and jeff's main example code for this point and shoot camera is a autofocus so on the hardware device you can long hold this cheese button here the snapshot button long hold that and it will run the autofocus algorithm checking for the nearest object and then changing the lens focusing motorized lens focusing so I've added that button up here in the corner says focus and you can see it just changed focus hard to tell so let's move this battery a bit closer can it focus on that there you go you saw a little change there so that just did its autofocus so that's that's kind of two main buttons I have there and I can take another picture and then since we have those modes on the UI I decided to give myself a set of them that are available so I can change this into gif mode into gameboy mode into stop motion mode and so you can see here if we if we do our let me refocus it down here if I take a snapshot and then move this block you can see the little ghosted image I'm gonna put my hand over there you see there's the ghosted image of the previous frame so this is perfect right I'm not wiggling the camera I can see let's say I'm slowing down I've been moving I'm slowing down so I'm just going to move it a little bit each time and I'm taking a turn so it allows you to compose your frames based on what was in frame before prior frame so really nice for that but then I also have all those other settings and I didn't want to clutter up the screen here maybe I could have moved these over to the other page as well or make a make a duplicate of it in fact that might be a fun exercise to show you how this is how this works to set these up but I did make the second page here called settings and I've got all the settings on as you can see right now if I touch any of these items on the left I'm changing the resolution that it's going to save the images at for jpeg mode and stop motion mode I think I think both gif and gameboy mode are fixed at 240 by 240 they're at the smallest resolution just to make those ones work the way they should work but here you can see I'm in stop motion mode we can go back over to jpeg mode I can pick any of the resolutions available and you'll see it gets updated here on the screen let's drop back down to 800 600 then I have all of the effects so right now we're normal I can invert black and white put this reddish gel in front of it greenish gel bluish gel sepia tone for all your old-timey photographs and solar eyes now solar eyes is interesting because it works based on the brightest colors get inverted and so it looks quite different depending on a what you put in in frame so here's a red object and that's showing up green same with these kind of orangey orange dot up here but it's also very influenced by your leds that are reflecting light so if I crank up the led brightness and change you can see we get different effects in the scene which is pretty cool that one's nice that's the sort of magenta light depending on what kind of light you're throwing on the scene here it is with with no light on it so kind of fun to be able to play with those and again it's nice to have all those effects and colors at your fingertips while you're while you're messing around with it that's always been kind of the beauty of a separate interface for a camera so camera apps for Canon and Nikon those Olympus those kinds of things have existed for a long time and they're great because the camera has such a small UI such a small display usually and the buttons and wheels and things are sort of serving many different purposes so it's it's you can't argue that having a dedicated UI like this can really help you with advanced features or just accessibility of features so take a picture like that so how does all this work let's uh let's look at the um oh here question in the chat so nice I wonder if you could use web RTC to get a picture or stream preview on your phone yeah I'm wondering that too I'm gonna talk to Brent who I think was looking into some of this stuff and I think Jeff Epler has done some looked at some webcam like features so uh yeah that would be kind of interesting to get you know nice big iPad view of the of the scene um good question there so uh let's take a look at the code that I'm running to make this work uh and then I'll show you uh a little bit about how you create uh this type of UI with touch osc um first thing I'll say is that osc is an open protocol that was created I think at Berkeley um Cal Berkeley originally in around 2002 so it's not super new but new compared to midi going back to around 1983 um and there are a number of applications or you could write your own application that will work uh in this realm um and send osc in fact you could probably create a microcontroller with osc and hard buttons on it that are doing the same sort of thing as here you could build a whole hardware interface as long as your microcontroller can send those um those osc messages it should all work um I happen to be using a particular uh application called touch osc which is um about I think three dollars for the original version it's called mark one now and that's been out for about 10 years or so it's a really excellent application this is the new version that came out more recently it's uh I think 12 dollars for the iOS application I believe it exists on android as well and then on the desktop side so you could be doing all this from your desktop you can also just use the desktop application for your interface development you can develop all the interface right on the mobile device as well but it's nowhere near as easy or quick as using a mouse and keyboard in a large display so that application I just bought it for 25 dollars it's normally 30 but they had it on a little bit of a sale so let me show you those again this is not a paid endorsement or anything like that it's just what I happen to be using so this is hexler.net touch osc and you can find out pretty much all you need to find out there there's a a typical layout that you would build for a iPad or a tablet to control a bunch of synthesizer things media things video DJing lighting whatever you're doing with it these are there's some typical user interface setups that you'll you'll use and here's some photos of it running on different devices so let's take a look at my setup here and i'm going to plug the memento in so that if we do change code we can do that kind of on the fly and I will open up learning my lesson on making sure there's at least one tab in sublime text before I close a tab because if there's none then it leaves the broadcast so let me open up the code.py that's sitting on the memento so this is the app it's a mess right now needs to be optimized but it basically took Jeff's main what I called fancy camera in the in the guide page take Jeff's fancy camera and graft the touch osc stuff into it or the osc stuff it does not need to this could be driven with anything that can send osc messages I should I should clarify I just like I said I'm using touch osc to develop the UI and it's the one I'm running but all of the functionality on the microcontroller side on the memento side is just listening for certain messages that are coming from certain osc addresses and I'll get into that in a second here so you can see a lot of this is just going to be the pie cam stuff from the main fancy cam and then I've added into here os wi-fi socket pool and micro osc micro osc by the way is in the community bundle so you can use circup if you want to circup install micro osc and that will put it on to your circuit python device that's currently plugged in thank you by the way Steve who dropped a link in the chat for the touch osc I forgot to ask you all about all this stuff I think you know I'm way new to to this and I think Steve has lots of experience with osc and touch osc so what's happening here I'm setting up a host which you can give it an explicit address or it will use the ip address that it gets on the network so this is going to jump on my wi-fi and it's going to get its own ip address I need that ip address because that's what I'm going to point my application on the phone to in fact if you if I close this and if you look at my connections in the app for osc here is 192.168.1.26 that's the same address that this device has in fact if I relaunch the device in here you should see it jump on this local access point and declare its ip address that it gets to be that 192.168.1.26 if it isn't then i'll change what my application is using as the server so there it is 192.168.1.26 it just kind of scrolled by a minute did the the camera startup stuff so next in the code we have um handlers so the way the touch os sorry the way the micro osc library works you'll see all the way down in my main loop ignore all this stuff that's all the sort of physical button camera stuff which i'm gonna try to functionize that stuff so that I can reuse it more easily the very top of my main loop that right there is all that's happening osc server poll so it's just checking on every cycle is anything coming in on osc if so it's going to be sent to this handler or rather this dispatch map so the dispatch map here says when we get messages coming from osc they'll have these addresses so you can see it almost looks like a folder hierarchy so the root followed by page one or page two so i'm sending it remember i have two pages in my application so my my buttons live on either page one or page two and then my buttons have certain names and those names have a namespace like fader one fader two toggle one toggle two button one button two button three button four button five so as long as the sort of first part of that address matches one of these things then i can dispatch those two functions which are called these handlers so i have a fader handler i have a toggler toggle handler and so on this you can see by the way i'm not doing anything special based on which page they're coming from so i could probably clean this up and just lop off use split and lop off the which page did it come from and just say for our purposes it doesn't matter it's just which type of user interface element it is then if we scroll up a bit we'll see this is where my code is just a big copy paste and i'm sorry about that but toggle handler if i have a toggle right now i'm not actually doing anything other than printing it so maybe we'll add a toggle and look at that fader handler you can see i am taking the address and splitting that out chopping it into parts i have the page number there i'm not actually using that this was just i think me learning how to do this right so that'll let'll leave and then fader number is me making an integer out of the number on the end of that name so slash one slash fader five i'm just grabbing that five and then i'm using that for deciding what each different fader does so in this case actually only at this moment have one fader so if the fader number is fader one then i am adjusting my led ring the brightness on the led ring with this pie cam dot led level is equal to this variable that i created led value so that led value again it's an integer i think all of the values coming from osc or floats so i'm taking that float zero to one which is part of the message it's this argument zero and then i'm multiplying that by five and that's giving me sort of five steps of my lighting which is what pie cam expects light level zero one two three or four so that's a typical example nice and easy one actually then radio handler i have a bunch of these radio buttons and i do the same sort of thing i kind of parse out which one is it if it's radio button one then what am i doing with that i'm changing the modes so that is this little set of mode switches here so you can see when i touch one it says the message coming from osc is page one radio one and then the value that we got was for one and so this is zero one two and three those are the different values that this radio button collection it's actually one one thing that has four values that it can send so zero one two or three or is it one two three or four it's one two three or four so if i get are you really one why does this work i'm confusing myself but it works at the moment so i have to dig into that but this is basically saying if that radio number is one then we're going to switch to pie cam mode whichever whichever pie cam mode it is jpeg if gameboy or stop motion and then this is the button handler so so a good example of this one is taking the picture so if that button is button one and we get an on switch then we're doing all of the typical snapshot stuff that this button up here does hey that's not working now why is that not working i haven't i haven't tried any of these hardware buttons up here for a while since i oh there we go try to take a picture and so then i have the same sort of thing for this focus one that's a coming across as button two it says button two is on and then when i release it says button two is off so you can do things on send and release if you need to and that's kind of the bulk of it so so that's what the script is doing it's just kind of replicating all of these hardware buttons but with these osc messages using this little dispatch map for messages that come in so we can do something with them and then using these functions up here as these handlers to to pick what they actually do so what i wanted to do now is actually show you what the application looks like in fact let's uh this is probably a good way to do this so one of the coolest things about development with this uh i have to change this camera let's see can we get this kind of view yeah that'll work it'll work pretty well uh so one of the really nice things about development in this version of um touch osc is that we have this desktop application here right um and i can create things in it we'll show you i'll show you kind of how i like setting this stuff up so far again i'm very new to this so i i could be telling you um weird ways of doing it but it's what i've been doing so far so i'll share the experience um you can develop entirely on here and then um preview it in a sort of preview mode that's functional so if i create a that's a box actually let's create a button so you can kind of preview the functionality here you can even hook it up i could hook this up to the camera and work it from there uh or you can set up a little server on the computer which will serve the sort of live version of this over to your uh phone so all i need to do is look for uh this says available servers i've got my uh jep iMac pro i'll hit connect and so now i'm looking on the phone at a live version of uh what i'm editing so you can see here as i if i use the like the arrow keys to move stuff around you get a live preview which is so great i mean it just couldn't get more immediate than that uh and like i said you don't really want to edit this on the phone it's it's awkward because you don't really fingers are too big and you don't have right mouse click and stuff like that uh so delete that stuff and let me just show you um a little bit about the setup here which helps i think to explain some of the addressing things uh so in this document let's let's just start with a button um make one big button right in the middle there so over here on the right uh of the interface let me see that yeah uh this is the i love this i love having sort of a document and object inspector uh it shows me the hierarchy of things the names of things um and so this one here it's called button two currently let's rename that button one just for fun i can go in here and change its color and we can adjust fine tune its position and its size there if we want to uh but this name right here button one that is the name that's going to get sent in the message so this is kind of uh one of the neat things about osc it has these very human readable messages where you can look at these addresses and determine which objects are doing what um we can do things like give them uh borders here's a nice full border on there and again this thing is live so as i'm creating it i can i can do stuff right here we can um then say what messages actually get sent from this thing by default it sets up doing some midi as well as osc i'm gonna just delete the midi out of there i'm not using it so delete that make sure you can see this down way down here at the bottom yeah uh and this is the osc messages that are going to get sent so right now i'm finally the defaults it gives you what you need basically which is it's going to send a toggle basically or a momentary on or momentary off those one and zero messages that we were seeing before just with this address of button one so let me see can i question is can i actually show you as many screens as i want to i think i'll have to move some things around hold on one second oh you know what i'm just gonna hide this for a second okay so with this new button one you can see i'm getting messages for button one coming through they are not triggering my camera because they don't come from page one so these this button lives on the root level so remember my my camera app was looking for something named button one in order to trigger but it needed the address to come from page one or page two i think i can't remember if i if i specified but this address is actually not being looked at by the dispatcher which is there's no root button so we could either put my button on a page or we can change the handler let's just try them both so if i say button button handler and re-save that it should we'll see if i get lucky should take a picture when i press this oh it crashed it why what did it say invalid syntax for integer with base 10 okay so let's go let me go look at what message i'm sending with this big blue button versus the one i'm sending with the the circle red one that actually works let's go here uh and so this is sending enable send the touch address name arguments page so trigger on page any with touch arguments x arguments page all right uh oh i'm looking at the wrong thing sorry we got to dig a page deeper into here okay now i can touch the actual button so so i'm sending it looks like the exact same thing so i'm not sure what it's what it uh disliked about the message coming from that i'm sure it's just a nuance of of the type of message i'm sending to it so let's see is there i'm just going to take a snapshot of this real quick so i can look at it okay so enable any touch address parent name name argument yeah i don't actually know what is let me look at some of the other settings on it what is wrong with the message let's see momentary was this momentary yes press release value position type float default zero current zero pull zero okay i don't know i won't try to run the camera off of it but i'll show you how it's built so i'm i'm sure i'll figure this out in time but right now i'm not sure why so this the reason this thing needed its own special handler let me go back and and fix that in the code here and get rid of that i don't want to i don't want to use a button that's not on page one or page two so i'm gonna take that right out of there resave that and then over here in touch with c i'm going to just cut that off of there i use command x to cut it off of there and i'm going to add instead this let me zoom out a bit i'm going to add this element called a pager and this is sort of a high level object that contains pages you can see it contains three pages right now and we can go and add more remove some so if i remove page three and then go ahead and paste my button back onto page one here or put it on page two let's go to page one since that's what we're seeing down on my phone now the button showed up but you can see i get this this little pager thing so now the address of that button is going to be slash one slash button one and so if we go back and look at what the REPL is receiving there we go oh his name is button four now and that's because i cut and pasted him a few times that's okay if i name a button one i'll probably crash the camera so i'll leave that alone but this is sort of the i think the key to the addressing system inside of osc is these parent child relationships and objects tod was saying in the chat let's pop this up for a second so i can read it over here the new message you're sending has the address button one but those are slash one slash button one adding the pager should give you the slash one right okay so let's see maybe that does actually stop it from crashing if i name this button up here and oh you're not seeing that sorry you didn't see when my my phone crashed earlier so should that be receiving that message why not oh yeah okay i see so it's not sending the address as part of that's what tod was trying to tell me okay let's see why yeah i noticed that down at the bottom i thought it would fix itself when i put it on a page so we'll open up page one the button so add a content the constant into that's interesting i don't know how to tell it to send that properly let's make a new from scratch button because i suspect it'll do it right if i do it though yeah so whatever this however you get this address to send properly it wasn't yeah address path in the object so i needed to to fill that in there which i'm sure you can do if you know this thing but i don't okay so let's uh so this is still on page one and it is going to be named button one when i rename it uh it's now gonna send this proper address before it was only sending the slash in the name and it should take a picture yay takes a picture um thank you it takes a village i'm very appreciative of people watching over my shoulder here to help me figure that out um and so i'm imagining you can you can do some uh adjusting of what there's there can be a difference between where the object is in the ui versus the message that it sends so it's it's possible to send send the message differently than than how it gets created by default as you saw okay so that um that's the basic button there you can see this choices i made about shape i made minus circle made it actually a circle there we go right so that was that was the genesis of it uh most of them follow that sort of pattern the other objects that you saw me put on were things like a radio button so radio button um is a button that can either be it's it's a toggle button that can be on or off but it's also got exclusivity within its group so if i turn one on they're not all staying on um and i'm sending it messages that it doesn't know what to do with uh so i'm confusing my app over here that's okay uh so that's a radio button you can orient them differently uh so you saw mine were all vertical over in the this app here actually okay the the jpeg gif game boy and stop motion those were a horizontal one but over on page two you can see i got all these vertical ones that's simply by picking this element telling it that it has a north or a south orientation so i think we put it to a south orientation we'll get button zero or value zero up at the top so let's see orientation is east right now so i'm gonna go south it doesn't rotate it so you gotta do some some wiggling around of it there but that's how how those uh objects work there and then for this fader just because i wanted to see the the bar lit up underneath um i used a fader and then i'm just taking its values which happen to be float values and sort of snapping them to integer values in my code uh so that's a fader object so you can add a fader it does fader-y things which is cool um then there's these neat sort of potentiometer style things for essentially going from zero to one zero to zero point zero point zero to one point zero uh or encoders which are more like a rotary encoder in that they can go continuously in a direction and just keep adding values on or subtracting values depending on how you're using them so those things actually probably all showed up in my REPL let's see if they don't crash the the app let's restart my microcontroller here let's see if it can receive those without losing its mind i think i don't have any so there's encoder one uh and you can see it just adds or subtracts little increments and here's this little radial which goes from zero point zero to zero point one as you move around so that's the development side of it if you are done with that you can of course save your work as you go save these as their own documents and then so you're not serving it from this editing session into your phone or tablet you can copy that actual touch osc file to the device i used iCloud to do it but any any sort of way that you can transfer an actual file to the phone which is still surprisingly difficult by the way i can't believe i can't just open the phone on the desktop and drag stuff to it or something this is always through one of these cloud things which kind of drives me bonkers but i put it on iCloud and now that means i can close this session and i can even turn off this server here so i'm no longer serving up this and now i can go there's a import option in here to import the file or is it here yeah in here you can import your file and then just open it so that's how i have that's how i have this on here this this one is not this session you can see if i move something on here this is not that live session that this is just a saved actual file that i'm opening so now you don't no need the computer around it just lives on the device and you can go and control your your camera with that like so so i can hide that out of the way get that out of there yeah so so now you can see i'm back to no computer involved but i have a nice little ui uh last thing actually that i want to show in uh the ui is one um one trick i did so you can see here when i'm touching these circles those are buttons that i've disabled because they live on top of they're just decorative they live on top of a radio button setup so that they're exclusive otherwise if they were just straight up buttons um i'd be turning them on oh buy some nice thank you for stopping by gotta run um you can see that uh i'm lighting up the radio button colors to match um this is way beyond what the interface itself can do but thankfully it has scripting in it so let me actually bring this back up here uh in touch osc like i said i've got this separate object in fact let me start let me restart the server and i will launch that live version okay so you can see as i uh try to touch these circles it doesn't do anything those are those are not actually what i'm touching uh i'm touching radio buttons um if i take this and just enable the outline on it you'll see a little better what that object is edges for it so now you can see that's actually the object that i'm messing with uh how that is actually getting those colors is because i got a little script stuffed into the bottom of it uh will it let me it won't i'm gonna copy this and put it into my scripting view can i do it all in a copy uh so let's go over here for a second and we'll paste it here and let me see if this uh sublime text will do some markup for lua i can't even remember in who how do you pick the grammar syntax here we go lua uh okay uh so this is really cool it uses lua script which i don't know well i've i've bounced off of it a couple times with the norn's um monum synthesizer device but i really don't know lua so uh i'm copying and pasting and editing and and trying to understand but i can't do anything from scratch but what's happening in here is we we just have a function in the script that is on value changed so this is a sort of a pre-baked type of function that will when you change a value on the control that it is embedded in it's going to run what's inside there so when that is when the value is changed and it's taking whatever value you've changed it to so zero one two three four and then it pumps it through these little guys here that i have so says if the key uh is x and sorry and the self dot values dot x is zero that means i've touched that first cell there then it does this and it says self dot color equals and i'm giving it a color it uh it thinks in float i think so it's i'm using a convenience script that turns the hex value into internal float uh and that is it so self is the current object and then the color attribute is being changed so that's all i'm doing to be able to adjust those but it's super powerful you can touch one thing and have another object move around and change its name and stuff like that uh and again it uses the um addressing hierarchy to do it so you can say things like if self parent children label one values text or rather you can direct something at that so what does that mean that means the current object we go up to its parent which is page one then we come down and look around at it's at the children which are basically the siblings of the current object and look for something named label one and then it's going to change the values in this case i changed them to the text to be the word blue button so really cool really interesting that you can do uh some sophisticated this isn't that sophisticated but the fact that you can drop in scripts onto the interface itself is pretty darn cool means you can invent stuff that's just not really possible with connections and attributes and nodes that exist inside of touch osc by itself so pretty wild pretty neat stuff so i'm just dipping my toes into that but i'm excited about it if you have suggestions on resources for it that you like for for osc in general for touch osc in specific one nightmare is that the original touch osc and the new touch osc have the same name so searching for stuff and excluding the old version is of course a pain this always happens with with major releases of software um the new the old one was renamed that's i think always the more difficult way to deal with this uh i would always recommend make your new thing have a distinct name so it's searchable you can't really exclude the old results with a new name for the old thing rant over but anyway touch osc mark one does things one way most of this stuff i'm interested in is new new to the new version so i think the the resources will will be out there i just haven't looked at hard um all right so any thoughts or questions in the chat let me know davodesa informs us there are 29 days in february this year i did not know that it's a leap year that's what that is right all right so that is it that's my uh my interface i'll show you it uh in fact the default um sort of canvas size or document size is ipad sized so um i opened the exact same thing up on my ipad and uh this probably just works maybe you got a new address let's find it 126 done run let's reset that look oh it's still starting being impatient with it hmm mysterious what have i done why are you not connecting let's see do i have that address right 1681 oh i'm maybe not on the local wi-fi on this yeah i'm on a different wi-fi so let's get on the net let's get on this network that's asking a lot of it to leap across networks now you're very welcome dj devin three uh helps me to learn it to try to explain the little tiny little bit that i know but it only really took like a few hours from zero to get this interface put together it's really intuitive and there are good resources i shouldn't complain too much there are good resources so i got up and running quickly all right come back here we're taking pictures with the ipad so now we have that right focus pictures turn on our lights whoop and so on so super cool uh hey mary mayor uh welcome bummer getting here late it's okay thanks for joining cool fish emoji let's bring the discord in let's appreciate that cool fish emoji oh that's a youtube i can't show that can i i don't have that added i should uh okay so that's just about it i will bring up again our friend revolver osalot to remind you that you can save 10 off uh of your order for everything you buy that's hardware uh no software gives to kids for subscriptions but if you buy some stuff uh go to aterfruit.com throw some things in your cart get 10 off by typing in osalot uh and that's obvious i should be obvious i shouldn't say it's maybe obvious it may be a parent that that was inspired by osc that that we worked with today osalot osc was on my mind uh so yes osalot will get you 10 off in the store today there's lots of cool stuff uh look at this stuff did you see these new solar panels look at these if you go to products new products of you all we got these really nice looking little uh voltaic brand panels the premium stuff this is not not your uh cheapy solar panels you find in a box of cracker jacks or something this is the the good stuff um so you can go throw some of those in your cart uh we also have a nice um charger that could go go nicely with any of those or a bigger panel too uh we now have i don't know if these are new or not but we have these ginormous of those uh great for like camping throw on your backpack um but maybe that's not what you want but you might want something else so if you throw some stuff in your cart uh don't forget to get yourself a discount by typing in osalot in the coupon code field all right have we done it have we covered it all i think so uh thanks everyone for stopping by it was fun hanging out with you i will uh refine this uh camera remote script a little bit and then i'm gonna write up a guide on it and save save those files so you can just load them up i i will try them also on a android i have an android tablet i'll try it on uh and i don't think i've tried it directly from the mac device but it's allegedly works on raspberry pies and linux on a mac on a pc um so you can you can control your camera from all over the place uh or do other neat wi-fi stuff so there you have it thanks everyone for stopping by uh i believe uh scott is possibly doing a deep dive tomorrow if everything works out uh look for that and then we will be back next week with a whole slew of new shows for you so have a good friday have a good weekend and thank you for hanging out with me for ita fruit industries i'm john park this has been john park's workshop and i will see you next time bye