 All right, we did a what is this? Hey everybody and happy Halloween. Welcome to show and tell what's like the day of Halloween Eve Eve It's Halloween somewhere in the world or if you start leaving the planet earth if you could be faster than the light You would be able to see the light beams that bounced off from planet earth and be able to look back and see You know Halloween, but if you're out somewhere else in the universe and looking towards Earth it's still Halloween sometime in the past Good We're just a background radiation here So this is show and tell we check in with people from the it for community and beyond. What are they working on? They 3d printing coding Roboting Hacking and more First off, we actually have Jay from did you key who's good here? Turn this on this is actually the first test. Okay everything seems to be working. I Upgraded my robot from My Italy trip recently is maker for Italy a bebop, and I just finished it today It's using a person sensor and a pico to do facial tracking and basic stuff But I did upgrade this up here, which if I can pull it up really quickly I'm trying to pull my phone really fast. It's a C studio camera. So like now I can like live stream somewhat Nice Yeah Yeah, super con is happening this weekend. So I'm hoping to wear it bring you with me and then also See what my robot sees I guess when I'm walking around effective on things Wait Yeah Have enough room to make a soundboard in here. Yeah problem. I love the I love the little head in the eyeball motion It's a very cute Yeah, I have to fix this issue because it was having I took it once I get to Italy it was doing fine But the legs have broke off so I spent the week like upgrading the legs and Actually, you know making them a bit tougher and adding like little metal rods in them so they can take more hits So hopefully you should be fine for this event and good and ready to go But you know you never know until you have to test it. Yeah, well, but it seems like there's like pets like you're just constantly Taking the vet My main problems I keep taking them apart because they have useful parts and me forgetting that I don't have to do that anymore So, yeah, I'm not used to I'm used to being poor. Okay being poor means everything must be recycled Yeah, every part can go on to something else. Yeah, only now. I'm starting to stop that So hopefully if this one survives the vacay instead, this will be my wearable for events that are happening suddenly and also still have binary that blows bubbles and stuff I just finished repairing that yesterday. So just been a whole bunch of upgrading and repairing for the last week All right. Um, this is super cool. Um, folks will probably see some of the talks and more That are at uh super con Um I started hackaday a million years ago. I've nothing to do with it now But there's an event called super con which is the hackaday conference There's a hackaday prize. There's all sorts of stuff going on. It's neat. I like seeing it. It's still around It's still something that people Love and cherish and enjoy and it's a one of the few places besides maker fair Which you were just at where people can hang out together And do really cool stuff with electronics. So I'm looking forward to I know you'll post something from it Looking forward to uh living through your robot eyes, perhaps Definitely, I'm trying to do my best to post what I can but you know Hackaday's like nerd Thanksgiving. That's what I call it because it's a whole bunch of food and that's chatting about projects So I'm excited for it. If you're coming. I hope to see you. Yeah I will always be there. I'm friendly usually I think What are you going to eat when you've had enough to eat? Yeah, well, you have a robot When the robot's working and you've had some good snacks. All right. Well, good to see you and happy travel safe travels and all that Okay What you got going on? Oh, I told them I told folks in the inter internal meeting I got in the fight with a palm tree Yeah, you should see the palm tree Yeah Two weekends are pretty it's like oh, I went to the mosh pit and then when you're like and your theories are like I was cleaning the house Dan was like, did you get swiped by a cat? Yeah Uh, Ari's learning what a nose is my kid. He likes to see my nose now. Um, anyway, so It worked it worked things. Uh, I've been working on switching us to a split heap, which is uh What we used to do in circuit 5th and 8th and below is that like as the vm started up We would take all the remaining available memory and we'd say this is for python That's great until you want to put things Uh Outside of the heap as you're still running python So in micro python 121 they added the ability to start with a small Python heap and then grow it as you go along Um, so I just made a pr for that. Um, and relatedly somebody had filed an issue long ago Um, it's like in the 2000s number wise But uh, Dan went through all the long-term issues over the last weekend and and picked this one out and said this still happens So I investigated it a little bit and on my screen here. I have the Uh, a version of the sample code And I just wanted to show I added this thing in debug builds With this, uh, where if you allocate something that's way too big it'll print out a map of the heap Um, so this is definitely not going to succeed. This is like, uh, 100 k And then, uh, this is code that micro python already had in it, but it explains What is on the heap already? And in this case what you can see is this t is for a tuple or tuple Which is like that parenthesized multiple values in it And you can see that there's lots and lots and lots of small tuples with, uh, free space in between So, uh, it's pretty common for people to say like, look, I ran gcm free It's like 60 k. Why can't I allocate 256 bytes? Um, and this is why Um, this is called heap fragmentation meaning that all of you, you have a lot of free space But none of it is right next to each other. Um, and so this is a pathological case That right now we don't have a good answer for how you fix. Um So unfortunately there's no magic bullet But I thought this is a cool visualization that they have And I I made it trigger when you fail to allocate something because that's when it's the handiest And you can actually see here, um, like these are the different Pools now. So like as you grow the heap you get separate pools So this is one and it starts with smaller ones here So you can you can see all the different pieces of memory that they're using for them And why is there space between the tuples? Is it like you can't you have to have it on a boundary? And so or is it like to grow you need to be able to It's it's it's the difference between uh, so when you're doing Let me show you so the code that it's doing is it's storing 500 values from like the magnetometer And so what you're doing is you're You're doing some temporary allocations To to compute the like final tuple that you're going to hold on to Oh Like this call the clue dot magnetic is doing like four allocations or four blocks of allocations Then making the tuple that you're going to hang on to in this list for a long time And then it goes again. It goes again. It goes again. It only collects when it can't allocate So all of that memory that you use in that computation Um is kind of left there until you absolutely need to take it away And so you end up with those tuples evenly spaced throughout memory And then all these little holes when you do this the garbage collection Oh because it's not Yeah, I was like, oh, why don't you stick the new tuple allocation in between but it doesn't doesn't know that those are free So the right thing to do would be to do a gc collect after every Four whether it's whether it's the right thing or not. I don't know. Yeah, I know right but but it would like Cause it to compact more I think You know, it would be interesting even probably try that I mean this is if you said it is a pathological case, but it would be interesting to have a mode That you could set in circuit python that would say hey After every 100 k every every time the heap grows by 100 by you know, one k Automatically run the g like be more But you'll still get that spacing in whatever unit that you choose to do Um, but I think your point is like if I do from a to fruit clue So I'm in a I just restarted the rebel, right? Yeah, so now if I do um The a equals if I do it again, but I do a collect in that loop Yeah, it's probably gonna be different. So for I'm just curious. I know I'm curious to know Okay, you're doing like free free solo python coding I I don't do a lot of like in the rebel stuff But this issue actually only present itself in the rebel because you have to do the whole compilation stuff Every time you type in a line. Yeah, that takes that takes larger chunks of memory than if you Did it in a file where it does all the compilation and then runs But you don't ever need a big chunk of memory. It runs just fine. Okay, we're actually good to have to do it in the rebel Okay, so here now we're going to do a bc collect so We'll look that run So it's slower Because gc collect is not fast because it's looking and trying to decide everything Um, and it did have to do a malloc. That's a debug print that I've gotten this build. Yeah, so now let's do the fight array 100 times 1024 again the thing that's going to fail and print it out. Ah, see So it did compact it a lot. Yeah So now you can see that it's all these t equals next to each other Yeah, and that's because those temporary objects that we're doing to compute the two will get cleared away in the collection Just carry me look because I recommend people do that But I mean and here's the thing you don't have to do it every line You could say like if it's modulo 10 equals zero, so you can do it every 10 Um, but I see what you mean. Yeah. Yeah, and it's deceptive here because like The way the the code is written is that list of 500 stays the same, right? So you would think that you're doing the big allocation, but that list is really just pointing to all these individuals. I know we need handles Yeah, it's memory management is fascinating and that's a great example Okay, we can link people to this when they have fragmentation issues We'll all work that I'll send this to somebody. They're like, hey, why is this not? Why can't I okay? I'll be like we're back to the defrag. Oh, yeah Moving memory is really hard and that's like explicitly something I'm I'm moving us away from with This split heap stuff is like we used to actually do some memory moving and we have like all sorts of problems Particularly on the rgb matrix with product. Yeah, it's like Computers do not like it when you move memory from a location to a different location. They're like you got to know everywhere to update Yeah, that's why we're going to be managed. They're like, oh, we should add another layer of abstraction Like that's that's how they do it. They're like I had a I had a friend be like Why don't you just use cortex a's and use their memory mapping stuff? It's like, yeah, I was All right. Well, thanks for this mini deep dive scott. Yeah, thanks and uh, thanks in advance for tim to do deep dive this week and next All right. Thanks. Thanks scott. Thanks scott. Okay next up is Hello gigantic clock which is an inset not it's not actually on your wall Yes, we have a adabot lego for scale Uh, but I've been working on a project that's an earth and mars clock and she's using the four inch 720 by 720 display with a qualia board that's off to the side here And so mars has its own kind of timekeeping thing Called mtc and so you can do a calculation Um to convert utc time to mars time. So right now the earth clock is showing Eastern standard time come on the east coast and then when it goes to the mars side, um, it's sewing the mtc I do need to try to get the mtc to be a little bit more accurate in circuit python because I notice it's a little bit off from when I do it in desktop python where I, um Did the calculations originally but um, I think we'll get there And we're going to use cap touch do cap touch around so you can switch between that way right now I just have it doing every 10 seconds for demo purposes. Um But the I think the coolest thing about this is figuring out the rotation with the clock hands and getting it So it's pointing at the right spot depending on the value and I might post up a demo that, um We'll show it Sped up. Um, you can see the minute hand going in the hour hand slowly moving as well. Yeah kind of cool Yeah, that's tough. There's a lot of trig there. Yeah. Yeah That's okay. Cool. See you really use that trigonometry one day. I know Go back to four three. I actually never got to trig in high school. So it was uh, yeah So All right, thanks so much. I thank less All right jp What you got going on this week? Hey, I've got some pokemon stuff going on this week So here's my uh nintendo switch and I've got pokemon shield on here Uh, I'm not hardcore. So I'm a bit of a poser here But there are hardcore people who like to do weird stuff like hunt for these really really low odds Characters that are shiny variants on characters like one in four thousand chance of finding them Same with cross breeding eggs to make really rare pokemon But one interesting thing is that some of the techniques used to to do this involve really tedious stuff like Spinning your character around in circles. So if you spin the analog Thumbstick your character will spin in a circle if you let go after a second she stops So for some of these hacks people just want that going on and on and on for like an hour or more They're odds of there and I'm not going to do that. So Uh, honest suggestion from the more to look into some pokemon automation stuff I've come up with this pokeball right here, which when I plug in it's going to be my left thumb so You can see I'm hands-free, but it is now The left thumbstick for me And I can go and grab myself a drink and it is going to just keep doing that forever and ever Until I unplug and then she'll strike a really cool stance Yeah So this is I'll I'll go over this tomorrow on my show on the workshop show, but this is Super simple. It's a pico h and it's one jumper cable and uh, thanks to lemur who had me simplify this from some other nonsense I had going on. I mean, it was it was good, but I was like, I was like, let's make it like really really easy This can be yeah, so this is the pico h. It comes with the header pins on there. This is a Socket to socket jumper cable you can basically ground any Of the pins on here and almost all of them act like one of the controller buttons on the switch And I'm choosing to use one that I've Allocated to be a macro so I'm going to show how to set up macros using gp20 40 c e It's really cool. You could use this for other like quality of life things in Zelda in animal crossing if you look at hacks that people have come up with There's even some commercial products that are little bluetooth dongles That run some of these hacks we can we can do a bunch of them for what is that like a five dollar micro controller I think it's a great first like if you would you know nothing about electronics and you want to get into tool assisted You know, um speed running or it's just you know, uh coding Like I think this is a great like you don't need anything but like a cable usb cable a single jumper wire and a pico h That's all it is. Yeah, I've even seen I don't know if this is plausible on this or not But I've seen one of the hacks people do is like a perfectly timed Mario odyssey throwing his hat jumping landing on his hat throwing his hatch So you can like cross big spaces If you're really good or if you're a huge cheater with a microcontroller. So I make it that That's it. That's a good one. All right. Well, thanks so much jp and folks can tune in tomorrow and see All this and more we're going to be playing your power washer thing on uh, oh very cool. Yeah Thanks All right, next up. We got three folks who just Downloaded in we're going to go to david the needy Devon two and then delchi david what you got going on the suite? Hello Well, thanks to the daylight saving which is different in europe and in u.s I can go to your show without having to sleep very late Yeah, so this is steady red spin for the halloween with the red acts Oh Nice, uh, I took your coat Because I was not able to use the new one from jebler and I extracted all of the image I've changed the blue into red and then we inserted that into the thing So that that's the first step of of my halloween's trick Then the second trick is um the feather with usb host And what you can do is to um turn on and off a usb device So Like this lamp I can turn it on and off Okay, so the last trick is that the Teddick's ribs being um will turn off if you Connect a usb to it So it works reverse to the lamps If you give it power it will pose because it try to Share the file system and then when you cut the power it goes into the idle mode So the trick was to connect the teddy workspin to um This setup and basically I've got a Time of flight sensor a small screen to display the the current distance And if I put my hand here It will stop The light It will turn on the teddy workspin. That's good spooky That was my um setup for halloween Good projects and thanks for continuing on more um teddy workspin tagging. They're available people can get them They're super cool. You can put different sounds on them now So looking forward to more projects if people are doing that They're cheap in in us. Um, it did cost me a lot to get them in euro Yeah, probably shipping I mean moving anything on planet earth takes takes time and resources and money now So yeah in the u.s. I think we have landfills. Yeah, yeah, we have landfills full of teddy workspins, unfortunately Okay, well, thanks. I think you did it All right, we're gonna go to dj divin and then we're gonna go to dilt she dj divin. What you got going on? I got this uh cool halloween mask. I did not build it. I meant to modify it did not have But this is a really cool mask just a purchased product that ended up halloween candy this year with this on and people were really impressed with it That's cool Well, you can hack and mod it, you know, it's cool Because I wanted to show you like how simple this uh It's stuck in there really well. Yep. I'm not gonna be able to get it out um the Hard to see This is a little bluetooth BLE board in here. That's all that's in here. It's got a tiny little lipo and that powers the This is a a flexible like matrix thing Really cool looking And I was kind of looking for something like that to add but I what I intend to do now is to open up this BLE see if I can hack it and then Run it with circuit python because the the blue fruit app in order to uh to do this is like a Chinese shady kind of thing and not a fan of that would so would rather try and hack it with uh to run circuit python Yeah, all right Pack away. All right. Good work. Happy holidays. Thanks for coming by you. We have something interesting going on that mask is cool I like the um hair. It looks like predator, but they're just like cable Table covers the first thing uh that this reminded me of was jorgen was Oh Yeah, it's cool because it's it looks like it's like robotic dreads The first thing I thought of when I think robots and dreads is yeah, it could be queen board It could be all sorts of stuff. That's a cool hairstyle. Well as you as you call it techno predator because it kind of has that predator You are hacking discover stuff post up in the ate a fruit playground and then you know, you can publish it Maybe other people will have suggestions. I'll be able to say like, oh I know that champ here's how you can mod it or here's, you know, I've also hacked this uh mask I'm hoping there's uh some uart like uh pogos or something that I can if not I'm gonna have to like feather bodge wire it kind of thing But yeah, that's the intent circuit python. Good. Thanks so much and uh, happy halloween post halloween All right. Delta jay play us out Hey, hello everybody. Hello So I have a lot of time in my hands lately and I met some new friends Who play trucking simulators? Which is like a simulator where you're driving an 18 wheeler across the country But they bemoaned one thing they have a real-time chat system that uses a cb radio just like in a real truck But they're using headsets and desktop microphones and they wanted a real cb microphone For their real truck simulator And while they have these things they're like 180 to 300 dollars for the adapters So in the true spirit of hacking I said those famous three words Hold my beer And I went and got some parts from you folks And now what we have is a under $50 adapter That lets you use an actual honest to goodness cb radio microphone on your pc for your simulator qt pi 2040 handles the ptt A miniaturized usb sound card An adapter with some magic wires soldered and a single wire single usb port and breaker breaker any taker is this is the big e had you used on ix on 4o that's so cool and You are a real cb trucker and you have not paid 300 dollars for an adapter So the parts and plans are all going up on my new blog And just about anybody can view it a little bit of coding using mu and circuit python So good That's very cool. All right. Well, thank you so much when you're ready to have folks Poke at that and try to do it. Let us know we'll get the word out and put it in the newsletter Or the blog or whatever and thanks for coming by showing us. That's such a great one I mean, it's it's interesting It's like yeah, you want to have like the real the real microphone when you're doing a trucking simulator. So yeah, that's cool I think I think that's so There are people that have entire rooms dedicated to it where they've taken plywood and plastic and built like literally a truck around it and There's some really great things out there in the simulator world There are people who've done stuff at home and this is just to kind of help that along This goes right with you know jp's guide, which you know, he's going to go live and Hopefully today, maybe tomorrow. I'll get to review it is the power wash simulator. So yeah, we have a video from that We'll show you the video of it. All right. Well, thank you Cheers, all right. Thank you everybody. Thanks for making this the best happen hour of our week every single week Come by Every Wednesday some 30 p.m. Eastern time we can show and share projects richer stuff cool things interesting stuff Yeah, lots of cool things doesn't have to be eight fruit related at all Get a good idea of maybe some of the stuff we're working on behind the scenes as a little Heads up if You're looking for don't put this on social media right now if you're looking for a Raspberry Pi one of the new ones log in to read a fruit account make sure you have two factor authentication We might be putting some in the store during ask an engineer For our community for the folks who watch things live if you're watching this it's already recorded Sorry, they're probably out of stock, but just get ready. We'll be doing ask an engineer just a few minutes and we'll be Put them in pretty soon. Okay. Bye everybody. See you next week. Bye