Welcome to the show. It's me, John Park. And it is time. It's actually a few minutes past time. So sorry about that for John Park's workshop. So I was finishing up a 3D print and installing a tool I want to show you in a bit. So I had a couple of things go a little longer than expected. So thank you so much for your patience. I appreciate that very much. And I'm going to check real quick before I get going if this tool I was installing actually properly installed. So give me one second to test something in the background. Let's see. Might not have worked. All right, we may have to improvise. Or we will troubleshoot it in real time. Let's see. What did it yell at me? It's a PIP problem. I'm going to update PIP, upgrade PIP. Fun when your tools require other tools that you forgot to update. And is it working? Excuse me. No. All right, we'll work on this together in a little bit then. And then if it works, we'll do the Circuit Python Parsec. And if it doesn't, we won't.  So first of all, thanks everyone for stopping by in the chat. I see over in our YouTube chat Clipper Silvio, welcome from Brazil. Nice to see you here today. And if you're wondering where the rest of the chat is, head over to Discord. The Adafruit Discord server is available by going to adafruit.it-slash-discord. And then you can check out the live broadcast chat channel, which is where we see such gems as this, Caddyshack GIF. Well, people are patiently waiting. Thank you, Andy Callaway. DJ Devin3 says, have you tried turning it off and on again? I'm going to turn the whole thing off and on again. That could be exciting. Let's see. In fact, let's do a couple of our normal things first. And then we'll see if we can troubleshoot this thing on the way to doing a circuit Python parsec. How about that? So first of all, I want to mention we've got a jobs board up over at jobs.adafruit.com. You can head there if you are looking to get some work or if you're looking to hire someone. That's what the board looks like right there. Grab my window. That shows some positions that have been posted. And this is anything from full-time work, part-time work, remote work, contract work, on-site, and so on. And if you take a look at some of these, you'll see they've got little descriptions there, qualifications, some links. These are all vetted. So this is not a cesspool of scams, ideally. Adafruit jobs, not a cesspool of scams. That is our official title. So go check that out if you're looking to hire someone if you're looking to get some work for yourself. That's at jobs.adafruit.com. If you didn't know, I've got a show that looks like that. JP's product pick of the week I do on Tuesdays. On that show, I grab a product of ours, sometimes a new one, sometimes a classic, and put it through its paces, show you how it works, do a little bit of a demo, hardware, software, and so on. There is a discount during the show that you don't need a coupon code for. You just put it in your cart, buy it during the show, and there you go, often 50% off. That was the case this week on this one. And this show is usually 15 minutes long, but I'd like to do a little one-minute recap so you can check that out right now. NAU7802, 24-bit ADC. I'm gonna take a clue and plug that in. I'm using some crimp connectors connected up to a load cell. Looks a lot like this one, except this one I have mounted to a little metal plate and I've added a little place to set something that you're weighing. I will take a container, and now I'm going to tear this scale. I'm gonna hold the button there. It's gonna remove the weight that it sees on there from the starting point, so now we're at zero. I'll start pouring these in and you'll see that the weight is going up and up. 18, oh, I went a little over, I'll pull some out of there. Okay, watch this, I'm gonna put one bean in and you can see it's really precise measurement that went up to 18.1 from 18. It is the NAU7802, 24-bit ADC for measuring strain gauges and load cells. There goes my mic. So if you are willing to help me figure this out, it could be an artifact of my Python installations being a giant mess on this particular machine. Totally forgot to check that out before the show. I'm so sorry, I had it running on another machine inside. I am trying to install DiscoTool, which is what I wanted to show you on the CircuitPython Parsec. So let's see if I can share... I guess I can do this from inside of Adam since I can show a shell inside of there. So here's what we're running into. If this works, I'll explain what it is. Even if it doesn't work, I'll explain what it is. So I was trying to install this with... Let's see, Python 3-M, PIP install DiscoTool. And this is what it's not loving. Python setup.py.eggInfo did not run successfully. It can't execute setup.py cause setupTools is not available. SetupTool is the Xcode thing, is that what I'm running into? I'm gonna bring my Discord chat over into view here so I can see if anyone has ideas on that. I am open. I don't know if there's an obvious way to correct that. Or if someone knows of another way to install DiscoTool. Because DiscoTool is fantastic and it kind of builds on what we did last week with TO. So let me know in the chat. I'm gonna keep an eye on the YouTube chat and on our Discord. And see if anyone has ideas on that. It must be setupTools. How do I install setupTools? I feel like that's part of Xcode. What version of Python am I using? All right. Can I do which Python? I'm installing it with Python 3. Which Python... Nope. Okay. So Python 3, is that the actual answer? I feel like this machine had like Anaconda and all sorts of other terrifying abstractions of Python. All right. So let's try Todd's suggestion here. I think it didn't like that. Python-m-pip install DiscoTool. User. Let me do that again with Python 3. Hmm. Same error. Let's see. We'll do it with pip3. Good suggestion, Liz. No module named pip3. All right. I think we're gonna have to skip this. What I'll do, I will go back and record this once I get it working and I'll be able to post a circuit Python parsec to watch on Ask an Engineer next week and I'll also post that to the socials. But what I will tell you is DiscoTool is useful. I think the name probably comes from Discovery. It's useful because what it allows you to do is often from a shell I use Screen or now Tio to connect to a microcontroller and let's say in this case, the thing I did prepare was I got my camera switcher over there and these two gizmos all connected over USB, all circuit Python drives and I'm forever being confused by which one to connect to because they show up with names like c-u-dot-us-b and then a number, 14-4-8-0-2 or whatever. DiscoTool, among other things, gives them a name. It tells you the sort of short nice name. So it'll say circuit playground blue fruit. It'll say probably Feather RP2040. It'll say trinket M0. So let's even know which one has which name and then you can connect to it along with a whole bunch of other cool stuff. So I'm excited to show it. I can't show it right now because I forgot how calacious the Python is on this particular machine. All right, so we'll move past that. Sorry about that. Let's see. So let me close that window out of there. That means we can get onto my project that I started working on. So I've got a couple things in the works right now, by the way. So you saw the coffee scale that I showed during that one-minute recap there of the NAU-7802. So the code there, Cgrover, Cedar Grove in our chat created, he's actually writing up a guide for us, which I hope you already agreed to that and I didn't just force your hand. I think you agreed to that. We're going to collaborate on it. I'm going to build the physical coffee scale with two load sensors, I think, for one application, maybe just one for another. Measure grounds or measure the shots pulled, and that's going to be a really cool guide that'll show you how to use that load cell and that 24-bit ADC to get really precise measurements. As you saw there, it'll measure down to 0.1 gram, which is fantastic. What else is up? Collaboration is going strong with Noe on the Walkman person that I'm working on, the MP3 Walkman. He's working on some designs and three models for the case, which is excellent. Oh good, Cgrover says in our chat he agreed to write it, so he's working on it now. Thank you, Cgrover. The other projects that I've got going Plant Synth that I showed last week, I'm going to write up a quick guide on that probably next week. I have some nice sort of almost a PWM of the signal, of the waveform happening based on capacitance as you touch the plant leaf, depending on how close you are to the alligator clip. So that should be a fun guide and it's doing onboard synthesis. You could also use it for MIDI, but it's fun to do onboard synthesis. And now, I know I've got a whole bunch of things in the works now, I'm going to be showing you something about flying faders. So if you allow me, I'll bring up my Chrome browser again and let's see, can I open from within here? This is one of my funny Chrome app ones. Yeah, we can just click around and get there. So motorized fader is this motorized slide potentiometer. So the cool thing about this, this is really three things in one. So it is your run of the mill slide potentiometer, which has three pins on it for a wiper and ground and positive voltage. So we can use an analog read to tell where this is, how much resistance we're getting, usually 0 to 10,000, 10K. Usually it's a 10K pot, pretty typical. That is sort of the big part one of what that product right there is. Oh wait, did that not update? Oh, that's strange. Sorry, I was showing the wrong window. I am, sorry about that. Where'd you go? How about that one? All right, hold on. That thing. Okay. So top part of that is the 10K slide pot. It's a nice big one. It's I think 100 millimeter throw on it, or roughly that. I think maybe that's the size of the case, 100 millimeter, something like that. And then you can see underneath it, it has this little DC motor. There is also, and I'll show you some up close of the real one in a second, there's also a little belt and pulley, sort of tooth belt, I think it's tooth belt and pulley, that is used to move that little fader handle for you, just like a linear actuator. So there's a little gearing in there that converts the rotary motion of the motor, gears it down so it doesn't move super fast, gives it much better torque, and it can push that fader back and forth up and down. So it's just like a linear actuator. That's two pins on the motor. And then there's a fourth pin on the pot. So normally these slide pots have three pins. This one has a fourth pin, which is a capacitive touch pin for the handle. So this one I'm holding right here, this has a plastic handle. What do you call these? I can't remember what you call them. It's not the cap, because this one's missing a cap, but the fader knob we'll call it. That's plastic on this one, it's pretty typical. On the motorized slide pod it's metal and it is connected through to a capacitive touch pin that you can then read. So when you touch that cap or knob and you would need a metal cap if you're going to put a fader cap on top of it, you can do things based on touch. So that could be something simple, like when I touch it, I'm turning off the motor so that I can move it freely so it doesn't strip the gears or jam the thing up to who knows what. Anything that you can use cap touch for. So those are the features of this and the way these are often used, the reason I call them flying faders, even though it says motorized slide potentiometer, is really these came out of huge mixing boards. So audio mixing boards for recording booths and live performance, particularly in recording, let's say you've got 48 faders for 48 different tracks of stuff that you're listening to and recording on to multi-tracks. If you want to nudge those levels around for a mix, once you move one, who knows where it used to be, you can't get back to a previous position. If you have a bunch of songs that you're working with and they all have different settings in the old days, you would put a little piece of tape and write color tape per song or more likely white tape and write on it which song, which setting and then you go in and manually move them around. So the innovation of flying faders is you could store presets and have with this kind of motorized slide pot, have the fader move to the position you need, just maybe for a setup for a song, or you can get more elaborate and have real-time changes going in sync with the music while you're mastering, let's say, but still have the ability to go in and reach out and grab and change a fader. Also gives you visual, a great visual feedback of where a level is. If it's high up, you know it's high, if it's low down, it's low. So that's the sort of history behind or the reason these things exist, but you can... Oh, yeah, let me go to Discord. You can see an example here that Yanisku showed us. Is this a flying one? Let's see if it is. Oh, no, that's just a cat movie fader. How about that? Yeah, there's one. DJ Devon, thank you. So here's a whole big group of faders with different positions back and forth between them. So the next thing I like to do is show you this one in action, show you how it's set up, what I'm doing to do a little build for it, and I think I'll also mount it in my little 3D print that I had going before. So let's go jump over to our Downshooter over here. Benchcam. There you go. There's the Benchcam. And let me see how that focus looks. That looks pretty sharp. Okay, so let's take a look. So what you're seeing right now actually is the dimension drawing I did so that I can model or laser cut that. By the way, I'm noticing this one light is super bright. Let me see if I can lower that. There we go. So this is some cutouts I made and some screw holes and then some extra mounting there. The 3D print that I just pulled off of the printer I had to actually grab my glass printing bed so that it would cool enough to pop off of there. Let's see if we can get that off nicely. If you try to get these off too soon, you will add a bend to your print. I like these little artist's palette brushes. So when I didn't at first grab that, I tried to peel this off right before the show and I mangled it up with my little spatula there. So I had to stop the print so it's short. I wanted to make this tall enough to clear all the base of the thing. But we'll see if it'll still be helpful to have that. So here is the view there. Here's our fader and I just have it on a little vice clamp there right now. Let's get in closer. There you go. So you can see here a nice long throw pot. And typical for pots, there are a couple screws in the top for mounting so this is usually you'll just have a cutout for the track and then a couple of screw holes to mount into a top plate. You can see we've just got, I think it's four millimeters of clearance there for material. So I tried to add a little cutout for that right there so that won't get stuck. We'll see when we try to put that in if that works, that was first iteration. And then here you can see, I've got it on the bottom. Here's our, let me flip this around. Match the diagrams. So here's our motor and what I've done is I've gone ahead and just soldered on a couple of socket connections. I've cut up some of our jumper, our nice premium silicon jumper wire. So those are my two motor pins. And what is required to drive the motor is an H bridge motor driver so that we can reverse polarity in the chip. So that's this little chip I have here. What's this guy called? The L991, something like that. Like a dollar or two for the little motor driver there. And so that can turn this forward and backward and when that turns forward and backward it will slide that fader. If you look carefully here, you might be able to see this little pulley turning. This little pulley gear actually that the belt, little tracked belt is on. It's moving as I slide that. And that's what the motor is turning back here. Same sort of little arrangement and you'll see this little belt. See those little wheels there? It's a really neat little system with a tracked belt. The other connections on here we have, so just ground down at one end and this is pretty typical for faders. You'll have the ground pin down on one end by itself and then usually the wiper and the voltage pin, positive voltage pin will be at the other end which are what this yellow for wiper and red for voltage. And again, these are just some wires I soldered on there. I also need to put a little heat shrink so I don't get any whiskers of wire touching each other. And then this last one, this third connection here, that's the touch, capacitive touch. So what I'll do actually is, I'll explain how this is all connected up. Then we'll take a look at it kind of in pieces of what's going on. So on the breadboard here I've got Feather M4 and I am, first of all you'll see I'm running a capacitor across power and ground just to help with any, make sure we don't have any little voltage spikes and brownouts and things of the logic on the board. So that is the USB power, so I'm taking 5 volts. This is meant to be plugged into USB. So I'm taking 5 volts and that is going to the motor driver chip and only there. Everything else is using 3 volts. So the little motor driver chip there, the H-bridge, then has a couple of connections for PWM on the microcontroller so we can send it in one direction or the other using PWM. And then the rest of the connections up here are ground. We have two pins that get the USB 5 volts and then the output to the motor. That one is right there. The power and ground for the slide pot I'm using 3 volts and ground here. 3 volt rail coming off of the 3V pin. And then I'm reading on A0 here, any analog pin will work, but I'm reading on A0 here the position of that, essentially as a voltage divider. And then the last thing is the blue wire you see here coming off of the touch pin I have going on to the breadboard and then I'm running it to a touch pin. A4 is what I'm using. I'm also running a one mega ohm resistor to ground and that is necessary in most cases for the capacitive touch to work. So then the last thing I've got is some buttons here that I'm using just to play back some presets of position on here. So actually this camera is nice and we're set up. Why don't I re-clamp this in here and we can take a look at this in action. I'm going to flip it around actually because I can get a little bit of there's a little bit of mounting plastic here we can grab onto without disrupting things if we're careful that makes it a little more stable. Let's see, I'll move this down here and let's find 5 volt USB for you. My kingdom for a USB micro cable. Where are you? That used to be all I had. Now I have USB C everywhere. Alright, I'm going to... Can I use that? No, that's a bad idea. Sorry, one second. I'm going to grab one from over here.  Unfortunately the issue is that my 3D printer is inside my studio space and not out here in the workshop. Alright, so let me feed you a nice... I'm assuming this will work on here I haven't tried it plugged just into power and I do have a demo going that's doing some MIDI stuff so it may be that we have to plug it in over the computer, let's see. Did you all see it move? Oh there it is, ok, so it looks like it's working. So you can see I've got some presets saved there that are just preset positions that it will go to. When I touch it, it stops doing any motor stuff so the capacitive touch tells it that it's okay to move and then when I let go, it goes back to its position although it's fighting me right now so either something became disconnected or this is an issue with not being on the computer oh no no, there we go I could feel it letting go. Yeah, so that's giving me no resistance right now and then when I let go it's going to go back to whatever position I left it at. But you know what, this is acting a little funny and cooler is this with MIDI happening so I'm going to pull this out let's go over to the computer and we'll do it there so let's just want to make sure I'm not pinching anything with the clamp there. Oh you know what, before we do that let's actually, let's see how well this will connect to the 3D printed thingy. I just need a couple of M3 screws these might work also, zoom out a little bit the, we'll see if the 3D print really allows my screws in there because I printed without support some little upside down recessed holes just got to clear those I think I'm just going to pre sort of tap that plastic grab the other one yeah the print lied to me it said it was going to take 2 hours and I started at about 3 hours before the show but it was slower than expected oops, I'm going to turn one more light on over here too alright so let's see there was a nice data sheet by the way on the product page from the manufacturer that gave me the dimensions and I based my measurements on that it looks like they were good this is going in here pretty nicely there we go at least so you can see why I was trying to print long legs on this so I have to hold this or clamp this part now this is going to hit I think yeah because my screws didn't recess as much as I had hoped so we'll see if that's a problem if it is I can take that out or we can encode tell it not to go all the way because we can sort of set arbitrary limits on those and then remap the values we're using to what we want so let's see do I trust that cable? I think I trust this cable one second I'll do about that view there plug this in and take a look at the code that I'm using on there as well will this work? will that sit there? I think that might not we'll see there we go oh I got a camera view in my face there we go okay so I think I was not going all the way to the limits anyway yeah I'm stopping shy so that's great I'm not going to be in danger of hitting anything yeah this is working much nicer let me get a little closer to that too oh my focus was good let me bump the exposure there too okay so I will will that rest there nicely? yeah that might work sure that works okay so I'm really excited about this feature just of being able to have it sort of set a return position so this button is close to center let's say so if I have a value that I want to change freely but then just let go and know that it's going to go back to that position that's what we get peel that off of that saved position and know that it's going to get back there the code let me open up the code that's running on here take a look so this is running in circuit python and I think a make code example because I think what we want to have is just a fundamental guide on how you use this make sure that's the code yet how you use this thing how you use this motorized fader it's not too tricky but it's just a few it's sort of a collection of these three things you're really dealing with an analog read, a PWM motor output and a capacitive touch and let me see I can't remember from printing anything in here yeah I wish I had that disco tool working because I do have multiple things plugged in let's see which I'm just going to unplug my camera switcher see this is the pain I go through every time I was very excited this morning about let's see dev dty there we go okay yeah so here you can see I've got it's a set of 0 to 1 no 0 to 255 values I think I can send out or that I'm kind of converting this analog read to and so you can see when I let go it's going to head back up here to about 240 I think I have a slop of about 1 so that heads up there to about 240 when I press button 1 it moves to about 180 press button 0 back up to 240 so you can see it's pretty pretty accurate good enough for the type of feedback that it has and if you think about it in these cases when I'm telling it to just go to a position this is a servo motor in the sense that there is this feedback loop of I tell it to move and then I say check the analog read of the slide potentiometer because they're coupled to each other and I tell the motor to move then I say check move check move check and it just keeps making a direct journey to the desired position and then it stops when it gets there issues you can run into of course are overshoot it can go past if it's the timing isn't right and I've seen that happen sometimes it'll jiggle a little happens worse if you're traveling really fast if you go let's say all the way from one end to another also if you find that it's overshooting what you can do is have the speed with which it's then reduce as you get closer and closer to the target and that's why you'll see I have this nice ease to it so it doesn't just snap in place but it actually eases there especially if I go watch if I go this full distance there's a little slow down right before we hit camera doesn't catch it I don't think as well as it is the frame rate on the camera isn't as good as we need to see it in all of its glory but essentially I was running into overshoots and then you can get into these real jiggles where it just keeps overshooting the mark so you can widen that's why I have a slop of about two positions you can widen that or use other sort of PID types of algorithms in your code to get there without blowing past it so let's take a look at the specific code that I've got going here um so I'm importing some libraries here that I need for the motor stuff, PWMIO and Adafruit motor I need analog to read the slide pot and I've got touch I O for the slide or rather for the touch by the way one thing that you can see I don't know if you've noticed this is that I do have one control hooked up right now which is the brightness of the neopixel that's on the feather so you can see when I get down to the bottom here of the pot I've kind of flipped around we get that neopixel turning off and as I go all the way up to the top it's full brightness on the red channel and then when I let it go you can see it's going to head to a position and give us that relative brightness on the neopixel so I've got neopixel in there I've got digital I O so that we can read these buttons here and I think you might need digital I O for setting up the PWM pins if I remember correctly optional MIDI setup I'm just setting up a USB MIDI to send out a value over one of the MIDI CC's chose MIDI CC 16 here setting up buttons as I do these debouncer yeah so these are debouncer buttons which I like here's my little list of saved positions so going between 240 180 120 and 40 so this should get to close yeah close to close to pretty close almost exactly there nope now it nailed it on that one then I'm setting up analog read for the slide pot on A0 and turning that 0 to 655 35 range to 0 to 255 and that's the I think that's the granularity I'm using for the motion and maybe by checking against that full value we'd be able to have more accurate motor motion can't remember setting up a couple pins for PWM those are the ones that talk to the little motor driver chip and then using the motor driver DC motor and setting the two channels to these two pins set up touch I O on board A4 and then setting up the Neo pixel and then for some of this motion stuff I got I found a nice clamp method just on a google search here that allows me to keep my speed within negative one to one range if it goes beyond that it'll crash the motor driver so we have to constrain our values within those and that is because I am adding a little bit to the speed so that it never gets too slow you can't move below about I think 0.1 from 0.1 to 1 or negative 0.1 to negative 1 if you go slower than that the motor just can't be turned it won't it won't overcome the inertia and actually get going and that's just an issue with these little DC motors so I'm adding a little bit to the value except I don't want it to exceed the bounds of negative 1 and 1 then I am setting it's time to move so this is this little function I made go to position new position we find out where the fader is where the slide pot is and then while the difference between where it is and where we want to go is greater than 2 then we start moving by adding throttle so motor one throttle speed if you set that to 1 it just goes full speed so it's the same for the negative direction forever and ever same with negative 1 but we want it to stop and so that's why we're doing this feedback servo feedback loop and then I'm also while we're moving not just when I grab it while it's moving I'm having it send a midi cc value and this seems to still work great I was worried this might slow down the whole motion thing but it didn't change the speed in any direction just when the fader needs to go left or right basically or up or down then when we arrive there I turn off the throttle so it just stops stop sending any current to the motor in either direction that just puts it into it stops moving around you can use the stop by setting it to 0 but that seems to cause anger and overshooting I'm not sure why this is my start up sequence here just I go to a couple of my saved positions I don't know why I didn't do all four but there you go and I'm also printing the values out that was just for debugging and then I set my current saved position to that state that I can check to see which which of these four button positions were at and then here's the main loop so I check the buttons and if one of them falls then I you can see here I'm printing out hey button one was pressed then it changes that current saved position to be 0 1 2 or 3 when I touch that all it does is turn the throttle to none when I am not touching it it says go to positions that's calling that little function I have go to position of whatever the saved positions list has the 180 120 80 40 or whatever I had it'll go to one of those and it's whichever one we have a button press for initially it's 0 any time I press a button I'm changing which one of those is stored and then this is the filter stuff that this is the filter stuff that Todd bought helped me out with both for reading I should say both for reading the analog read neatly and you can see this is a really nice clean analog read doesn't jump around which is great so this is a nice little filter algorithm here that I've used before that Todd has posted I think on his tips and tricks and his analog read off to double check if that's the case but it lets you adjust your filter amount I made a little variable here so we can have it kind of the analog read will sort of take a little bit of time to ease into a value or it'll get there pretty quickly and hopefully still not jitter I am changing the LED red component red component to be whatever the fader position is that's at 0 to 255 so that works well and then here is this is the kind of what do we do when we change the fader so that could be nothing I could just be you know go there print out your position that's what these lines do here so that's if the current position is different than the last fader position which is the saved state then we just print the position out it's all I'm doing right there and then update that saved state to be the current one so it just continues this is my little optional demo thing here which I probably won't put into the main example on the guide because people want to do their own thing there maybe it's just all about controlling neopixels maybe it's controlling some big motor on a robot whatever you're doing goes here and so what I decided to do is take that fader position divided by 2 that gives me 0 to 127 and that's the range of a midi CC message and then all I have right here is midi send a control change fader number and the fader CC fader number was that channel essentially channel 16 or CC number 16 that I chose so actually if I open up let me open up a midi monitor here I like this little midi monitor app and let me share that real quick real time changes to my broad DC business hold on black hole for a moment are you midi monitor are you all big like that huh so here all you'll see is I can tell this to read out what's happening on some midi device here you can see I only have one thing that's showing up as a midi device that's circuit python USB midi ports 0 that's the fader here and so as I change this slider I am sending out messages anywhere from 0 to 127 and you can see as I use the motor memory to go back to one it'll repeat repeatedly fairly reliably get back to that position so this is let's see this one sends midi CC value 89 and so if I grab it move somewhere else let go it goes back to 89 which is so cool so I wanted to besides showing you numbers I wanted to give you a little example of that in action so let me pop up some windows here get rid of that and here oh was I showing you midi did you see the midi messages because I don't know if I pushed that camera change to the feed let me know did you see midi monitor show up let me know yeah big serious drink bottle thank you DJ Devin you did see the midi thing I'm so glad yeah sometimes I can make changes that don't actually push out to this sort of active canvas okay so here I've got a little patch I built in VCV rack a virtual modular synthesizer I'm going to turn on an external speaker over here and I just have some sort of sawtooth wave I think play in in my midi to CC midi CC to CV module here I'm picking the feather m4 express circuit python and I've already set it up so that channel is this port right here and then that runs out to the frequency of a filter which is going to adjust the cutoff of a low pass filter oh I put the wrong camera down there so you get the idea there the unfortunately this one doesn't I think this module doesn't automatically visualize so that knob should be turning and basically everything I was doing there would be the same as if I grab that knob right there except the flying fader is more fun and it has preset stored really easily right I can I can jump to these three three or four rather four that makes it so much easier to say these four preset positions so I'm so excited I've never had a flying fader before motorized slide pot to play with I'm really happy with how quickly this this came together this was this was not difficult to to sort of get up and running in circuit python and I think it'll be straightforward in Arduino and in make code as well so long as we have PWM driver type of action that I can use to make the motor do its thing what else yeah so you know the the dream of course with these is a huge bank of them but that gets expensive quickly I think it was about $25 piece I am probably going to try something using motor feather wing as well which has four outputs so we could do multiple of these off of one feather wing but this little circuit that I've got here that's a that's pretty pretty easy and like I said I think it's a dollar or something for that chip so not too bad also I'll point out while I'm showing cool stuff let me bring up bring up this window right here hey there you go which window is that are you this no I keep pulling myself I've got two chrome windows that it could be it's that one okay if you look here let's see L 9 1 0 L 9 1 1 0 I had it wrong that is the H bridge motor driver it's a dollar fifty so that's what I'm using to control the motor on there and let me see button assortment do we have yeah so this tactical tactile not tactical this tactile switch assortment is where I got these twelve millimeter by I think seven millimeter buttons the white ones that you see right right here these are great I really like them the breadboard friendly they're nice and big and clicky easy to easy to use for this so that was nice to get those in and have some to play with I'm actually kind of hoping that more will put in stock big bags of the individual one so you can say okay I love that one I just want 10 of just that one or 50 of them who knows your plans are so I think that's gonna do it that's the flying fader way cool if anyone knows about fader caps that are metal or maybe maybe even some conductive filament for 3D printed cap I'd love to love to try something with that I made this extra big cutouts and the ends cut out unnecessarily so we can kind of see all the parts of it but typically you'll just cut a small slit for the track there so you don't have to see all that you get a nice integrated feel I'll probably do some laser cut versions of that just because laser cut stuff is perfect for these types of surfaces I think that's gonna do it so let's see what's happening discord and youtube chat Todd has found a tactical switch cover Nintendo switch very cute alright well hey thank you again for stopping by thanks for attempting to help me with my install there sorry we didn't get a circuit python parsec I will figure that out on the install here and do a recording of that so we'll have a little bonus follow up circuit python parsec I think that's gonna do it for today thanks everyone for stopping by for Adafruit Industries I'm John Park this has been JP's workshop John Park's workshop it even says it right there bye bye


So in the previous video, we showed that the function y equals c, e to the x squared over two, is in fact a solution to the differential equation y prime equals xy. And we can do this for any, any parameter c whatsoever. This right here represents what we call the general solution of our differential equation, general solution. That is, this right here gives us the complete generality of what we could expect, where you could choose any parameter c right here, and that would give us a solution here. And one thing that you're gonna see is that for first order differential equations, you're gonna have a single parameter you can choose, and every solution will be based upon that single parameter. With second order, third order differential equations, you can have more than one parameter. Again, we won't get into that in this lecture series. I would invite you to watch a lecture series for Math 2280 at SUU to learn some more about that, or just other references online. But first order differential equations will have a single parameter general solution. Now, if a specific value for the parameter c is chosen, like in the example we did before, f of x was e to the x squared over two, that's choosing the parameter to be one. And another example we did was g of x equals three, e to the x squared over two, we chose the parameter to be two. In that situation, we get what's called a particular solution, a particular solution to the differential equation. And so a big part of differential equations is about trying to first, we have the first, when we have a differential equation, we try to solve the general solution. We have to find that. This is, of course, the hard part, and in future videos we'll talk more about how to find the general solution. What I wanna talk about now though is that if you have a general solution, how does one find a particular solution? How do we know if it's one for c or three for c or some other value? Well, if you have a general solution in hand, what you can do is you can use some initial condition that as you know something about the function, like maybe you know f of zero is equal to some specific number, we'll call it why not. And so if we have a general solution, we can find the particular solution using some initial condition, some initial value, and this is often referred to as the initial value problem. So in a previous video, we looked at the differential equation y prime equals one half y squared minus one. And we saw that the general solution to this differential equation was one plus c e to the t over one minus c e to the t. So we checked that this was a, we saw that this was a solution to the differential equation right here. As this is a first order differential equation, there'll only be the single parameter c. And so we found the general solution. What we wanna do now is actually find a particular solution using the initial value y of zero equals two. And so once you have a general solution again, that's the heavy lifting. This is pretty powder puff at this moment. Let us take the initial condition, we're gonna plug in t equals zero. We're gonna stick in t equals zero in these situations right here, right? And we're gonna stick in for y a two. That's all that one has to do. So y equals two exactly when t equals zero. So we go one plus c e to the zero over one minus c e to the zero. And now it comes to simplify these expressions and solve for c here. Notice that e to the zero is equal to one and one times c is just gonna be c. So you get two equals one plus c over one minus c. I would clear the denominators at this moment times the right-hand side by one over one minus c. You have to do it to the left-hand side as well. The one minus c's would cancel on the left. This then gives us two times one minus c. I'm gonna distribute that and get two minus two c. This would equal the right-hand side, which is one plus c. Adding some like terms, we're gonna add two c to both sides. We're gonna subtract one from both sides. We end up with one on the left-hand side and we're gonna get three c on the right-hand side in which case then we see that c should equal one third like so. And so if we take that and plug it into the form we had before, we're gonna end up with, so this again, this was our general solution. We're now plugging in specifically, we're gonna get one plus one third e to the t over one minus one third e to the t. Now what we've written here in yellow is a particular solution. It solves this differential equation, not just a general. It also solves it using the initial value y of zero equals two. Now, in this particular form, I don't really like fractions inside of fractions. I get kind of messy. So if you times the whole fraction by three over three, distribute these threes throughout, you end up with the format I actually like here, y equals, you're gonna get three plus e to the t over three minus e to the t. And so this actually represents the particular solution to this differential equation we're looking for. It's a solution to the differential equation. We saw that previously and it also will satisfy the initial condition. If you plug in x equal t equals zero right here, you're gonna get three plus one, which is four over three minus one, which is two, four over two is two. And so this solves our initial value problem. So if we can find the general solution, finding the solving the initial value problem is super easy that is finding the particular solution. It's a cinch. The hard part of course is finding the general solution. And so in the next videos in this series, we'll start to give some hints on how one finds solutions to differential equations as opposed to them just appearing in front of you.


Community engagement CE was recognized as a key component and catalyst of that transformation. The nimble responses to the pandemic substantiate the need for CE programs to maintain the infrastructure necessary to achieve the primary CTSA goals of improving health within and across communities and localities. This article was authored by Milton Mickey Edder, the PASA group, Ralston, Penny, Melinda, Eugenia, Spites, Joe Draca S Brown, De Leon, Jessica, Wee He, Sarah, Claxton, Tina, Saviano, Dennis, Himmelfarb, Cheryl Denison, Ahmed, Syed, Nelson, David, Brown, Jen, Conjula, Nomratha, Tandon, Darius, Thomas, Ariel, Aiyu Young, Mona, Chen, Weiting, Stuart, M. Kate, Zenda, Robin, Brown, Alinef, Carson, Savanna Al, Morris, Deann, Vassa, Stephanie Dee, Jaeger, Rodney Vaughn, Tara's, Howard, Niyen, Francisco Ting, Palmer, Ninica, Fleischer, Paula, Cabrera, Abbey, Wong, Erica, Harrison, James, Potter, Mike, Grumbark, Kevin, Kotler, Linda, Millay, Tamara, Stryly, Catherine, Mud, Tia, Edder, Milton, Monson, Karen, Austin, Robin, Jones, Clance, Sugarwala, Laura, Cullen, John, Orlando, Alyssa, Bennett, Nancy, Kubicek, Katrina, Kipka, Michelle, Croyzant, Sharon A, Singleton, Chantil, Prochaska, John, Bone, Krista, Tamara A. Millay and others.


Tube team keep it clean Literally team keep it clean. What's going on? It's engraving here with another video and in this video. I Already know y'all have heard it by now. We all heard it last night It was a little late not too late But it was a little late and I was I thought about doing a video last night, but I say, you know what? Let me let team keep it clean. Let me let them sleep. Let me let them rest Let me let them relax. Let them get their energy for the next day for whatever news breaks So I guess this not really breaking news since it broke already last night, but anyway the Ravens are scheduled to have former Patriots former Colts tight end Dwayne Allen in for a visit today and That that initial reaction when that news first broke I was like Ravens Ravens Interested in Dwayne Allen interested in the tight end For what? Why? We got Mark Andrews. We got Hayden Hurst What we needed Dwayne Allen for and Then took a look at the numbers He had last season. He had about I think were three catches for like 27 yards something like that Mike hmm, okay Well, it could be cheap, but why would we need him? But I wasn't thinking the entire thing through I did not think that he was going to be a starter here Oh, no, no, no, that's that's Mark Andrews to hold that down but with Dwayne Allen and There was some Ravens fans that brought it up They said well with Max Williams being gone With Nick Boyle being gone both of them to getting ready to be on up out of here And it's not a kick out. It's just they're free agents.  He ain't no game breaker he ain't got no breakaway speed and Coaching might get a little frustrated with him trying to hop over everybody like a rabbit But he can catch and he's a good blocker and that's What the Ravens are looking at here a Blocker that See now we again This is going to be the most cap space that the Ravens have had in a long time and even though it's still not that much It is still gonna be the most they had in a long time with their starting quarterback on his rookie deal See remember when um when Joe Flacco was on his rookie deal remember how the teams used to be y'all remember that oh Man like those the last two years that he was on his rookie deal old out those were the best Those were the best those teams were stacked. They had depth. Oh Man, it was crazy man. The last two did the last two years of his rookie deal 2011 2012 They they built some teams man and even the years prior to that too. They have been building some teams but now we get to see if the Ravens or we get to see how the Ravens do that and This could be a start This could be a start Ravens are the first team that Dwayne Allen will be visiting with After being released by the Patriots now, it's funny because why it's almost been a year it's almost been a year since we would do all the free agent car videos and Like we said about John Brown when he visited Michael Crabtree Sneed was a little different because that was an offer sheet type of thing so that wasn't really that wasn't really the normal free agent visit, but How it has been and we talked about in the past two guys like Mike Wallace Eric Wettel Steve Smith, Sr. It's been plenty of if if the Ravens Think Jeremy Macklin was like he was the only one but he ended up coming back in signing Because with the Ravens if It is somebody that they truly want If it's somebody that they truly want though those people don't leave without a deal 9.9 times out of 10 They do not leave without a deal If it's somebody that the Ravens really want and they'll have other visits lined up We've seen it so just because Dwayne Allen he got visits lined up with the the bills and Think the Vikings and off I forgot the other two teams after the bills But just because maybe it's the job forgot who but just because they have visits lined up does not mean That they're going to make it to those visits Now I wouldn't be opposed to us signing Dwayne Allen. I wouldn't be I'm not like oh, yeah, Dwayne Allen Let's get it. It's a good blocking Titan. So, okay, that was cool I'm I'm neutral about it a lot of I guess I'm kind of neutral about a lot of these free agents so far But I'm neutral about this one So it's just a we'll see how it goes. We'll see what happens But it's not like He's they would be trying to sign him to have some primary role as a primary Titan. No No, he is what 29 years old I think So it's depth It's depth So you need a Titan to come help block sure You need a you need a Titan to come help relieve the other Titans Sure Is he your starter? No, has he started before? Yeah, is he capable of starting? Yeah He doesn't start it plenty before But now his role is that of a supporting cast member I mean, he was just backing up Grunkowski. He was on the Super Bowl.  It wouldn't be a sexy signing. It wouldn't be like, oh man, let's get it. We got Dwayne Allen, baby Yeah, it wouldn't be anything like that, but it will be something where It's like, okay, this is good for depth Because again We'll have some more a little more flexibility this year Then we're used to having and of course, it's not all because of the Joe Flacco numbers That's a piece of the puzzle But there's still more pieces of the puzzle that have to get both put in and cut out So we're gonna be seeing how everything works out With Dwayne Allen, uh I I wouldn't expect much of him Not I'm not saying he doesn't have anything left in the tank. I'm sure he does But it's again, it's not one of those signings where it's like, oh, yeah All right, this guy he got to put up 30 catches 500 yards four touchdowns That would be pretty good for a backup for actually a backup backup Because I feel like like Mark Andrews and Hayden Hurst. They're gonna be kind of like a one A or one B um, and then Dwayne Allen if if they do end up signing him he would be that second guy or second third guy, whatever but Yeah, I don't uh, if they do end up making this deal I don't expect anything of them. It is very interesting that the Ravens are the first ones to get the visit They're the first ones to get the visit So that that bodes well for them If this is somebody who they want and I think it could definitely be somebody who they want because he officially cleared waivers and Raven pounced They pounced They pounced right away. So that kind of indicates what type of what what level of interest they have At the fact that they boom soon as he cleared waivers boom Ravens is the first the first visit that he makes So in order to be that first visit One is either first come first serve thing or two is the thing where you Your people talk to his people And your people made something or told him something Told his people something so enticing and so interesting and so Something that just made made them gravitate towards uh visiting with you first Either way whatever scenario it is whether it was a first come first serve thing Or it's just that they told him something or they let his people know something like hey, this is why you need to come visit over here That that says a lot about the Ravens level of interest And another thing too it possibly says a lot about Dwayne Allen's level of interest in the Ravens Because again, he's a free agent It's not like he would be being forced to come to Baltimore It wouldn't be like his his hand was being forced and um and having to come to Baltimore This ain't no it ain't him being signed to a Transition tag or anything like that where his former team is allowing him to negotiate with other teams so he can get away from them But no He he is free to go wherever he chooses so This could indicate both his both his level of interest in Baltimore, but I think more so Baltimore's level of interest in him We'll see what happens if they do ended up signing them Okay, cool nice depth if they don't okay cool Still looking for more tight ends I know somebody I forgot exactly who it was my apologies. They said they they didn't like this because um They said they felt that the Ravens should just draft the tight end like in the fifth or sixth round or whatever And that's still an option. That's still an option But you know how Ravens y'all have who have been Ravens fans for a little while You know Ravens going into the draft They don't really like drafting for need They like drafting That bpa that best player available To them I know to a lot of y'all draft heads out there Y'all get frustrated because the Ravens don't really draft the best player available They showed that last year in the first round early But because the Hayden Hurst was definitely that was neat that was neat The Mark Jackson that was a little bit of both um both need and Just depth Because he wasn't supposed to start last year He wasn't supposed to but he ended up doing it in To the bright future Hayden Hurst now with no screws in his feet Then Mark Andrews why just just the way that last season worked out Orlando brown jr. Supposed to be a first round pick combine sucked so he dropped and we got him Played like a first rounder And the thing about Orlando brown jr. I mean, I know he gave up He gave up his first sack at the very worst possible time that he could have given it up On our very last offensive player of the season In the playoff game where he let the charges player run right past and boom Bumble game over on what could have been a game winning draft but we'll never know um, but It's just crazy how how things worked out especially with our rookies With our rookies so again Um, and I talked about this in other videos too.  Well, Gus Edwards was undrafted, but it's still a rookie um Bozeman the center even though he got he had to move around a little bit on the offensive line And when he was at center he got pushed around um Kenny young Kenny young had to come do his thing Uh, and he obviously Kenny young Kenny young obviously showed some stuff to us because Kenny young has been the buzz of a lot of talk this off season. Of course with the whole cj mosey thing so And for those of y'all that watch college and y'all know about Kenny young in college Y'all seen plenty of him already, but for a lot of people who don't watch college Um, well myself, uh, for what you've seen from Kenny young You've gotten a small sample size but Not the entire thing But from that sample size that you've gotten You want to see that entire thing So we'll see what happens with cj mosey and um and the ravens again with that too It's with the ravens and their own guys who they want It's it's the same thing It's the same thing as a free agent who they want So because a lot of y'all like freaking out right now about cj mosey. Oh, what's gonna happen with cj mosey?  I don't want him to go. I don't want him to live with cj mosey if If the ravens want to keep cj mosey The ravens will keep cj mosey If you're ravens fan, are you freaking out that he's gonna go? If the ravens want to keep cj mosey, they will keep cj mosey, but If the ravens do not want to keep cj mosey Then he'll be gone I know it sounds so straightforward, but that's exactly what it is If they want him they will they've done this time after time after time after time after time It happened with flat and and they won't franchise tag the guys They'd franchise tag sucks back in the day. Did they franchise tag Ray Rice too? I don't think so.  Oh man, what's gonna happen to us? Oh, they re-signed them. Okay. They got It's happened with Ray Rice.  Boom. They got it done Joe Flacco, oh man, we just want to see what ball man. We're already gonna get a deal done with Joe Flacco I don't know if they're gonna be able to do it. Boom. They got it done Oh man, Ray Lewis, he said he was gonna he's gonna go play for Dallas So he's what interested in Denver? What's gonna happen? What's gonna happen? What's gonna they got it done? So You see my point If they want to keep you They won't keep you And if they don't want to keep you look at Ed Reid different situations Ed Reid was obviously an older player, but still it was better than anything we've ever had a safety before and after But he they didn't want to keep him They let him go So again to any Ravens fans that's freaking out don't Because if they want to keep CJ Mosey, they will keep him But if they don't He'll be gone In the same way with free agency if they want somebody and that person visits 9.9 times out of 10, they don't leave without a deal We'll see today if Dwayne Allen is another one of those people And I'll let you know team keep it clean. I love y'all make sure y'all check out the merch We out


Hey guys, I'm going to be going over the Functions Lab 1, question 6 right now. This is the bus under the rainbow question, so we should get an output that looks something like this. It doesn't have to be exact, but we'll try to get as close as we can. And as you see the bus just kind of runs through the screen, and once it hits the ending it's completely out of the screen, it comes up on the other end. So let's get started with this one. So we'll start with our void setup and our void draw. We will make the size, I'll make the size a bit bigger, because I kind of like to have a big picture when I'm drawing, and then we'll come into here, and we'll make our background color 255. So the first thing that I think we should do is look at drawing the rainbow, since that's just a static part of the image, so that will probably be the easiest thing to start out with. So I'm going to create a new function to draw the rainbow. Again, there are a couple different ways that you can code this question, heaps of different algorithms that you could be using. This is just the one that I think is easiest, and that kind of makes the most sense to me, but if your code works it's totally fine. So for this one, when I saw the output, I kind of saw parts of a circle. So when I first did this, I kind of just drew different size circles, and each circle had a different stroke, and just had a really, really thick stroke, and then the center of it was white. So that's kind of how I saw the first circle was here, and it went to the edge of the screen, and then we did do the orange circle, and then the yellow circle, and they all just kind of overlap onto each other until we get this purple circle, and the center of it is white, so that's how we get the same, or we get back to our original background color. So we'll start with doing that. So I think the first thing we need to do is determine the colors, and there's actually this really great variable type that's called color that we can try using. So I'm just going to go ahead and start creating the color variables. So a color variable takes, it starts with this color, so same as like an integer Boolean, float anything like that. You start with the type, which is a color, and then you give it the name. So we'll give the first one the name C1, and this will be our outer red, and then you just put in your RGB values into it. So we'll specify that this is our red, and then we'll make another color that'll be our orange, and I don't exactly know the code for orange, so we will just come into here and we'll select a nice orange color. We'll do a nice bright one, so we've got 3255, 207, and 33, and we'll just do this for all of our colors. So we'll come into here and get a nice yellow. So some of these we already know just because of RGB values, some of them we need to actually go in and figure out, so we'll get a nice purple color, and we'll do the last one like a pink. So now we can create one more color variable C, which is going to represent what we'll insert into the fill function for when we actually draw the circle, so we can get rid of that now. So now I think the easiest way to go through and draw our ellipses is just with a for-loop.  So we'll create our new variable I started at zero, so once I is less than seven because we're going to have seven different colors, and then I plus plus. So now in here, first we have to determine what color we're on. So this is just going to be, let's say determining the colors here, so this is just going to be a bunch of if statements really. We'll say if is equal equal to zero, then C is going to equal C1. We'll say else if is equal equal to one, then C is going to equal C2. We'll just copy and paste this to kind of speed things up a bit, so we'll have one, two, three, four, five, six, seven. So we'll say we've got zero, one, two. For this last one, it will just be an else statement, so if i is in zero through six, it must be seven. So we'll just put in our last six, seven, I see here. So this is our last else statement. So now determining what part of the for-loop we're on, we'll just make that stroke. We're going to take our variable C, we're going to put in whatever color we want it to be, and then we'll make C our stroke, for our stroke weight, I'm actually going to create a new variable depending on the width of our screen, so we'll just call it stroke w, get an integer, we're going to equal it to, we'll say, width over 10. So this is allowing it, so if we change the width of the screen, then it'll still work. So now we're going to come back down here, we're going to say the stroke weight is stroke w, and stroke w can be a local variable because we don't really need it anywhere else in the code, so we can just keep it within, we can keep it within this function. So now we'll say no fill, because we want the background color to show through once we get to the purple, and then we're going to draw our lips, and we want the center of the lips to be in the bottom right corner. So we're going to put the x and the y values at width and height, and then here I'm also going to create another variable for the diameter, I'm going to get an integer, and I'm going to equal it to the width times 2, because we know that we want the radius of it to be the length of the screen, so to get that full diameter we need to multiply that by 2, and again that can be a local variable because we don't need it anywhere else in the code. And once we draw that ellipse, so we'll go through, we'll draw the red, we'll put that in, and then we have to decrease our diameter. So we're going to subtract the diameter, the stroke times 2, so that's going to get it so the diameter is decreasing enough so that the entire stroke for each circle can be seen when we draw our new circle. So we've created this rainbow function, we can test it and make sure everything looks okay up here in our draw, so we know that for every frame we're going to need the rainbow to be redrawn, so we'll just call rainbow. And rainbow doesn't need any inputs, because it's just going to stay the same every single time. So we can run this and we get our rainbow. So you can go through and now you know, you can clearly see in your function if you want any of the colors changed, it's really easy to see what color is going where, it's really easy in here to see where the color of the ellipse is actually being set, and then you can clearly see each circle being drawn. So you could actually shorten this up a bit if you wanted to go off on your own, and you could probably use compound data for this and make an array with each color and then setting each color. So in here you can take away this massive if else statement and you can just say the array at i and then it'll access that specific color. So you'll still have to go through and declare what each position of the array is, but you can at least get rid of this if statement. So that's something that you can try on your own time. All right, so now that we've got our rainbow drawn, the next thing we'll need is to draw the bus. So just come down here and it's not going to return anything. So we're just going to say void for the time being we won't give it any inputs. So for this one, we will start by just simply drawing the bus. So we won't worry about the movement for the time being. So we know that first we're going to need a rectangle and I'm going to put the right mode in the center and then we'll draw our right. And I'm going to specify a specific X position for our right because we know that later that exposition is going to need to move. So we do need to create a variable for it. So I'm going to make this input bus X and then we're going to come into here and we know that the X is going to be at bus X, the Y position. We want the bus down at the bottom. So we're going to go all the way down to the height and then we're going to subtract whatever our bus height is. So I'm going to come up here and create a new variable for the bus height and we'll call it like height over 10. So now for that Y position, I'm down at the bottom of the screen at the moment and then I got to bump it up a little bit. So I know I got to bump it up the bus height over two. And we're saying over two because we specified that that point is going to be drawn at the center. I'm going to create a new for the width. I'll create a new integer bus width and we'll call it how long did I make the bus before? Let me just double check my numbers. We'll call it with the number five. And some of this I just kind of figured out and calculated before. So we don't have to waste time guessing and checking. But when you guys do this, you can just go through and kind of guess it and check and see how it goes. Once we can actually come in here and just say bus width and then we already have a height. So we'll just say bus height. So now we can we'll go in and we'll just put in some simple filling it with zero. And now we can check this. So we used to come back up to the drone. We've to actually call it. We call it bus. We need an X position. So we'll just put it at the middle of the screen for the moment to see what it looks like. So we've got the body of the bus. So now we'll draw the wheels. We know that we're going to have to bump up the body of the bus a bit so we can actually see the wheels, but we'll do that in a minute. So we know that we're going to need two ellipse functions for the X position and the Y position. We know it's going to be the bus X that we're giving because the wheels need to move. The wheels need to move with the bus. So we're going to use this bus X. But then we know we need to push it back a little bit and push it up a little bit so that the wheels are actually separated and not in the middle of the bus. So subtracted by the bus width over four. We'll just do that for the second wheel as well. But we'll add that one. And then we know the Y position. We have to do the same as what we did with the bus body. We need to go down to the bottom of the screen and then bump it up from there because we want the bus to be along the bottom. So we'll call our height for both of these. And then we're going to subtract some number from it to bump it up a bit.  And we'll say that the radius of the wheel is like the bus width divided by six because we want the diameter of the wheel to be about a third of the bus. So we want that radius to be divided by six. So now we can come in here and we know that we're going to have to subtract the wheel radius from the height to get it up above the bottom of the screen. And then we'll come up here and then we know that the length and the height of the ellipse is going to just be the wheel radius times two. We have to do this twice so we can just copy and paste this. Now we can check how we've done. Now we see we don't even see the wheels because we only have the body of the bus bumped up just enough so you can see it on the screen. So now we've got to bump it up a little more. So here we need to look at the Y position. And along with the height of the bus, we need to also add the wheel radius. Now when we run this, we can see the two wheels and we can see the body of the bus. So this is good enough of a bus for me. If you want to go through and add some more stuff, absolutely go for it. But just recapping what we have so far. So we created these local variables, the bus height, the bus width and the wheel radius within our function. And this allows us to use these within our function. So if I were to want to change the size of the bus, I can easily do so right in here. And instead of having in here to say like height over 10, width over 10, having hard coded numbers, anything like that, we can clearly see that, OK, this is the bus height. And we can clearly see this is the bus width. So we've got those local variables there for us to use. And then we've also got this input here, bus X, that is later going to be a global variable because we know we're going to have to control the movement of the bus as we keep drawing the code. So we're going to, when we call bus, we need to put in our bus X position so that we can later control that movement. So now let's go in and we will work on actually controlling that movement. So we know that if we want to animate anything, we need to do it up here and draw. So we will just create a new global integer and we'll call it the X POS. And we're going to set it equal to the width because we want the bus to start over at the right side of the screen. And then we want it to move through the screen going left. So we'll set it equal to width. And we should actually probably do that in set up. So we'll do that down here and set up. All right, and then we can come in here and we can put our X POS into here. So now it's no longer hard coded. And then we can just update our X POS. Oh, I'm sorry. We'll have to subtract it because we're going through the screen left. If we were going right, then we could add one. But since we're going left, we'll have to subtract one. Now we can try this out, make sure it works and it does. So the last thing that we'll need to do is just make sure that once it hits this edge of the screen, it's going to come back up on the other side of the screen and restart the animation. So now for this, we'll just have a statement. We'll just say if the X POS is less than or equal to the, we'll say zero, because once it gets to the left of the screen, then we want it to restart. We'll say then the X POS is equal to the width again. So we can run this and try it out. So you'll see that the one issue that we get with this is because our X POS is at the center of the bus, it's going to jump and once it hits the center of the bus, it'll pop back over instead of cleanly going through the animation. So for this, I'm going to create another local variable because we need to keep track of the length of the bus so that we know once the entire length of the bus is off the screen, then we can start it over. So I create a new local variable. So that's the bus length and we can come back down here. And before we made this bus length or the bus width a local variable, but now that we need to use it in other parts of our code, we're going to make it a global variable. So before we know, we set it to width over five. So we'll just put that into here and then we can come down here and we're going to take this out as a local variable and now we need to use it as a global variable. So instead of having it in here, we're going to put it in here as an input. So now we need to come up and adjust where we call bus. So we've got the X-Pause in here, but now we also need to add the bus length. So now we can change the length of our bus if we wanted to. And when we run our code, we'll still be able to know, okay, once it goes fully out of the screen, then restart. So now we just have to come into here and adjust our X-Pause. So instead of being at zero, we're going to say at the bus length and we're going to make it over two because our rect mode, the position we were keeping track of for the bus was at the center of the bus. So we don't need the entire bus length, we just need half the bus length and we need this to be the negative value. All right, and then we don't want it to start again at the width. We want it to start at the width and then we want to scooch it over enough so it doesn't come into the screen when the animation restarts. So we're going to add that bus length over two. So I think we fixed everything. We'll just run this now and make sure this works. So our bus still looks good. The length of it still looks like how it should. And we'll just check that it restarts and it does. So now, because we've added in that global variable of the length of the bus, we know that it's not going to restart until it completely gets out of the screen. So if we were to keep that variable as a local variable here in our bus function, then we wouldn't be able to access it anywhere else to be able to see how long is our bus. So that's why we moved that into a local variable. So just keep recapping what we've done is we've created a couple of different functions here. We've created this rainbow function that keeps track of or just draws the static rainbow force in the background. And you can get creative with this. You can take it a step further and put, as we talked about before, all of these color variables in an array and then you can access them in this for loop so that we could take away this if statement or these multiple if statements. And then we drew the rainbow down here.  And then we also have our bus function. And this includes these global variables of the X position so we can control the movement of the bus across the screen as well as the length of the bus. So we know once the bus gets out of the screen we can restart it. And we know that it's gonna be accurate and that it's gonna work because we've used this global variable and we've written this if statement here and put it back into the right position when we want it to restart. And then we've got our bus function down here that just draws our bus and we were able to kind of calculate where everything was. If you had any issues with any of the rectangle or the ellipse functions or like if you had issues understanding where we put the wheels and where we put the body of the bus just draw it out on a piece of paper and kind of go off of this code and write down how many pixels it is and what's happening and do these calculations so you fully understand what's going on. And then in here we've introduced some local variables to help kind of just make the code a bit more organized and so that we can understand it a bit better as well as we've got these inputs that were coming from our global variables. So hopefully this helped guys, trying it more creative with it, see how you can maybe make it a bit more understandable or how you maybe can improve the algorithm for it, maybe add in some fun features. But the best practice that you're ever gonna get is just going off and doing some fun things on your own. So hopefully this helped.


Welcome into the Fandall hurry up. I'm Ariel Epstein with sports grid. I'm joined now by number fires Jim Sonnis Jim I hope that you had a great Thanksgiving. I can't believe we're already here in week 13 of the NFL season Yeah, always ready for some more football It was a pretty fun week 12 because we had a lot of big performances and like those are always exciting because you know If you have those guys you get to kind of sweat the entire day knowing you may have You know bullets lots of fire and stuff like that. So it was a fun week 12 Thanksgiving Slate It's always exciting and I think we've got some guys to be excited about for the stretch front, too So I'm in a good mood here. How are you doing? I'm really excited to get your thoughts going into this week 13 slate I want to start with a running back that didn't really look like a running back this past week Austin Eckler the Chargers running back led the Chargers with 85 receiving yards coming off of nearly eight weeks Where he was off with an injury Jim. Why do you like Eckler going into the week? Yeah, I think with Austin Eckler It was easy to be excited about in the begin with because in his absence the Chargers running backs really struggled They churned through Joshua Kelly, Justin Jackson, Kailin Balazs, Tremaine Pope They tried all these guys see if anyone could take on that man who was being the team's lead back and no one took advantage But Austin Eckler came back and despite not having played like he said for two months came back into a full role He had 14 carries in addition to those 16 targets and he's not gonna get 16 targets every week But even if you cut those targets in half 14 carries and eight targets is still a tremendous workload for a running back And that's the workload of a guy who could have a salary of like $9,000 on Fandula that is how good that role was on Sunday if he were to duplicate that it'd be like 10,000 But like if we're projecting forward realistically, he's playing like a $9,000 running back So the floor for Austin Eckler is amazing because of that the yardage should be really good weekend week out You want that for sure But I think that he also has a path to a ceiling and that's always the concern with that girl At least it was earlier this year because Joshua Kelly was taking away goal line duties And Joshua Kelly scored again on Sunday and a short touchdown We should expect that going forward to Joshua Kelly is going to vulture Austin Eckler in fantasy football this year But Eckler almost scored on Sunday. He was a half yard short He had two carries and two targets inside the ten yard line Yet 36% of the teams carries or targets inside the red zone So no, he did not score and yes He will still lose some goal line touches to Joshua Kelly But Eckler can score because he's good and because he still gets chances in clothes So I am really high on Austin Eckler going forward because he is a Featured back on a team that is being led by an efficient quarterback right now in Justin Herbert And that's really hard to find at this point in the year with guys like Christian McCaffrey Saquon Barclay Zeke Elliott not being what they were last year So I say Austin Eckler is someone you want to buy high on because that role is amazing This team is not too bad offensively and I'd expect that pass-catching role to stick So Austin Eckler sure it feels kind of pointy easy to go back to him But I don't care the building blocks for him to be a Just pure featured back are there and I'm gonna take advantage while we have that at our disposal It helps too when all the other running backs in this backfields were essentially getting tried out and none of them prevailed Up to Austin Eckler status as he was out with that hamstring injury Let's take a look at another running back Antonio Gibson of the Washington football team the NFC East leading Washington football team This past week over a hundred yards rushing for Gibson. How do you think that Gibson continues these ways going into week 13? Yeah, I know that Antonio Gibson has been doing good stuff for a long time now But we did still see a role change for him on Sunday because he got a lot more Just touches a lot more opportunities than he has in the past specifically in the passing game He had seven targets in addition to his 20 carries in week 12 That was on a 65% snap rate which tied his season high And so I think that when you add the number of targets He got with the carries in the snap rate. This is the best workload We've seen Antonio Gibson get the entire year. That's a good thing That's a bump up for his floor The ceiling was already there for Gibson because he was getting a lot of red zone work for this Washington offense He has 31% of the teams carries or targets in the red zone from week two on and we saw him score three times on Sunday Or on Thursday So we know that he can do these things on a pretty regular basis the other thing that it's that's fun for Washington Like you mentioned they are in contention like they are Pushing for a playoff spot somehow and the NFC East and when you're in that situation You're gonna ride your best players and Antonio Gibson Outside of Terry McClurin is their best player So I think it makes a lot of sense for Washington to continue to make Antonio Gibson the focal point in this backfield And that's gonna lead to a lot of volume And if we see volume similar to what he got on Thursday He's gonna be a guy we can use despite the fact his offense is not that good now Things could be kind of roughed in week 13 They do face the Pittsburgh Steelers there, but after that it could be you know Rocket ship emojis for Antonio Gibson if he keeps on getting a workload like this And I see no reason to expect that to change so Antonio Gibson a great game on Thursday And a lot of reasons expect to a lot of reason to expect similar stuff for him going forward after that Steelers matchup Especially going up against the Steelers team who We would think is going to play the Baltimore Raven So maybe you get a little bit of a hangover from all of this COVID craziness going on in Pittsburgh The San Francisco 49ers are coming off an upset win over the Los Angeles Rams They got healthy their wide receiver Debo Samuel is back from a hamstring injury Samuel 133 receiving yards against the Rams Jim.  Yeah Debo Samuel I think is intriguing because we want wide receivers who get rush attempts and that may sound really stupid But like it's valuable because not because just because they can score points on those rush attempts But also because it tells us the team wants the ball in their hands and they got the ball in Debo Samuel's hands a lot on Sunday he had 11 targets in that game and yeah a lot of those targets are bunny targets We're not getting a lot of downfield books. He's not gonna be Tyree kill But there's safety in those bunny targets too and with Debo It's also a different equation because he has so much after the catch ability kind of like AJ Brown where he can turn a short pass Into a long game which he's done throughout his entire career with the 49ers So I don't really care too much that he's not getting downfield books I just want the overall volume and his talent as a pass catcher as well now We will see Debo lose some looks once Brandon Iuk is back Iuk did not play on Sunday, but George Kittle isn't gonna be back here very soon So there's gonna be a lot of targets for Debo Samuel even when Iuk is back And he'll still get those rush attempts as well. That's easy to like even in an offense. That's not that great I'm not gonna expect great quarterback play for the 49ers by any means But you don't really need it when the targets that Samuel is getting are the kind that he is getting right now So I think that Samuel is the kind of receiver. I like to target. He is a guy who gets rush attempts He gets safe targets, but also has the ability to convert on those targets as well and turn a short play into a big one So Debo Samuel the focal point of this 49ers offense And I think that makes them in play for DFS even without a lot of downfield looks in his repertoire I love the rushing yards angle especially because the bills are bottom 10 in the league against the run this season Maybe you do see a big run from the wide receiver of the 49ers in Debo Samuel. Thanks so much Jim Sanis from Number Fire I'm Ariel Epstein with sports grid. We'll see you again soon right here on the Vandal hurry up