All right, hello everyone. Happy Friday We have made it through another week get nice and comfy here Get this dive on the road so to speak get this dive in the ocean We'll go with get this dive in the ocean Let me shuffle a few more of these windows around Did I click the go live? I think I did right? Yes, okay. We're good on There Looks like we're all good Pause this minimize Close this. Let's close Some more of these things that are open. It's not what we needed and get my workspace set up Before hand today, unfortunately Let's close a couple more of these Okay, I think we're already Who gets started so hello to everyone? My name is Tim. I go by foam a guy on github and discord. This is the deep dive Livestream program. This is a weekly program that occurs at this time on Fridays at as it's usually billed at 2 p.m. Pacific Or I guess is that 5 p.m. Eastern? It is 4 p.m. Central as well, which is the time zone that I am in this program was Originally started by Scott the lead developer of circuit Python He has taken some time off because he recently had a child and so his schedule got all changed around I have been holding down the fort so to speak here on the deep dive And yeah, this is the time that we do it. We're looking into all things circuit Python We're getting down into the weeds in the nitty-gritty getting our hands dirty with some code Sometimes we're working in the core. Sometimes we're working on libraries. Sometimes we're working on projects mix of all kinds of different stuff, but the the common theme that ties everything together is circuit Python if You are brand new if you're watching this video in the future If you haven't caught one of these streams before And you don't know what circuit Python is a good place to start to learn more is circuit Python org This is the main website for the project Circuit Python though is a version of Python that is designed to run on these tiny computers called microcontrollers A bunch of pictures of them here on the downloads page at circuit Python org We are running Python on these little computers. We can plug it into the computer. It shows up like a thumb drive We're able to write our Python code on there save it on the device And then it executes inside of the tiny computer There are all different shapes and sizes you can hook up all sorts of different Hardware peripherals like you know lights and buzzers and buttons and levers and beepers and knobs and sensors and You know any kind of little electronic doodad you can think of screens I don't know if I said but all this kind of stuff you can connect up to these Microcontrollers these tiny computers and then you can interact with all of these hardware peripherals from your Python code So that is kind of the 50,000-foot view of what this is all about If you Are interested in contributing to the project it is an open-source project everything all the development occurs out in the open on github We coordinate through the discord, which is linked down below ADA fru.it slash discord That right Yeah, I think I said that right it is down there on the screen either way even if I got it wrong There's a circuit python dev channel all of the sort of collaboration and communication around the development takes place there So if you're looking to get involved in an open-source project We'd love to have you come hang out in the discord with us and get involved in this one If you want to help support the project but not necessarily by getting involved in development another way that you can Do that is just by purchasing hardware from ADA fruit This is their website ADA fruit.com They're hardware and software company based out of New York and Ada fruit is the company that is Primarily funding the circuit python project. So they pay the folks who work on the project full-time They pay some other folks like me who work on the project part-time. They pay us to do the code to You know review changes to write libraries to make projects to make videos guides To live stream to do all these sorts of things Ada fruit is paying the folks who are being paid to do this kind of stuff So certainly thank you to them and then like I said if you want to help support the project You can do so by purchasing hardware from them. So go get yourself some goodies Find some fun toys to play with and in doing so help support make circuit python How's it going see Grover and DJ Devon Happy Friday to both of you been up since last night working on the 3d modeling and printing might fall asleep Fruit microcontrollers You said it great. You're doing a good job. Appreciate it. Thanks my friend over there on YouTube. We have fun So tonight what I am looking at More specifically, we're gonna start out with some ethernet testing and then we're gonna get into some gradients presuming we have some time after that so This will be not brand new to folks who have watched some of my streams before. I don't know if we did ethernet I don't think we did do ethernet on deep dive, but a couple of maybe a week or two back I did some testing and reviewing of the ethernet ethernet PR on Stream and so this is a New PR this time around but we are getting back around to it Cuz I noticed there was another new change in there Sorry, I got to get the camera going here as well cuz we will Have our own little microcontroller that we want to show Something like this for now and I have some extra hardware around which we will potentially get into once we move on to the gradient stuff But this is what we're using right now a little ethernet feather wing with a feather connected to it which not connected to it right now, but About to plug in I can keep it in camera listen This into the computer I've got extra stuff on the desk today because one of the things that I planning on working on next Involve some other hardware that I don't normally Have out or have out on my desk This is running the time puncher thing Right now, but we are going to be switching out to some ethernet code I'm just gonna leave it on this for the moment. We actually need to find our ethernet code So I'm gonna go get the Wiznet library opened up. Oh, I probably should have changed the Batteries my mouse batteries might be dying. We'll see if we make it. I've got some backup ones here anyway, so Um Let's get to Wiznet Had typing that's the branch we're on but we actually want to be going ghpr list and GHPR. Oh, we're behind by two releases now. Goodness gracious Are these still easy to install like skip this thing on it? I have Officially become more difficult to install it doesn't have an update button And I guess I could uninstall and then reinstall but then it might Make me authenticate again. I don't want to mess with it right now so we'll stick with the Slightly out-of-date version for the moment It was I think 80 Pull it up in here as well So I am hopeful. I don't know if it's actually gonna work out this way But I am hopeful that this PR might actually fix some of the weirdness we saw with my network my DHCP I think I was seeing some weirdness where I was getting back different IDs and it was making it fail And this is Talking about fixing a couple off by one, you know an off by one bug here a logic bug here another bug here Um So I'm you know fingers crossed maybe this might even solve some of the issues that I was seeing with my particular network with I assume some kind of configuration or something about the way that my network returns the DHCP Information was causing it not to work in my case except for the first time the first time it joined it was fine, but then if you Started the microcontroller And it tried to rejoin the same network it it didn't succeed the next time Check out 80 if nothing else it has better error handling and outputs because that was the other thing is one of the error Handling things was like just printed a F So that's one of the things I believe is in this as well Take a quick peek through the code while we're here to magic cookie. Oh I don't know about changing that interesting It's look like off by ones. I guess here a couple types changed Sponsor ID mismatch. This is the one I was getting so fingers crossed. Maybe this will be Resolved, but maybe not maybe it'll at least I mean if nothing else it'll be a better error message, which is good If we get lucky, maybe it'll be resolved Like that there is a server. Okay Yeah, yeah, so there's a couple places where this was just returning zero zero rather than raising like a coherent error Know about magic cookie. That sounds pretty yummy. Whoa. Whoa. Whoa. Whoa. Whoa. Whoa. Whoa What's that? This logic actually changed a fair amount. What did he now we have try accept? Oh, I see. Okay. This is actually just try accept on this line. Ah the rare try accept else There is I do think I learned about that isn't that is that a thing? try accept else Executive no exception. Do not see that one very much. I remember learning this and having my mind blown kind of T only so the logic does not actually change too much The print statement is a couple of lines longer, which makes it look more significantly different Honestly, the biggest difference is the try catch on the bit up here. It's like error handling generally And to error if debug transaction ID There's this bit. Oh No, no, this but this is a just yeah. Yeah, this is all just here same stuff Okay, plus one This is eerily similar to what I was getting when it was not working I will freely admit I definitely do not know that much about the intricacies of DHCP I'm probably not the person who could Give a thorough review to this actual code change But I can certainly try it out. I test Wow renamed. I don't necessarily have I mean, I kind of like the underscores, but it does make long names. I don't know sdhcp Interesting we would run this on the PC, maybe we can run this as well to try Let me catch up over here as well Perspective cowbells went out yesterday the arriving either Monday or Tuesday. Nice Getting on distance from What I got them out of Christmas sweet Winston cowbell holiday carols can now happen Tracks up dolls pretty handy occasionally overuse it Yeah, I don't know that I have ever I've ever used one. I've run across them a few times now, but it's about it So we did check out. We're here. We're gonna take this over to our device The lip folder here I Already have some stuff in here This is MPY one you get rid of that Gradients will be coming up Once we get done with this I'll play with gradients or if the question is like, what do you mean by gradients then? Colors like color shifting from one color to another LED colors display some of both hopefully Actually, yeah display I've done some stuff with so far And then LED colors I would like to use The gradients that I've been working on with and LED animations as well actually Which I will if I pull the camera up just a tad One of the things I have here is a LED strip of neopixels To hopefully be putting some gradient colors into Simple test we can go with Yeah, we still I need a PR this I keep saying this every time I've come back through this now This one it won't actually work with our Device I feel like I check this every time, but I'm gonna do it again anyway Believe this is the same as this How's it going kiyoshi? Happy friday, let's save that I don't have a Open before this is actually upside down You could actually just flip it in the camera How's it going biata? Have ants, uh-oh You can guess dance and I Put this Look like it has an actual error truthfully zeta fruit make nail clippers I don't think so You probably could not send me some either really got much better. Do we Did it run? What did it do? Right, right, of course This is exactly what I was just talking about. So this won't actually work on my board Because the spy bus already initialized because It is used for the display Uh board dot spy would be what we want wrong way We're upside down now There we go that one worked We got the light though too far Wait this upside down. I don't know Bit tricky All right, so first time through it did work and in fact I want to say this was the ip that I got before So I guess the real test for my network is going to be whether we can like Just redo it and try it again. Oh, we're also on a older one here I didn't actually succeeded twice. So that's actually good. I don't I do think I maybe got Two successes in a row in the past I don't know that I did ever get three though. So I'm Feeling pretty good Even if we just got this far even if we fail our request honestly Getting connected to the network getting an ip address. We were failing There on my network the way this was used to be working Try accept is almost mandatory for working with requests. Yeah, the the try accept for sure the else bit is the uh The bit that I don't see not quite as much Failed to establish So that's our that's that's okay though. That's the request failing Is actually also just what you're talking about dj But yeah, see that's just like Networks are like that right sometimes it's going to fail to fetch That's just how that goes So I am honestly, I do think this is actually Seems to have fixed the issue with my network. We are on old circuit python 733 We will update that as well Uh, let's see Super handy with requests because every api has their own failure message You can catch each failure do something different useful for hammering away until you start getting Key value pair errors. Yeah So this time we failed we succeeded the first one, but we failed the uh Bitcoin one probably or I mean, it's timed out right now. It'll probably fail, but we'll see either way. It doesn't matter um Let's do update closed out circuit python.org Oh We don't actually need it to be upside down the reason that it was upside down is because the time stamper draws it upside down and Because the display lives Outside of the Circuit python vm It stays rotated So we stayed rotated from like that. We stayed rotated from when the time stamper was running But now that it Will have actually reset And in fact gotten circuit python reinstalled on it It will be back to normal whatever the default orientation is which is now going to be actually upside down to us So we are actually going to need to switch it back around on the upside It actually moves in the way that my brain wants it to now failed to resolve hostname At that time it restarted itself somehow It was about to rerun itself, but I stopped it with control c Let it go again I've got this one Okay, yeah, like I said the code Honestly, it's a bit over my head. I don't know nearly enough about the specifics of the hcp to even really begin to say If anything is good or bad or wrong or right or anything else inside of here, truthfully um Functionally though It's looking good It's looking better than the old one was in my opinion because mine because it wasn't working Reliably on my network Unless if I did a static ip Or if I edited the driver to not care about the Transaction id I think it was called being different catching up on 2x about 15 minutes silly question What's a state machine not a silly question at all state machine is a programming concept there's a Very nice Learn guide in fact that described some of it um The way that I think of it I'll link this learn guide as well and then I'll tell you the way that I think of a state machine the way that I think of it is A while loop And inside the while loop you have basically an if statement that says if the current state is this Then do all of these things else if the current state is this other state then do all these things You know else if the current state is whatever then do all these other things um It's just a style of programming where you have a loop that's going around and around and around infinite loop or whatever really really fast And you have a high level logic condition that says if we're in this state, then this is the stuff we do You know during this frame of execution for in this other state then here's the other stuff we do During that frame of execution And so like as time goes on, you know user interacts with the program things happen And your program will just change the state So, you know, you could go from the loading state into the You know a menu state or something for instance like loading state shows a splash screen Menu state shows, you know a list of options that the user can pick from And then maybe the user chooses a selection from the list and you move on to Some other state, you know the the the sensor screen state or whatever like just depends on Whatever your program is um Yeah, I use state machines a lot with circuit python stuff a couple a couple of my guides are state machines I don't know my friend Doesn't seem particularly relevant I would assume this is what saved us Somehow i'm guessing these being off by one was What was leading to my transaction id kind of being different Ethernet feather wings are nice to have just in case something breaks again in the future Let's oh breaks again in a future beta might be handy as a failover They're faster, but sometimes you can't run ethernet everywhere. Yeah, I know for sure ethernets Honestly kind of a pain to run to a lot of places. Yeah anything outside or further away I could see whipper snapper being a great pair for always online logging Because all wi-fi drops off eventually Yeah, for sure Used finite state machine designs in hardware too great way to organize and manage sequential events Hardware implementations exist in the core of the cpu chips Yeah, I forget was it I don't remember was it anac data? I can't remember if it was anac data or maybe near doc or I might even just be misremembering all together Somebody had one though where they connected like I want to say they had three different internet connections Going on one thing ethernet wi-fi and then uh the cell data one Bank was the three That going there beta five Beta six, uh-oh beta six I don't have a beta six yet I don't remember which I remember which one of these was mine This doesn't get a response by my friend Hope you enjoy your evening Five is mine I would guess some of these I think it mentioned 79 as well I think probably this gets better as well, but I'm not as familiar with this one Yeah Turn zero Does not test for error Yeah Basically, this is where we ran into it Our error was different. It looks like then their error. Maybe Maybe not actually. I think that was the same line. I don't know Well ours was less of an error ours was that this was not being equal Our transaction ID was different. It was one number different one number higher 75 was mine. All right. I won't merge it for right now We'll see if we can have hopefully maybe somebody who knows more about networking um Take a look over it or at least have maybe a couple other people try it Because it does seem good in my environment in fact better than the old driver because it actually works reliably over and over now without doing a static ip Which it didn't used to so that's awesome But maybe we can have some other folks try it I know anecdote is fairly active in network stuff and in this library So maybe they'll give it a try or maybe you can have some other folks if anybody watching Has ethernet device and is interested in trying it out definitely be appreciated if you do go ahead and leave a Leave a comment or leave a review on the You'll pr here number 80 on the wiznet library and then That's really it with ethernet gradients are up next. So gradient I published yesterday This from a guy circuit python gradient helper This will generate a list of colors inside of a gradient I heard a cat getting into something, but I don't know I think anecdata did four cutie pies from one outlet I haven't seen the one you're talking about with three connections Oh, yeah, there's definitely a cat getting into something Use finite state. Oh, yeah, that's the hardware one I'm trying to think if there's a good diagram somewhere for state machines other than the state I mean the state machine learn guide has a diagram. I'm trying to remember If I've seen other learn guides with good ones you don't Feel like I feel like I have but I can't picture what it was Um, okay, so Where do we want to start with this? I think let's start with an easier Neopixel strip. I have this one which has its own fancy printed thing but It needs to be plugged into the device its device is much older We're probably I'm gonna want to update it when I get into it So I think we are actually going to go back down just a hair I'm going to start with this one because this one Is easier to connect. It's just plugged into the fun house here And what I want to do is generate a gradient generate a list of colors and then apply it to this Neopixel strip. I think should be pretty straightforward honestly But I haven't done it yet. I want to do it Where's the twisted up there? And then I think when these lights turn on you'll be able to see it. They're not facing the camera, but I think we'll be able to see it even if they're shining outwards So absolute most basic We're just going to go neopixel library so the most basic way we could use a gradient is just by Setting the gradient, you know one color on each neopixel So that's what I'm going to do first But afterwards I want to try to work it in with led animation because there's like comment There's a couple of them where there's single color that'd be cool. I think If they could be multicolor they could be a gradient and there are some that are rainbows So there are some that are multicolors already But I think it'll be fun to be able to define our own colors Okay, I got a check on this cat. What are we getting into buddy ours is um ours is 30 and I want different stuff anyway, so we'll lift some of the code out of here But I won't take the whole thing This is a Something group Oh, we were okay. This was just testing the the display a oapi change Won't be this it will be um The d0 d1 a0 I think this strip has 30 What is going on with the lighting I'm just gonna not do that I think we'll try the default order and see what happens So we'll do a capital T. I don't know if we need this Like display. Oh, you need to do a while true. Otherwise it won't keep showing First time I've done that though. We're gonna take this I'm just gonna go here for now You'll swap around any there Okay, so yes, we have read on The first pixel in the list Neo pixels basically just behave like a list We have green on the last pixel in the list And we must have 30 pixels. I must have got this right because First one is on one edge Last one is on the other edge Uh, so Nice, uh, let's get a copy of this Don't necessarily need all three of these but Fine as well Try out each one maybe Start with linear. Let's go pink to green That was one of the examples on the page where I got most of this gradient logic I've been redoing that 10. We won't do 10. We'll do 30 because we'll do one per pixel Eventually we'll Make it work with different numbers as well Um Can you do slices on neo pixels? Actually, no You do like pixels Like zero Equals linear colors zero two don't have the library Well, that's not sure I guess if it works it will work without the library too, but That in oops slices. Uh, yeah slices like a slice out of a list So like if you have a list for instance, uh, you know my list or whatever like this and it has one two three Um, we'll just say one two three Uh def Just to show that the types of the things don't matter at all really Uh, if you say like, you know ordinarily when you want to access things from this list, right?  I want to get the first Index or I want to get the last index. Let's say Uh, or you know index number three or whatever a slice is taking multiple parts from the list So you could say my list Like one colon three This will give you what they call a slice out of the list. It will give you the items starting at index one Going to index three, but it's I think exclusive Yeah, it's exclusive on the right side, but inclusive on the left side I don't know why just how it is. So like index one does get included. That's the two Uh index two, which is actually the three somewhat confusingly. Sorry about that does also get included Index three, which is the d does not get included because that's exclusive on that side um, but this allows you to take a section out of a list or If it's hooked up then it may allow us to actually put a section into a list as well however that part I don't know if This will work although It's pretty good to me. Uh, so Is there one of these there is isn't there isn't there a slice for all is that just That just colon I feel like we just came across that Sometime Yes So It's promising right over in repel Okay, nice It gets closer to white over here. I mean, I don't think these colors probably don't probably aren't going to come through Maybe if we do this better. I need to think of slices like ranges with start stops. That's true. Yeah, like range like for eye and range Which also is the same where it's um Exclusive on one side and actually I yeah, I forgot you can I think you can you do steps in slices? Remember actually now that I said for a second. I was gonna say Yeah, you can You can do step as well You're trying to get evens or odds or every fourth or whatever um One thing we could do to get further away from white in the middle here Could we just make these overall darker? I kind of get us farther away from white A little bit dimmer that shows the color a bit better. Okay Okay, so that's pretty cool. I do like that That is a fun that is a fun Utility a fun thing Be able to do Let's do one of the fancier gradients as well We'll pick some new colors. Oh, what do we think for colors here? Um, let's use a blue let's go Blue to yellow doing uppercase and lowercase mixing Let's go all lowercase Purple down with purple. Let's so we go blue to yellow We go purple after that or do we want to try four four might be a bit much for this strip I think the strip that's on this heart shape is a Bigger strip. I think it has more pixels in it. So we could do bigger We could do more colors on that one and have it actually Or not better. I think Mixing is for chaos hours Case mixing is for chaos hours Uh Blue to yellow Well, so purple is tough actually We will need I'll need a Eyedropper or something to get purple. I don't know a purple hex off the top of my head Only pink Purple maybe I don't know. It may look more pink when it's on the actual LEDs honestly, but that's the hashtag kind That looks like We'll go num pixels Go this Purple is on the far end. It's very bright It'd come out more closer to pink. I think I'm not sure about the yellow yellow seems Basically just white I guess that kind of makes sense though. If you gradient blue to yellow You already have max blue and you're approaching max Maybe we don't want blue to yellow. You don't actually really see the yellow Kind of just looks like blue to white and then white to purple Now we can kind of see purple like blue to purple to yellow And I do actually like I will say I like this transition from blue to purple here It doesn't come through the camera quite as well Like through the camera, it looks a little bit closer to white I think but to the naked eye honestly, it looks further into the purples there Whereas like this bit over here looks a lot more white on this side So that is actually super easy because of the way the pixels already behave like a list and we are basically making a list of colors Super easy setting it into there. No problem. I was thinking I was not I don't I hadn't really thought through how it was going to work. I had no idea it was going to be that easy That is actually super easy Uh catching up to two ethernets two wi-fies. There we go. Uh, anecdata linked the gist from the mega internet of doom device You have a definition somewhere for how many pixels should be the color Does look better. Do you have a diffusion plastic? I do not have diffusion plastic, unfortunately I have sheets of white paper which sometimes Make it look better But right now the sheet of white paper that I have that's closest Is actually underneath this and there's a lot of stuff on top of it I don't know that I can shuffle it out of there. I don't know if it's gonna make it too much better even if I can Probably won't be able to get things back Yeah, I think our problem with that Is that our lights are also not pointed straight up into the camera since they're pointed outwards the paper diffuses it almost too much I am also on like low brightness too though. I could probably crank the brightness But all right with this for now. Okay, let's try this bigger one Prepping the overall brightness can help I am on point one I can I could still back off a bit, but I am fairly low already It does actually help it come through the camera quite a bit better Up with cranked brightness. Yeah, that's probably how we'd have to do it He's a paper Cut straight and long. Yeah I think it's if I had them pointed up. I think it would uh The paper would be good, but I am gonna see Oh, did I So there's actually a bit of a mystery on this device as well this one with the heart Maybe we'll get into troubleshooting that some I don't know the first thing I want to do is certainly try out the gradients with it, but If I recall right, this is doing a thing where Some of the LEDs actually are a color that I don't Know why they are the color they are We have a bit of a mystery Let's get this out of here. I will turn the main light back on And so one thing is uh, I noticed this came unplugged And I took it out of its home As it is a very precarious breadboard Wired thing here. I don't even I'm scared to even move it all up in the camera frame Because the wires aren't that long and they come unplugged very easily. So The circuit's not that interesting. Anyway, I promise it's power. It's ground. It's data right now ground is plugged in That is it. I need to figure out which one is power Power is this outside edge right here power. I guess we're probably gonna be wanting the five volt power for neopixels Which on this feather is labeled usb then data I have no idea which pin the program is written for We're gonna plug the device in first and this device is probably going to be on Some kind of ancient circuit python I don't even know Yeah, well, no, that's our okay. That's our data pin. Uh, I don't even know I do not even have any idea. I wonder This is gonna be 700 alpha five Not actually as old as I expected to be honest Still a ways back for This is a feather in four So from 700 alpha five up to 800 beta five We'll make the complete jump Has gone to shippu Uh was on a seven alpha five word. Uh-oh On the same one having trouble, huh? Hopefully we'll be you know if we get lucky honestly, I'll upgrade this and then we just won't have that weirdness with the color Should we let it let's let it run once actually let me let it run once before we update it pin d9 This one has 96 pixels on it pin d9 is where we want to plug this in and is probably just nine Ten nine plugged in Back to light show mode. Maybe Really the light the main thing I needed the light for was to get those Red board wires plugged back in Okay, so I think it's a pretty short little cycle of things here. We'll let it run through its thing This one's rainbow. This one as far as I know everything seems fine so you see this There's a red one down here In the very bottom But this one seems mostly fine red and white red and white It doesn't really come through very well, but this one down here the first One on this side. It's turning red sometimes when it It's not supposed to this is where it's most apparent I believe this is supposed to be all blue But we have that red down there and if you once you see it in that one if you start looking for it You start to notice it in other ones as well where this Basically like this last pixel here Sometimes is just red when it's not Doesn't seem like it's supposed to be how's it going axle? We are working on some gradient fun right now. We're trying to figure out how to apply gradients to neopixel Strips or I should say we did figure it out. It's super easy actually since both behave like lists The slices make it super easy to set our gradients into the neopixel So now I've got this thing out and I'm about to update it to a new version of circuit python And we're going to apply some gradients onto it Ultimately, I'd like to try and hook it up. So some of these led animations can use gradients as well right now I have a couple stock led animations running Um, but I'd love to make them to where they can transition through the gradient of colors like You know, imagine this if it was like blue on this end and it transitioned to green as it made it to the other end or whatever um I think some stuff like that would be cool if we could apply those gradients to the animations Some of them have rainbows already But I think it'd be cool to be able to just pick and choose which colors we actually want beyond Only the rainbow or any of the ones that are built in if there's others. I don't know Um, but first thing we need to do is get this updated. We'd actually I will need the uh I will need this light back on because I cannot see the reset button Uh, and then We might Indulge a slight rabbit hole, you know, if you will go down the rabbit hole a bit We might indulge a rabbit hole of why is this one pixel red? When none of the code tells it to be as far as I can tell We'll see if it's still doing that after I update it if it is And we play with our gradients a little bit Then that'll be the next thing I do is a bit of sleuthing trying to figure out why that pixel is getting painted red sometimes Which is unrelated to the gradients altogether, but I just happen to know that this thing does that and It's been on my list of stuff to look into for a while And I haven't done it because this thing ordinarily is just mounted to a wall Somewhere else in my house and so I don't take it down very often But I have so now is the time to work on it Uh, where am I going? I do not even know let's copy this from here and then go to the boot drive Supposed to be going at least go back to uh Brave mode here Oh, yep, it's fixed Red one's gone So that was easy That will not require any sleuthing That's like a little red here, but that might be intended. This one is kind of like red to pink to blue This one is rainbow-y. So like occasionally it'll be red here, but it was red more often This one is red because it's just resetting This is just the reverse of the last one. So it's also red because it's resetting This one just has red down here. So that's fine The blue one where it sends like one thing around that's the one where it was most obvious This one a little bit and I don't see it there now. So we're looking good Let's get the blue one though Not this one Although I don't see it here. So that one's looking good too I think it's next maybe no after this one There we go. Yeah, this one was the most obvious. There was red down here. Super clearly red Uh, and now we don't have any so Wait It's fixed No more phantom red Uh, let's do some gradients This is the code that's on it. The code that's here is going to be super basic It's just initializing the neopixels setting up led animations on a um What do they call that a sequence? I think sequence of animations. Yeah animation sequence Uh, and then just running them automatically on a on a loop there chase No Which one is The single blue comet it must be well, but that says tail length 20 I don't know. All right, here's what we're gonna do though. We're gonna take this Save that as a backup and then I'm gonna get rid of everything after We set up the neopixel grip all the neopixels Uh, and then our other gradients actually on the other device Could plug back in but I think I'm just gonna put this on the device also I think Oh, it did actually Find it there interesting. Okay. What happens if you do a two color one of these? I don't know if I ever tested that I'm gonna try a two color one So now this is what we just discovered on the other list is because of slices you can super easily just go Set all the pixels to all the colors in the gradient Now you it would be a bit more complicated if you didn't generate What is going on? All right, uh, it'd be a bit more complicated if you did not generate the exact number of colors you needed Maybe we'll do that next Uh, like a map so we have 96 pixels. We're generating 96 colors. We're about to But what if we only generated 30 colors? We could still we could still use map range You actually set it accordingly Oh interesting. Okay wait Did that work? I'm not sure if we're looking at Just where we happen to stop or If this is actually what it looks like is this actually what it looks like That's actually what it looks like Oh, I don't know. No, something's broken. It's not filling the Ah, yeah, there we go. Okay, that's what it looks like that makes more sense. Yeah, no green We shouldn't have the green in there There's our yellow to blue and it does It is white in the middle Uh, and it is also ultra bright. Let me chunk that down I saw that came through quite a bit better. So in this case, it's not that much better. Is it This one has its own diffusion, but it does. Uh, it throws it off a bit In terms of getting picked up by the camera Blue to green Do if we go blue to green through red It's probably gonna get us pretty close to white, isn't it? Kind of but not actually Almost like blue to pink and then pink to orange ish to yellow ish to green That's kind of a cool one Okay, so that's pretty sweet We can set our gradients on here and this I will say like it's not it doesn't look that cool through the camera Honestly, obviously it looks way more impressive to the naked eye than the camera can make it look This one is not great for picking up this like sort of neon Strip or whatever these ones are facing upwards at the camera And I think it's just washing it out. I don't know if we get if we got even dimmer. Is that gonna help or is that gonna hurt? I don't even know if they'll run that low Oh interesting You can kind of see it, but the the colors still are washed out a bit. Honestly It's looking pretty nice straight to the eye though. And this one is This strip is a lot more suited to showing the whole gradient like this because it's got so many more Pixels in it than 30 We have much like really really smooth changes In between all of the colors here Point two looked patchy. Yeah, one of them they didn't uh It did not it turned some of them off like it was almost like not enough power to even light some up or something interesting One day some company will produce cameras that can show LEDs accurately Yeah, they'll make a fortune from youtubers and makers. Yeah, okay can you Can you rotate? Uh a list like So like if I have a list, right? Is there a thing I can do is there like a function or something I can pass this to or call on it or whatever to get this one like starting at here And then like afterwards, you know get the next one like just kind of cycle through it like this and they just each time You advance forward by one and the beginning wraps around to the end Because if we could do that we could like rotate this around the whole strip so that like like right now blue is here and green is here If we could do this like rotation thing here, we could kind of spin it around Is a negative one step can pop from the end and insert at zero. There we go pop from the end insert at zero Yeah, thank you. I was not thinking of it that way, but that is definitely that's exactly what we want but uh Other way around pop from the beginning and add to the end is basically what we want But yeah, okay. How do we uh, how do you do that? Um Is so pop is going to be the end I think All right, right. This is actually still this list here. Yeah pop is the end Is there a can you pop an index? Hey, whoa Index can we do that here? Okay, sweet. So we could go So inside our for loop we go I mean inside our while loop. I was gonna say we make a for loop. We don't even really need a for loop though. Truthfully, we just be just um We could just do it in here. So let's go Bestia colors We're gonna append a new one on the end the one we're gonna append on the end is the one we got from the beginning which is pop Oh pop zero So grab it from the beginning remove it move it all the way back to the end and put it back on So we're gonna do that and then we're gonna update the pixels by just doing this again Probably we're gonna want A little bit of sleep in here. Otherwise it might go crazy on us Maybe something like that. I don't know. Is this better? It's five better Hope when we get a setting if we can land on where the colors will come through a tad better I don't know if we're gonna get that lucky though That's actually quite slow. We might have gotten away without Gotten away without this. I mean that's about the speed the animations. We're running When it's too bright it might this one might benefit this one probably would benefit from the paper unfortunately though my paper is Not actually big enough to go all the way across so Even if that would work, it's not Not gonna help us for now. Okay That's fun. That's a neat kind of animation A uh rotating gradient animation. Maybe so like what would be a fun exercise Maybe is adding a new animation object Is slow because you're copying. I mean, I feel like it's pretty fast. Honestly this one without this is I think about as fast as the uh As the um What you call it The animations I had running in fact, this might be a bit faster I mean, I'm sure it could be I'm sure it could be more efficient than this what we could just always change I mean we could always I mean, I guess we don't even do we need to actually change this I suppose we could Uh Suppose we could just not even update this and only do this one. So this is like Don't care about efficiency Just want the easiest code, but we could actually go pixels So we go, uh, let's go Whoa, let's go temp equals none Let's go temp equals No, we can't do that everything every index needs to change I was gonna say we only need to change the first and last one, but that's not true though We actually would need to change all the rest of them as well I don't know is it gonna get more efficient if we because we still have to change basically we every single pixel has to change To whatever the color its neighbor had last frame So I mean I have no idea if like maybe using a for loop instead of this would be more efficient I don't know that could be But I think I mean I wouldn't suspect by that much. Would it be? There's no way to do it is use a ring buffer I will freely admit I don't I'm not up on that. I'll have to I'd have to read into that a bit Change the color list to start and stop with the same color It's fun to me. I like it. Let's do it And now we always have the same Now it like Both ends are always the same Beginning and the end Of the strip which are down here are always the same now We did get a bit closer to white in some sections as well Okay, I want to look at comet. I think I think that comet was the one we had before that was Just blue I had a tail length of 20 Come on, buddy Little fuzzy dude always getting into things Okay So we would basically instead of these we would go Animate There's only one in all right. There's our comet I am surprised.  It does go way faster Speed one So that's about what it looks like We have bounce false on that one, but Our doesn't matter too much Let's look inside comet and see if we can All right, maybe we can already give it a list. I actually don't know how it works at all What I would like though is if we could give it a list instead of a color and if like Each time it updates it will also advance through the list of colors It does look like so it looks like so far. It's written for a single color Let's have comet colors though Imputed color set color Health comet colors equals black interesting. Thanks comet colors append calculate intensity. So this is I see, okay So one thing it does is it makes a tail for the comet which kind of fades out towards black from Whatever color so in our case blue There it's reversed ring Raw object number pixels is length if ring There's pixels This one has colors here start equals colors Start plus ones Start wraps around here with the if statement else if it's not ring, then it just goes color and colors Break pixels start equals color How would we do that? Set color Imputed color Curious what we have for comet colors here Is that I'm curious what we have for that. Is that a list representing Individual pixels and the color that they have right now or is that a list representing Like this is one color. This is a little bit darker. This is a little bit darker. This is a little bit darker without Without regards to how many actual pixels are colored that color I Could see either but I don't actually know You keep it. Let's see. You could keep the list as is and only increment the index and then do pixels index colon equals SCA colors colon total minus index and swap around You make it a memory view. I haven't used memory views before either. I'll have to look into that them as well It's say it's basically a list of hexes though. If that can make it behave as a memory view that'd be pretty sweet kind of use Like the before slice and the after slice increment the index Is it less operations that just been splitting in half? I'd have to actually try it truthfully I can quite picture what it's doing in terms of how it's going to slice Um The same number of pixel update operations, but you don't have the cost of I see okay The actual pop and append functions Right is your I see I see so you Instead of pop one side and append the other side you're always just keeping track of the current index Doing everything before and doing everything after So the the actual order of the colors in the list doesn't change in that case you only update The neo pixels in fact, yeah, you just update the neo pixels you don't change The list of colors at all. Okay, that does that does make sense. Yeah, because it wouldn't And then yeah, I guess it also would make sense these I have no idea what What the tax is but yeah the tax inside of append and pop Where's the rest of this Oh, they were they were there We might as well, I guess put the new one though I have no idea how old the version I had was Pop is on because it has to remove move all the elements Okay, so I am interested to see inside of here. What is this? List Are we gonna spam really fast? Did spam really fast, but then it stopped so this is only This is basically from black to the color that was chosen 11 We gave it a A length of 10 So will the biggest one be six this time? So, okay. Yeah, so this is generating Although this doesn't go all the way to blue interestingly The last one go all the way to blue It did no actually it didn't okay. I just only went to 230. So this is basically generating A list of tail length plus one colors That go from black to the color we specified So it's basically able to It's kind of already doing a gradient, but it's just always doing a gradient from Black to your color or vice versa if you want to think about it the other way around So what if we had gradient Comet or we forget to do this we make this do This first actually Gradient comment here this will so far should still be the same It hopefully work Not important comment. Do we not be able to work comment? Oh that changed the wrong one It's not even really a gradient. I don't know. We'll change the name of it later And and there's a couple of ways this could work To start with I'm going to try to make it so that instead of this thing generating its own List of colors here I want to try to make it so the user could pass this in How does this actually get set up? We'd look at comment colors and maybe computed. Well computed color is a single one. We should maybe look at comment colors also Left side right side ring ring super initialize Be set who calls this I guess Called after a color has changed So then color to get called the first time right here Triggers set color. Yeah, it's our computed color after we get those all the way blue Which is I guess really just the same thing that got passed into us probably right same thing that got passed is this I don't really know why it's Getting set again back here It's already set there. I don't think this is actually changing it, but I'm not sure So let's go self tail colors is equal to Tail colors and then in here. Let's go if self tail colors Do this stuff else Do this old stuff here then in here. We're just gonna go self comment colors equals self tail colors If we don't update our signature when we call it Nothing changes. Why don't we go back to the gradient every time? Do I still have gradient in here? Ah, right? Yeah, okay enough So far we haven't changed it, but now if we go tail colors your colors I think was Was our tail size plus one. So for now, I'll keep this equal and do this as 11 affected argument And not at it I didn't tail colors affected argument underscore Okay, interesting So we have a comet going around but our comet is red and our Everything else is green We're not getting black I guess we actually still need black So let's say this is oh, whoa, whoa, whoa you 10 near colors near colors insert zero Black Is our comet just had black at the first one? Yeah, that's what I was trying to get Sweet So now we have a comet that follows A gradient you can tell it which colors you want your comet to be And instead of fading to black it fades from one color to another Or if you wanted you could do a triple gradient and one of them could be black In fact instead of inserting black, let's do this differently. Let's go Let's make a new FCA Comet colors Let's go Oh, do we want to go from black? Maybe we want to prepend the black. Maybe that's the better way to do it Let's try it this way though. Let's see what happens. So let's go from black to Green Or should we choose new ones? Let's go from black to blue. Let's try like that. I don't know what that's gonna do It'll do um 10 though Uh 11 actually if black is part of it Interesting, slow it down some If we do it that way, we don't actually have to include The black at the beginning Although if we actually make this into a shareable class, it's probably better To prepend the black at the beginning That way the user doesn't have to pass one that contains black So what would we do if They didn't fit perfectly because I think This now is just basically ignoring the tail length Like I think this actually just looks the same as it did before And now if I change this one to be 21 now, I think it will be longer Yeah So we actually will want Ideally we would want No matter how many colors they pass in We will want to generate that list using map range Comparing to how long the tail is Which means we get a little bit more complex in here. We can't just set this to this Instead we're actually doing something kind of like this. I'll just leave the black here that way we're appending it Uh and then in here we're gonna be Going to be looping this many times Going to do intensity anything Are going to append a color the color we're going to append though That's going to come from tail colors the index we're going to get is Going to come from map range in minimum in maximum so the It's going to come in is This which is the minimum is zero the maximum is Tail length minus one Oh, I did it wrong. It's in min No, I didn't yeah, I did it right in min and then in max Out min out max Oh, and the number is actually first so we should do in over here In min in max then out min out max so this will be zero here and then it will be length of the tail colors So this will basically map The difference between the length of tail colors versus the length of tail length So then I think this one will give us the long tail again if we Set this to 20 but still have this on shorter like 11 No module simple i o our date circuit also text out of range off by one error or do we have like completely Way off the mark not even close error We're index 11 Yeah, which doesn't exist because this is 11 long So out max is too big It should be minus one Are there any use cases where background isn't black Background isn't black Not sure what you mean You mean the comet specifically I will say the black seems important for making it Um Actually turn off the part where the comet is not If you don't use black as one of your colors, then like over here would not be off When the comet is over here for instance Um, I do think this worked. So now we have Only 11 colors our tail length is 20, but we do have the long tail We could even further go like five colors We still get roughly the same gradient So now we can independently change the tail length from the colors So we could get rid of this we already do have black getting added in So one thing is I don't know if the tail length is shorter than the colors Still does work pretty well though got green to yellow Okay, that's pretty cool. I do like that That's cool. I don't think it's ready to share yet I think there's still some work to do on it, but I think the basic idea this is pretty similar to what I was going for I wanted the way to be able to like Make the comet be your own colors rather than Just a single color. So now we have yellow and green You can do any colors you want in here You could do more than two if you want you can have three or four however many um And using this new gradient comet which will probably rename that to Colored comet, maybe we have custom color chase. So maybe custom color comet would make sense Probably would make sense something like that Because you it wouldn't have to be a gradient either, right? You can just give it you can just give it Two colors five colors. You can just make up the colors you want. They don't have to actually be a gradient Um can be any colors obviously just a list of colors Which is exactly what our gradient functions return. So that's what I'm using with it But obviously it could be anything I have 11 of the neo pixel bff What should I do with them? I realized making a five by five pixel game is kind of beyond my scope right now Uh, for example, if you wanted a gradient Blueish comet traveling around a solid red heart. Oh, okay. Yeah in that case you can well So I will say that one In order to make that one work. We will have to You would have to not set black in here. It's probably not the best name for this but D list, okay, so now so right now the behavior doesn't change of course because we didn't change that thing to true Let's go back to 20 here. Let's go you said what now you said blueish Having around a solid red heart Uh, we're gonna have to be making a guess on which one Goes first and which one goes second Because I do not remember But we still have black actually Oh, I didn't pass it still. I didn't pass it still Uh, use black now use black the right also that shouldn't be that should be this use This and then up here Blueish comet traveling around a solid red heart and up we were backwards There we go solid red heart with the blue comet flying around it And then It turns out that you get a tail of kind of pink because it fades from the blue into the red which of course goes through pink Um So in order for that to work you do have to basically you have to instruct it somehow here not to start with black So we would either have to like get rid of this all together and not have it just assume that it's going to put black Or we'd have to do something like I did here with a boolean One of the two if we just got rid of it all together then the user could always use like the user could always put black in their list Uh, but I think it's probably good since comet since the regular comet does it by default I think it's probably good for this one to do it as well Uh, but maybe we keep the boolean like this that way you can switch it into this mode where You don't have a um You don't have like a darkness portion of the thing You have everything is always on and it's just gradients from on To Like from one end to the other of your colors essentially Sweet. All right So that's awesome. I am happy with the progress on that. Like I said, I don't think it's really ready to share yet I do think there's still some tweaks. I want to do to it. I'm sure the name Probably gradient comet is not really what we want to call it. Of course, I'm been using it to test the gradients, but The truth is it could be any list of colors, right? It's really just a custom color comet. So um, I'll probably change the name up and Get the code cleaned up get things fixed up get it actually documented properly And then once all that's done we can actually make a pr from it get it submitted to led animation Um, I think that's going to do it for tonight though That is the main thing that I wanted to play with was gradients and neopixels And I would say we definitely achieved that we figured out how to set A list of colors into our neopixel so that way we can just gradient across the entire strip Uh, we also figured out how we can animate that by popping from one end depending on the other And then here we have now figured out how we can modify some of the led animations to start using our lists of colors um, I think there will probably be a lot of Stuff if we look inside of these rainbow like rainbow chase rainbow combat rainbow Sparkle In fact, I should have probably looked at rainbow comet. I didn't this is the one that's going to be having some different logic inside here Where it's doing color wheel um But I suspect we could pretty easily adapt the rainbow ones to Use gradients instead of rainbows because right now they essentially have a gradient It's just all the way through the whole rainbow. So we could just give them a different gradient That's only through certain colors And I'm pretty sure all three of these will be easily adaptable to do that So that's what we have to look forward to next. Thank you everybody for hanging out this evening I do hope everybody has a good friday evening and a good rest of your weekend I'll be back on my own stream tomorrow morning at 10 a.m. Central time So if you're interested in that you can come out to the same discord. I'll post the links in there when I get started Um beyond that though. Thanks for hanging out everybody. Thanks for the questions the comments everything else Uh, appreciate everybody watching along. I hope everyone has a good evening and I will see you all next time good night


I think I was muted. Yeah, I just wanted someone to open with the word of prayer. Martin, if you're present, if you could pray for us, we can get started. Praise Lord Pastor. Praise the Lord. Father, we thank you for this wonderful morning and for the wonderful week that you have blessed us with. Lord Jesus, thank you for the final semester. The papers that you have presented us with Lord Jesus help us to learn and understand the scriptures even more deeply as we prepare our hearts to follow your precepts. Lord Jesus, Lord help us to know your hearts as we know and understand and try to meditate upon your Apostles Lord Jesus, the way that your spirit led them and to do the discipleship works and to bear the burden of the people and to have a spirit of understanding discipleship and to preach the gospel. Lord Jesus help us to know you more and more as we meditate on your words. Lord Jesus help us to grant us the wisdom and the knowledge Lord Jesus help Pastor Deepika. She would present us Lord Jesus and open our hearts so we could receive all those words and to meditate on your word day in and day out Lord Jesus. We thank you for all the students that you have presented in the class. Lord Jesus be with us. Lord Jesus enable us to understand and to know you more and more Lord Jesus. In Jesus name we pray. Amen. Amen. Thank you so much. Yes. So we will begin with our class. Last week we started the letter to the Ephesians. We looked at the background of that particular church. We saw that they are established in a large metropolitan city. We saw that the congregation would probably be made up of people from different communities. Most of them Gentiles. Of course there would be a small minority of Jews as well in the congregation. And we also saw that it is during his second visit to Ephesus that Paul stays for an entire three years and builds up that church into a solid missions church where many leaders are built up and then sent out to minister all over Asia Minor. That is the Anatolian Peninsula. So we saw all of those details. So today we would be getting into chapters three and four and even as we look at chapter three it begins with these opening words where Paul refers to himself as a prisoner for Christ. If we could have someone read out for us the first six verses please. Ephesians chapter three verses one to six if someone could read out we will reflect on these verses. Anyone who is logged in and in the class if you could please just open your Bible to Ephesians chapter three and if you could read out verses one up to six, one to six. For this reason I Paul the prisoner of Christ Jesus for you Gentiles. If indeed you have heard of the dispensation of the grace of God which was given to me for you. How that by revelation he made known to me the mystery as I have briefly written already by which when you read you may understand my knowledge in the mystery of Christ. Which in other ages was not made known to the sons of men as it has now been revealed by the spirit to his holy apostles and prophets that the Gentiles should be fellow heirs of the same body and partakers of his promise in Christ through the gospel. Yes, thank you. So we see that Paul says that he has become a prisoner of Christ Jesus for the sake of you Gentiles he says. So it is for your sake that I have become a prisoner and so he reminds them of his status and his commitment towards them. For us to understand why he is saying that he is a prisoner for the sake of the Gentiles. We would have to go to Acts chapter 21 where we get a little idea about the background. Now last time in the introductory session when I was talking about Paul's missionary journeys, I was not very clear on the timeline. So just so that everyone is clear on that I put it in the stream page so that you know those details are available. And later even in the e-platform I would be putting in that information so that you know there is no there's no doubt about the order of events. So we see that in during Paul's second missionary journey he very briefly visits Ephesus. He leaves Akhila and Priscilla over there to do the ministry work and he moves on to other places. But then during his third missionary journey he stays at Ephesus for an entire three years. So while he is staying at Ephesus for three years during that time he writes his letter to the Corinthian church and he also writes to the Galatians. So the letter to the Galatians and the first letter to the Corinthians is written during this three years stay in Ephesus. So after he finishes his third missionary journey that is when he goes to Jerusalem and he gets arrested over there. And when he gets arrested over there it is for the sake of the Gentiles that you know this happens. And then he is taken off to Rome. So while he is imprisoned over there in Rome he writes to the Ephesians. So the Ephesian church is already aware of the circumstances that he is in. They are aware that he was that he is right now in imprisonment in Rome.  What are the you know events which lead up to that arrest. When we kind of dwell on that we realize how much tension actually existed in the early church. I mean we don't quite catch the impact of what was happening in those days because you know we are so far removed from those events. And now in fact the number of believers in the Gentile you know community is much larger. The number of Jewish believers is catching up. There's a lot of ministry going on among the Jews so that many of them would come to the Lord Jesus. But right now it's the Gentiles who are you know outnumbering the number of Jewish believers. We are a large number so we don't even understand the tensions which existed in the early church. So when we look when we go to Acts chapter 21 we kind of begin to understand what was going on in the churches of that early time when the church has just started to form. So in Acts chapter 21 Paul you know after having finished his third missionary journey he goes to Jerusalem. And when he goes to Jerusalem this is what happens in Acts chapter 21 verses 17 onwards. So the leaders over there in the Jerusalem church they are glad to see him. They welcome him warmly but this is what they say in verse 20 it says in verse 20. Then they said to Paul you see brother how many thousands of Jews have believed and all of them are zealous for the law. They have been informed that you teach all the Jews who live among the Gentiles to turn away from Moses telling them not to circumcise their children or live according to our customs. And then in verse 22 they say what shall we do? They will certainly hear that you have come. So there are a lot of Jews, thousands in fact it says over here who have turned to the Lord Jesus but in their hearts because they're used to their traditions, their unrenewed mind is causing them to still associate godliness with keeping the law rather than just simply following the leading of the Holy Spirit. So they are upset when they hear stories about this minister Paul who is encouraging the Jewish believers to no longer follow the mosaic law. You know when they have newborn babies and they want to get those babies circumcised, Paul is encouraging them and telling them no you don't need to go into all of that anymore. Give up all of the entire mosaic law because your salvation in no way depends on that. So he is discouraging them from following their ancient traditions and this has upset many of the Jews.  So now when he comes over here to Jerusalem and obviously he goes to the churches in Jerusalem to visit them, spend time with them. The leaders are worried and they say what shall we do? They will certainly hear that you have come. So do what we tell you, they make a request of him. They say there are four men who have taken a vow, you know one of those mosaic law vows where you go to the Lord and you make a commitment to him and during that entire time period of maybe one month, two months, I mean whatever their vow is, you know they would fulfill whatever they have said to the Lord. Maybe it would be a time of fasting and prayer, maybe they have made some financial commitments that they would contribute so much to the temple. It would involve different kinds of rituals. So there are four men who have made a vow and who are getting ready to go and make this commitment in the temple before God. So the leaders request Paul and they say why don't you go along with these four men and they say join in their purification rights, pay their expenses. Then everyone will know there is no truth in these reports about you but that you yourself are living in obedience to the law. So they are saying, you know you are from a Jewish background, we have reached out to so many Jews, they have become believers but they are still very, very young in the faith. So it is not good to put them into confusion. So don't let them get the impression that you are against Moses or that you have no respect for our traditions. As long as Jesus was on the earth, he was respectful towards the Mosaic law. In fact he was so respectful towards the Mosaic law that he fulfilled all of it and Jesus made it very clear. He said it's not come just to disrupt what Moses has had given them but rather he says I have come to fulfill all of it. So in the same way Jesus conducted himself respectfully with regard to the law. Though he made it clear that people who come into the kingdom will be coming in through him by placing them because he says he is the only way to the Father. So he does make that clear but in no way does he show disrespect to the traditions of the Jews. In fact he says I have come to fulfill the Mosaic law. So now that is why these people, they request Paul and they say it would help the church over here a lot. If you can show them that you are for the Jews, you are not against the Jews because now over here it's all a matter of the cultural sensitivities of the people. So it is something maybe that we should think about in our own church setups. When people come in from other backgrounds into the church, they may have their own particular way of dressing. They may have their own way of showing respect to the elders. In our Indian community it would mean that they would bow down and touch the feet of their elders. So if you were to just suddenly tell them stop showing respect to your elders by touching their feet. It would create disruption in their homes because then their families would say it's bad enough that you have now become a follower of Jesus. Now you have even lost respect for your elders. So there are cultural sensitivities to keep in mind. The transition would need to be slow. Of course it's a complete no when it comes to idol worship. It's a complete no when it comes to anything that will go against honoring Christ. But when it comes to the cultural traditions and the way they dress. For Indians, for many of them in the beginning, at least for one year, they would prefer to continue wearing the red bindi. Simply because if the transition is slow, it's easier for the families, for their non-Christian families to grasp what is going on. It gives them a little time to adjust. So based on the cultural sensitivities of these thousands of Jews who have recently come to the Lord Jesus, the leaders request this of Paul and Paul does not argue. He in fact concedes and says, fine, I will do it. And so in verse 26, we see that Paul goes along with the men. He pays for their rituals, for them to shave their heads and all those things which they need to do. He in fact pays for them. So everything seems to be going smoothly. But then Satan still tries to take advantage of the situation and he stirs up some of the Jews who have come over there to Jerusalem. And they with half knowledge, not even knowing what he has done and what he has not done. They make the false accusation that when Paul went to the temple, he took a Greek believer along with him inside. And so they say a Gentile was allowed to go into the inner courts and so they stir up all the people. And so this is clearly a false accusation. Paul respectfully goes and said along with four Jewish brothers, he does not go with any Gentile. He does not take any Gentile inside the temple. So this is a false accusation. So in verse 28, they say this man is teaching everyone everywhere against our people and against our law and against this place. And he says that he has brought Greeks into the temple and defiled this holy place. So these are all the false assumptions that they make. And then Paul who knows that he's innocent of all the charges which they are charging against him. He says, you know, I'm ready to appeal to Rome because I know I'm innocent. I know I have not done any wrong. And so it is because of his stand in ministering to the Gentiles that this whole opposition arises. So the reason that he became a prisoner is because of this calling which had been placed on his life to go and minister to the Gentiles. If his ministry had just been to the Jewish community, there would have been no opposition. There would have been no need for any imprisonment or arrest or any of that. And so he says, it is for your sakes that I have become a prisoner of Christ Jesus. Therefore, the things which I am telling you, take them seriously because I was willing to even be imprisoned for your sakes so that you can receive the truth of what I am conveying and enjoy all that God has for you. That is the heart from which he is speaking these things. And that is why he says that, you know, he, a prisoner of Christ Jesus for the sake of the Gentiles, he has been sent by God to administer God's grace to all of these Gentiles and of course, even the other believers who are there in the church. What does he mean when he says that God has called him to administer God's grace to them? In the NKJV, I think it says a steward of God's grace. So what does that mean? If we were to look in the New Testament, we see the word grace being used in four different senses. We are very familiar with one form of grace, which is basically the grace that was given to us so that we can become believers so that our sins can be forgiven. So that would basically be divine favor. God gave his divine favor to us. He helped us to know the truth. He helped us to make a commitment to the Lord Jesus. And so now because of the atoning sacrifice of Jesus, all our sins stand forgiven. And so now we live under the favor of this divine favor of God. This is the grace of God that we are living under. So until that day when we are completely perfected in heaven, we will continue to live under this grace of God, this divine favor of God, where even though we are still in the process of sanctification, even though we still fall into sin now and then, it does not lead to punishment because we are living under the divine favor of God. That's the first kind of grace that Paul is administering to them by telling them about that. Another form of grace that we see in the New Testament, that term refers to the very character of God because if you were to look in John 1.14, it says Jesus is described as being full of grace and truth. So Jesus, his character, is described as being full of grace and truth. And then in 2 Peter 3.18 it says, grow in the grace of Lord Jesus.  So over there the grace it refers to his character and we are supposed to become like him. We are supposed to imitate him. So the second kind of grace that is referred to in the New Testament, refers to the grace of character, the divine character of God. It refers to that. The third kind of grace that we see and we will be in fact looking at it here in this letter, refers to the giftings. They are called in Romans 12.6 it says, we have different gifts according to the grace given to each of us. So here the term grace is being used for divine giftings. And then of course there's this very popular verse that we are all familiar with. 2 Corinthians 12.9 where God says to Paul, my grace is sufficient for you. So there it's talking about the divine empowering, the divine enabling that God gives us to be able to do all the things that he has called us to do. So grace refers to the divine favor which rests upon us because of Christ. Grace refers to the divine character of God that we are supposed to grow into. Grace refers to the giftings that have been given to us by grace. And grace also refers to the enabling, the empowering that God gives us to be able to live in the way he has called us to live. So when Paul says I have come to administer grace to you, he is talking about all these four aspects. He is going to now work with them, encourage them to attain all these four forms of grace. Because many believers are just satisfied having the divine favor of God upon them. They are glad that God's wrath is no longer upon them. But they are neglect to make use of these other three forms of grace which are available. You see, they need to start growing into this grace of the Lord Jesus. They need to start becoming like him. They also need to depend on his divine enabling, his divine empowering. Because his grace is sufficient for all that we would require to walk in Godliness. So they need to start grasping that divine empowering. And of course we are called to use this grace of the grace giftings which have been entrusted to us. So why have we spent so much time on this one single verse? It is because a lot of us who have enrolled for this course, we are in some form of ministry. It may be full time or part time. But we all are in ministry. So this is what we should be aiming for. That the people that we are working among should start moving more and more and attaining more and more of all these four forms of grace. Because one day when we stand before the judgment throne of God, the Lord will say, did you administer God's grace to these people who were entrusted to you? Did they walk into and attain and enjoy all the four forms of grace that was made available to them? So the shepherds, the ones who are ministering to the people must make them aware that all four forms of grace are available and they must show the people how to attain that grace and use it for their own lives. So that would become our responsibility and we see that Paul is fulfilling that responsibility over here. So moving on to verses 3 to 6, he again refers to the mystery that has now been revealed. We already talked about it in our last class. The mystery is just that now the Gentiles have equal status, equal privileges, equal inheritance with the Jewish believers. So that is the mystery. So he goes on to say because this grace is now available to even the Gentiles and because this mystery has now opened up the salvation experience and the treasures which are in heaven to everyone because of all of this, because what is now available to everyone, therefore I kneel before the Father and this is the prayer that I am praying. So Paul goes into his second prayer. We saw in chapter 1 that Paul made a prayer for these efficient believers and we talked about how we also can pray that prayer over our own lives. Now here there is a second prayer that he is praying for the believers and again this prayer also is very important. We can apply it to ourselves. If we pray this over our lives, it would help us to attain all these riches and walk in those riches which are available to us. So let's look at the four or five main points which are in this prayer. So he says if we could have someone read out for us verses 14 to 19 please. I know even as we are reading, if you could just pick out the main prayer points which are mentioned over here. So if one person could read out for us Ephesians chapter 3 verses 14 to 19 please. This reason I bow my knees to the Father of our Lord Jesus Christ from whom the whole family in heaven and earth is named that he would grant you according to the riches of his glory to be strengthened with might through his spirit in the inner man that Christ may dwell in your hearts through faith that you being rooted and grounded in love may be able to comprehend with all the saints what is the width and length and depth and height to know the love of Christ which passes knowledge that you may be filled with all the fullness of God. Yes, thank you. So we see here the first prayer point that he's making in verse 16 he says I pray that out of his glorious riches he may strengthen you with power. So there are glorious riches being made available to the believers and there is power of the Holy Spirit being made available to the believers. So he says I pray out of his glorious riches he may strengthen you with power through his spirit in your inner being. So prayer number one is that the believers will be greatly strengthened in their inner being in their spirit. They would be greatly strengthened the new spirit that God imparted to us at the moment of salvation where the old person was crucified and then we were made into a new creation. So that's the new spirit that is within us. We are that new person. That is our new identity. So this new spirit needs to grow. So we can't just stay in babyhood. We need to grow in God and we need to grow stronger. We need to develop a more intimate relationship with him. All of that. So this is something that God makes available for each believer because all of the spiritual blessings of Christ are now made available to every single believer. You know in Ephesians 1 3 is where we saw Paul says that Lord Jesus Christ the God and Father of our Lord Jesus Christ has blessed us in the heavenly realms with every spiritual blessing. So we all can have access to this power of the Holy Spirit because of the glorious riches which have been made available to us. So when we believers get these negative thoughts about how poor we are in the spirit it is those are wrong thoughts. They are not biblical thoughts. We may feel okay I've been struggling with these particular temptations for so many years. What are the chances that I'll ever overcome it? Or we may say to ourselves other believers they seem to hear God so clearly but I find it so difficult to get any direction from God. Maybe I'm very deaf. Maybe I'll never be able to hear God the way they hear God. Or we may say to ourselves I am not very specially gifted or talented. So who knows what contribution I will be able to make to the kingdom. Now these are all thoughts of poverty, spiritual poverty. But what does Paul say? He says every heavenly, what every spiritual blessing in Christ that is available in the heavenly realms has been given to us. So out of these glorious riches which have been granted to us out of those riches the Holy Spirit can strengthen us in our inner being. So we should take a stand and say yes the Holy Spirit is working for me. So if I continue to have a fellowship with Him I walk in a way that brings honour and respect to the name of Jesus. If I pray in the spirit both in tongues and through the leading of the spirit even as he brings different things to my mind and I pray on those particular aspects of my spiritual walk even as I feed on his word and the spirit opens up those scriptures to me even as we are daily going through this process of learning in submission to the Holy Spirit being led by Him walking in line with Him even as we do that because of the glorious riches which are available he starts making those riches a reality in our lives. So no believer ever has to think that they will continue being a slave to those temptations. It's wrong for them to think that they will not be able to hear the leading of the Holy Spirit. The Holy Spirit will open their deaf ears even as they spend time in God's presence studying His word and allowing the Holy Spirit to open their eyes and catch the truths which are there. This is all something which the Holy Spirit will do but then we need to create time for Him and even as we spend time in His presence He will impart these things to us. So the first prayer request that Paul has is that out of his glorious riches these efficient believers would be strengthened in their inner being through the power of the Holy Spirit. This is not something that's going to happen on their own they can't achieve it on their own but the Holy Spirit can do this for them. He's eager to do this for them. I'm not sure whether this illustration would help or not but this is something which spoke to me. There was this point in my life when I was feeling very discouraged about who I am as a believer. I was ashamed of how little growth there had been spiritually. So I would picture myself as being in this sinful pit. I'm trying to be in ministry and I'm spending time in prayer and reading my Bible. I'm not giving up all of those disciplines but on the inside when I look at myself there is still so much dirt. Pride, whether we realize it or not there's a lot of pride, a lot of self-centeredness irritation, no patience with people because responsibilities are a lot and the schedule is busy so people get on your nerves you're supposed to be ministering to the people not getting irritated with them I started to feel that I'm in this pit and the Lord is very patiently standing over there in the rim of the pit on top and looking down looking at me and thinking when is this girl going to get her act together? Isn't the feeling that I had the mental picture in my mind was of me in the pit and God standing over there on top looking down and thinking when is she going to come out and when can I start working with her and using her in ministry and all of that and as I was spending time with the Lord one night this is what came to me so clearly the Lord said I'm not standing on the rim of the pit and looking down at you I'm in the pit with you can't you realize that? It was like such a revelation for me that the Lord is not standing over there and waiting for me to get my act together He's in the pit with me loving me, caring for me very very involved in every little aspect of my life and He's saying I'm right here in the pit with you I do love you unconditionally with all of your dirt you are deeply loved but I'm not going to love you and just leave you here I'm going to get you out of this pit because I love you enough not just to have you here but to actually get you out and it's going to happen by the power of the Holy Spirit when the Lord said that to me I think I just hadn't cried and cried and cried because it was like such a relief to me to know that He's not just standing over there and looking down at me and watching me in my mess He's with me in the mess and He's saying I love you here in this mess but I also love you enough to get you out of here and it's going to happen through the work of the Holy Spirit How are you willing to spend time in my presence and allow the Holy Spirit to do these things in you so that you will be strengthened in your inner being so for me that became a very deep revelation I began to spend much time in the Lord's presence and as I was doing that He began to open my eyes to see things in the scriptures which I had not realised were there you know I had read those verses again and again but those verses never became important applicable to me personally for my personal situations so the Holy Spirit will scan then us in the inner being because all the glorious riches which have been made available they have been made available for us now why is God making all of these riches available please it's not just so that we can have a bungalow or we can get a good job because we sometimes tend to reduce all the riches of Christ just for material things like I said in the last class those things will follow all the material things that you need for your life will follow if you can just place His kingdom first His righteousness first in your life so here it is explained to us in verse 17 why are these glorious riches being made available to us why is the Holy Spirit ready to you know come walk beside us and strengthen us in our inner being so that verse 17 says so that Christ may dwell in your hearts through faith so the reason that all this is being made available to us is so that Christ may dwell in our hearts through faith but isn't Christ already dwelling in our hearts I mean at the moment of salvation didn't Christ you know come and inhabit us on the inside so if Christ is already dwelling in us why is Paul praying this prayer over the efficient believers so over here when he's using the term dwell he's talking about it you know as a kind of permanent residence where Christ is being more and more fully formed in you so over here when we look at this word dwell because of the context we should not be thinking of this as just you know I have Christ in me every believer from the moment of salvation already has Christ in them here it's more talking about how Christ is getting formed in you more and more you are starting to become more and more like Christ you're resembling Him more and more okay so it's actually touching upon that aspect so the Holy Spirit strengthens us in our inner person so that we start becoming more and more like Christ so that Christ is formed in us to an extent where you know it's like he has taken over our entire being we have become literally his dwelling place so there are many verses which talk about this Galatians 419 where you know Paul when he was writing to the Galatian believers he says you know you people are now running after the law and this makes me feel so bad so now I'm again in the pains of you know childbirth because I'm going to again work with you till I see to it that Christ gets formed in you so that you know you'll stop going after the law and rather enjoy these riches which are made available to you and Galatians 128 he says so that we may present everyone you know before the Lord fully mature in Christ so Christ is supposed to dwell in us in a way where he's becoming more and more formed in us we start becoming more and more like him to an extent where we become mature the way he is mature in our reactions, in our responses in the way we do ministry in the way we relate to people who irritate us in everything we are supposed to become fully mature the way Christ is mature so that is the prayer that Paul is praying for these efficient believers it's not just enough that they have riches waiting them in heaven those riches need to start working in their life so that they start getting formed into the image of Christ and why is it so important for Christ to be fully formed in you because you see that takes us to the next step which is also in verse 17 where it says and I pray that you being rooted and established in love may have power together with all the Lord's holy people to grasp how wide and long and high and deep is the love of Christ when Christ starts getting formed in you you start becoming more like him then you start actually understanding his love because you see God is love so the more you are allowing him to be formed in you your awareness of his love deepens becomes clearer and clearer so then because now you are getting rooted and literally established in his love it's like the center of your being you know someone I travel in this crowded buses where we are literally getting crushed against each other like cattle and so you know we have tempers running high and then when someone snaps at me and says something rude I feel like snapping right back at them because I too know exactly how to be rooted but if I'm getting rooted and established in love and that's what is holding me in place it will not be that easy for me to lash out because immediately I can feel that hold, that grip and God saying no, no, control yourself because that is what is rooting you and you know holding you in place that really makes a difference so I have gradually noticed my temper level coming down simply because I am beginning to understand how deeply I am loved and if that is the way he loves me that is the way he loves the other person also the one who snapped at me in the bus the Lord loves that lady also just as much so when you start becoming aware of that you can't quite respond in the way you used to respond earlier you know it changes you your outlook changes this is the divine work which he does and so it's a lovely prayer for us to pray over ourselves for the prayer in chapter 1 and this prayer over here in chapter 3 it can change us, it can really change us God will start bringing us out of the pit by the power of the Holy Spirit and we will have the joy of seeing that we are changing we don't have to feel disgusted about ourselves anymore it's just nice to know that you are improving we feel very encouraged so as you are getting rooted and established in love you will have power the Holy Spirit who has given you the power through his power you start grasping how wide and long and high and deep is the love of Christ and then verse 19 says and to know this love that surpasses knowledge why do you need to know this love like this so that you may be filled to the measure of all the fullness of God so once you really understand this love and how it applies to you and how it applies to all the other people who are getting on your nerves it changes you are so you are so grateful and so enjoying his love and you realize that the other person is also that deeply loved and it changes the way you interact with them and even as you are changing in your interactions this is what happens you get filled to the measure of all the fullness of God you start becoming like him where he is it's not so much more of selfish Deepika that's filled up on the inside rather it's more of God that is filled up on the inside so that starts happening so why do we need to get rooted and established in love and begin to understand how great and why this love is when we start grasping those truths it causes us to start becoming full of him to the entire fullness of the measure of him this is what these glorious riches have been given for because when Jesus on that day when he first came to us and we were stirred in our heart and we felt that we must repent and we must turn our back on our past and start following this Jesus he didn't just come over there to say from now on I am going to be your Santa Claus you want to follow me no, when he came the salvation invitation was that come to me all who are no weary and burdened I will give you rest now step 2 take my yoke upon you and learn from me don't worry I am a gentle and humbling spirit so I am not one of those rough and tough teachers who will threaten you and whip you into submission I am gentle and humbling spirit he says in Matthew 11 so take my yoke upon you and start learning from me so with that attitude with a humble attitude knowing that he is gentle and humbling spirit when we start learning from him we start being filled to the measure of all the fullness of God and all these riches which are available to us they are imparted into our lives so that we can become the person that we are meant to be and then once you have a right attitude towards God and towards the people around you what is the problem? now God can release any amount of wealth into your life because it is not going to make you proud you are not going to become greedy your priorities are right your heart is set on the kingdom of God and upon righteousness so all these other things will be added to you because they are not going to get in the way they are not going to be obstacles which will cause you to fall so now the Lord can release whatever is required into your life for you, for your ministry, for your family because in fact you will take that and start investing into people's lives you will use whatever has been given to further the interests of the kingdom so the first thing is to get our heart right towards God and towards people and this prayer can be a starting point to help us get onto that pathway so let's come to the next portion we are almost out of time but we do have 3 minutes so if we could have somebody read out for us Ephesians chapter 4 verses 1 to 5 Ephesians chapter 4 verses 1 to 5 if someone could please read out I therefore the prisoner of the Lord beseech you to walk worthy of the calling with which you are called with all lowliness and gentleness with long suffering bearing with one another in love endeavouring to keep the unity of the spirit in the bond of peace there is one body and one spirit just as you were called in one hope of your calling one Lord, one faith, one baptism one God and Father of all who is above all and through all and in you all amen so here we see Paul saying he started off in the previous chapter by saying I am a prisoner for your sake for you gentiles and now he says as a prisoner I am urging you to live a life worthy of the calling to which you have been called I also was called to this calling and for the sake of this calling I was even willing to become a prisoner I was willing to even get arrested so in the same way I am living a life that is worthy of the calling you too all of you who have been called to these glorious riches you also must live a life that is worthy of the calling and what is the one point that he makes how do you live a life that is worthy of calling he talks about love you know I mean the more I am trying to grow in the Lord I am beginning to realise that love is at the centre of it all it is so easy to do ministry it is so interesting and enjoyable to teach it is so interesting to do all these tasks and chores and all of that but when it comes to love I know that is an entirely different story because somehow from the moment that we are born we are born with ourselves established on the throne of our hearts to get ourselves off that throne and you know start thinking of other people's interests and the way we respond to them I am realising how it is just something that can happen only through the Holy Spirit and the more you grow in the Lord you become aware of this every little thing that goes against the love of God immediately you feel that correction in the Lord saying is this the way I would react if I were in your place if you are my follower you should be reacting the way I am reacting dwell on these verses when we come back because that is the first condition that he places before these efficient believers he says please you need to live bearing with one another in love he says so we will get back to that when we come back from our break thank you