 blink blink blink uh so um we have a newsletter that's pretty awesome and it is awesome yeah i didn't send links to it all the time yeah and each week we go over some of the cool things in it please subscribe and would appreciate it i would appreciate it everyone would appreciate we spend a lot of money really good stuff and it has just about everything that you can imagine that has anything to do with python and anything to do with electronics um from gift playing with circuit python to a lot of this neat uh auto generated code with like chat gpt and uh pong there's just a lot of new stuff that's in there this week however um the thing that we're going to talk about this week is this is the special guide that you wanted to um have made from the team which is all about circuit python safe mode yes so this was interesting to me because when we were doing a lot of um testing with beta box cricket i was breaking it constantly because it was like this was new this was like oh my god like we're doing python and robotics and all that and we had to do a bunch of stuff um that kind of like i would like oh let me take let me let me remove the following like frozen um libraries or like whatever it was i'm just like i need to like basically like an old school mac yeah how do i make it so it's like hold shift down while you up yeah how do i disable like how do i do safe mode and i and you know it's it's been a while but now it's kind of like possible so you can you can mess around and then you can boot into a safe mode if you're yes well we get into trouble we've always had the safe mode available and and sometimes you can you know double double or triple click reset to get into it um safe mode is basically if you had like a hard fault or um you had an unicot exception or um try things like a low battery like a brownout we have a couple different reasons why you might end up going into safe mode and um if you're a beginner it's really nice that safe mode kicks you out and like kind of stops running stuff so you can see what happened like you could see the the the exception trace however if you are not a beginner you might want to do something special on safe mode like for example um if there's a brownout maybe you want to like um stop check the battery you know save the data to a file um or if you're doing an iot thing maybe you want to send you know what's called the last will over mqtt and say hey i'm about to go offline for a very long time dead man switch it's a little dead man switch it's like it's like it's outside the scope of the of the code.py like you might want to do certain activities um and this is something i would have found really handy while doing like magtag i would always end up in safe mode and it was like you know shoot like i don't want to actually i wanted to just go to sleep and we start i didn't want to actually there was times when um when covid was peaking in york city and we wanted to look at the infection rate and then the the data source or something would happen and we'd wake up in the morning and the the display would it would hit an error like the database was down when you can do like a family but it's well basically like we didn't have this the structure built in but now we do so um dan helbert who's a core developer i'll go to guide which it what you can do is you have a a circuit if you have a file called safe mode up py that will run when in safe mode and what it can do is exit safe mode or it can again write errors to a file or somehow track what happened um so be good for telemetry um analysis etc it's a kind of a more advanced uh feature but um you know if you're not used to safe mode like along microcontrollers if you you know like try to read or write address zero in memory it'll hard fault it'll just like the watchdog timer will kick in it'll it'll reboot you i like to descriptive messages it's like you're in safe mode because yes this is also nice it's it's updated the description sure you're providing enough power press reset to exit safe mode that's really neat yes but you have to click reset it's that's the problem is if you weren't there to click reset it doesn't actually reset whereas if you're you know if you have a brown out you might want to do something with that information anyways it's um it's in the new guide on learn check it out okay um so in addition to the mag tech one that you were talking about could you have this safe mode interact with something like it fruit io could you have it like yes you could like if if you know if you have something you know you have something on a boat and and this error occurs um and it's a rare occurrence you might want to log when that happens you know i'm i'm i'm speculating because i'm actually written this but what you could do is have safe mode write something to the non volatile memory and say hey i failed at you know this time and then boot into the main program the main program sees like oh shit i just got out of a safe mode and it sends a message to a different io saying hey it's sunday at six a.m. yeah you had to that's my my data that's why the data that could be why the day this is getting really neat because you know a lot of people do uh stuff with uh those little micro satellites with circuit python i just like the idea of like this this like very smart thing that can operate on its own and yeah i think it'll give you error message later it does why which is you know if you're used to like i actually really like using this in arduino it's you can look at the reset flags and see like why did my micro controller reset and and you can you know even if you don't have a full debugger it can give you some idea of like what occurred um so it's again it's a little bit more advanced but it's something that i've been looking uh for and i think it's i think it's especially for iot stuff it's very handy because to be honest like the esp series could sometimes kind of just like go off into the woods yeah and you know it'll it'll hard fault and you're like i don't know why and it's very hard for us to debug but at least your project is i think this this particular feature saying and um how we do things like you can have circuit python not show up as a drive if you want to do something with keyboards these are like very interesting advanced features that really make it a well rounded choice yeah you know we just did this floppy project and um you know and did an amazing job and like jebler and then marked it like everyone worked together on this and like these gifts are cool and everything and you know it's it's not a project that i would um say you could do with anything else and i kind of wanted to be like hey it like not offer a bounty but like hey is there any other way to do this any easier way with lower cost hardware and not like you know just finding like you could find something else that works with a to fruit stuff if you want like that's fine but i'm saying like no like this would be completely written in something else like it isn't even possible it's like kind of no it's really hard to do all this stuff yeah this is very advanced anyways um so we make it easy yeah so good work okay um don't forget sign up get it daily any about box we do not spam you we do not harvest or emails we don't do anything like that