Paul I really appreciate you giving us kids that chance to see your mistakes. God Bless you Brother
@paulmcwhorter10 ай бұрын
And may God richly bless you as well.
@DanRey-j4l Жыл бұрын
Hello Paul, thank you!!. Here is another version of the code part using bin() function and arrays to simplify it: from machine import Pin from time import sleep counter=1 maxCounter=15 myBin=bin(counter+16) Pins=[12,13,14,15] led=[0,0,0,0] for i in range(0,4): led[i]=Pin(Pins[i],Pin.OUT) while True: myBin=bin(counter+16) print(myBin) for i in range(0,4): led[i].value(int(myBin[6-i])) sleep(1) if counter==maxCounter: counter=0 else: counter+=1
@samhutchison863325 күн бұрын
Nice solution. I would have gone down the route of populating an array with comma separated list
@dannycollins5698 Жыл бұрын
I didn't even think to connect the resistors directly to the ground bar. I had all mine connected to another wire. I got the homework assignment completed, but I am definitely not a legend. I will be thinking of a snazzy design and will be posting it later. Thank you sir!
@tjeanneret Жыл бұрын
Just ordered the kit, it's going to be simpler ! I appreciate your teaching, thank you.
@pdep4 ай бұрын
Once you get past the coffee addiction and junior-grades joviality, these are excellent lessons. Nothing better yet found. My sincere thanks for your work.
@paulmcwhorter4 ай бұрын
Indeed I love coffee but would not call it an addiction . . . just one of those small pleasures in life. As far as joviality, yes I do love doing these projects and showing others. Thanks for the comment, and hope you continue to enjoy the lessons.
@garagegeekguy3 ай бұрын
Paul is great - pdep ehhhhhh not so much
@keithlohmeyer Жыл бұрын
Thanks Paul! Looking forward to seeing all the homework solutions.
@temetnosce2951 Жыл бұрын
I used free place on breadboard so I connected all those four LEDs to the ground with one resistor since current is so little. At engineering point this is no good if you don't know how big your system goes. I just had this smaller breadboard and using all knowledge what Paul told us about measuring current I realized that 0,25W resistor could take it all. So I thought how this wonderful project could be even more custom made and optimized :) Thank you Paul for your insights and pushing us further (I'm watching all of your videos and participate where I have hardware). You are my favorite teacher and I will send you many blessings to continue with new wonderful projects!
@romantercero4436Ай бұрын
What is the problem of using one resistor to ground all the leds? I did the same thing.
@tjeanneret Жыл бұрын
Just got my kit, it's more interesting than I thought. Well packed, cleverly chosen components, good price, it's a bargain ! Thanks Paul ;-D
@warrenscorner Жыл бұрын
I am legend! I actually had a project similar to this at work. My controller is an Allen Bradley PLC but I also used a Nanotec Stepper motor and drive. The drive is programmed in C++. I used 4 outputs from the PLC and wired them to the inputs of the drive. If all of the outputs are off the stepper is at 0 degrees. Output 1 on is position 1, output 2 on position 2 and so forth. The machine drills holes in catheters. There are four different parts with two sets of holes. So I needed 8 positions.
@anupampal2950 Жыл бұрын
Hi Paul, Thanks for your awesome video tutorials. I feel so good to see you excited after you get a desired output. For long tome, I am disconnected with Embedded field. Somehow, KZbin suggested me your video. I have enjoyed many video of yours. I haven't tried it. But, how about : 1. Take decimal number 0. 2. Convert it to binary, and feed it to the ckt. 3. Increment the decimal number. 4. put 1, 2 and 3 into an infinite loop. ?? That would be feasible even if you take 8-bits or higher.
@Mellie45 Жыл бұрын
Man thanks you so much for these tutorials, you helped me even back in the Arduino tutorials, Thank you for everything.
@parshvapatel8484 Жыл бұрын
BTW I love your explanation on binary numbers .
@alexsanchez-kk3ci8 ай бұрын
thank you so much for these videos. learning so much as a beginner.
@adegboyekehinde25094 ай бұрын
I was successful in the homework. I did from 1-10
@romantercero4436Ай бұрын
Good times! Feeling pretty proud of this one: from machine import Pin from time import sleep myLED1 = Pin(0,Pin.OUT) myLED2 = Pin(1,Pin.OUT) myLED3 = Pin(2,Pin.OUT) myLED4 = Pin(3,Pin.OUT) def set_gpio_to_zero(pin_count): for y in range(pin_count): for x in range(pin_count): myLED = Pin(x,Pin.OUT) myLED.value(0) sleep(0.1) def dec_to_binary(dec): bin_code = bin(dec)[2:] padding = (4-len(bin_code)%4)%4 return '0'*padding + bin_code for y in range(16): myLED1.value(int(dec_to_binary(y)[0])) myLED2.value(int(dec_to_binary(y)[1])) myLED3.value(int(dec_to_binary(y)[2])) myLED4.value(int(dec_to_binary(y)[3])) print(f"{y}:{dec_to_binary(y)[0]} {dec_to_binary(y)[1]} {dec_to_binary(y)[2]} {dec_to_binary(y)[3]}") sleep(.3) set_gpio_to_zero(4)
@BertRichard-k6m4 ай бұрын
This is what I came up with after lesson 3. Thanks for the great videos! from machine import Pin from time import sleep LED1 = Pin(0, Pin.OUT) LED2 = Pin(1, Pin.OUT) LED4 = Pin(2, Pin.OUT) LED8 = Pin(3, Pin.OUT) while True: for x in range(16): LED1.value(x & 1) LED2.value((x >> 1) & 1) LED4.value((x >> 2) & 1) LED8.value((x >> 3) & 1) sleep(.5)
@MorrWorm811 ай бұрын
ok, im completely though lesson 4. I have an odd question or maybe a dumb question. in the code I was working on the knight rider project for my homework, and I was looking at the "from" machine and the "from" time and the "import". my question. is there a way to view the list of all the "from" list? or import list? say there are 1,800 from commands that can be used. how do I view that list of available commands for "from"? i.e. I have 'machine' and 'time' so far.
@MorrWorm811 ай бұрын
I tried using the ol google thing but everything I have found is basically a link to teach you how to code. so any resource or point in the right direction is what im looking for. thanks in advance.
@jojomaritessdelrosario24343 ай бұрын
boom!!!nicenice place you got there
@iTeedo12 күн бұрын
3:30 technically the row of ground isnt fully connected unless you bridge the middle piece to the other rail.
@paulmcwhorter12 күн бұрын
It depends on the board. The boards in the sunfounder kit, and most boards for that matter, the ground and power rail go across the entire row.
@antoniomuntaner811124 күн бұрын
Could I use a variable instead a constant in the value parameter?. In this case I could simplify the code working with array.
@Ravensheart20002 ай бұрын
I am confused but I think I get the answer. In all the other videos I watch they put the resistor on the postive side of the circuit. You put it on the negative. So in reading I have concluded that the resistor restricts the flow of all electricity because it acts as a restrictor plate not a filter, thus the flow is reduced on both sides of the circuit?
@chrisgosling5408 Жыл бұрын
Great to see you looking so well Paul, at this present time I think I should be watching some of your faith videos! Great to see the Pico series I shall studies these although there is a reluctance as I find it just confuses Arduino IDE language with the python based largely on syntax translations. The Pico is great because it is so cheap with 12 bit ADC resolution as standard which for analogue world applications is great and good enough for most real world stuff. 16 bit would be a luxury but noise becomes an issue. The other really great thing is that Arduino run a Nano with the 12 Bit ARM chip from the Pico onboard. It cost a bit more but you can run it via the Arduino IDE in the regular code thanks to a project by Earle Philhower. While the rest of the world seems in dissarray the world of microcontrollers has never been more exciting! Keep up the good work Paul it is appreciated by a great many!
@paulmcwhorter Жыл бұрын
Please do watch the faith based series. Those are the topics of utmost importance.
@chrisgosling5408 Жыл бұрын
@@paulmcwhorter many thanks! best regards Chris
@twoface11924 ай бұрын
What happens if the resistor is bent and you use it??
@raintardgamesalot Жыл бұрын
love the weathercam
@LanLanLan5iekh_man1810 ай бұрын
Giddyup had me dying. 🤣💀💀💀
@LanLanLan5iekh_man1810 ай бұрын
💀💀💀💀💀💀💀💀💀💀
@rassulkuatov61607 ай бұрын
I am Legend! * Double chest pump :) Thank you very much for your lessons
@paulmcwhorter7 ай бұрын
Legend!
@zbigniewloboda3393 Жыл бұрын
Great Presentation.😊
@danielsaenz5570 Жыл бұрын
Hey Paul! For the homework, are we allowed to different colored LEDs? Like Blue, Green, Red? Thanks!
@paulmcwhorter Жыл бұрын
As long as all the LED are the same color.
@danielsaenz5570 Жыл бұрын
@@paulmcwhorter Okay Paul. 👍
@charlotteswift Жыл бұрын
Here is my solution kzbin.info/www/bejne/b369eISjoMp_d6M Unfortunately the LEDs don't show up very well. And here is my video on Pico W Security in case you missed it. You might find it useful, or you might not. kzbin.info/www/bejne/jHLcoXqJlM93kNE
@ke7uia Жыл бұрын
Here is my homework for lesson 4. I wanted to place leds in a ball hat then blink them all over the place. But that was too complicated. I wanted to have a pointing explosion. I settled on a right and left row of lights. I also wanted to have a simple set of instructions. kzbin.info/www/bejne/pqSre2h-gb2BrtE
@ke7uia Жыл бұрын
I am legend
@paulmcwhorter Жыл бұрын
LEGEND!
@TheTechRancher Жыл бұрын
Paul, question. How do we know what size of resistor to use with LEDs? I bought some LEDs and don't know anything about the data. Meaning what current or voltage they are happy using. So, since I don't have this information it makes it hard to do the Ohm's Law for the resistor value.
@paulmcwhorter Жыл бұрын
Technically, you would use ohm's law. You would find what current the LED is designed to work at, and make sure to not exceed its max current limit. Then you would find the LED voltage drop in operation. Then you would find the maximum current the GPIO pins can safely supply and make sure to not exceed that. You would then use ohm's law to select a resistor that would keep the current below the max limits of the LED and the GPIO pins. Or you could use 220 ohm or 330 which will work for most circumstances.
@TheTechRancher Жыл бұрын
@@paulmcwhorter Thank you for the answer. I had a friend give me some LEDs and they look just the same as what came in the kit. I am assuming they will have the same maximum current and voltage drop as those. I used them in my homewrok assignment and I used 330 Ohm to be on the safe side.
@RajeevSahasrabudhe-xc5it Жыл бұрын
I am Legend!!! New thing I came to know is that my Bread board has two separate sections on the sides! unlike your bread board.
@yongxinlim6156 Жыл бұрын
What is the circuit simulation software u used?
@quadrishittu10354 ай бұрын
Fritzing
@bjornakeSwe Жыл бұрын
Hello Paul, as before I did my assignment, but as before I am not yet a friend with YT. The hardware bit was no problem and I solved the coding as well but I am a bit curious how you solve it because my code takes 105 lines in total. Wish I could show you.
@tjeanneret Жыл бұрын
...but I would never write the code you show ! It is so easier to use a range counter, convert the values to bin(), than make each digit correspond to a LED ;-D
@trumpone4443 Жыл бұрын
Great video.
@paulmcwhorter Жыл бұрын
Glad you enjoyed it
@ufo.architect Жыл бұрын
Thank you for teaching, The arduino r4 wifi is next?
@paulmcwhorter Жыл бұрын
Yes. The R4 are not really available yet, when they become available, that will be the next class.
@NerdFrequency Жыл бұрын
I used a function and a list of numbers. numbers = [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] def writeBinary(number): if number >= 8: eightsLED.value(1) number -= 8 else: eightsLED.value(0) if number >= 4: foursLED.value(1) number -= 4 else: foursLED.value(0) if number >= 2: twosLED.value(1) number -= 2 else: twosLED.value(0) if number >= 1: onesLED.value(1) number -= 1 else: onesLED.value(0) while True: for number in numbers: writeBinary(number) time.sleep(1)
@DanielBrambilla-h9v10 ай бұрын
"BOOOM Giddyup!" 💀💀💀
@twoface11924 ай бұрын
😂Giddy Up!
@quaternion-pi Жыл бұрын
Assignment #4: kzbin.info/www/bejne/gGOvh3Sno6l8aKc&ab_channel=Quaternion Tried to sync music with leds using hardware timer. I'm holding my breath for a series on engineering math taught by our alpha teacher - it would be bodacious.
@paulmcwhorter Жыл бұрын
Excellent work! I really would one day like to do a all in one class that taught math, Algebra 1 Through calculus all based on technology/projects. You learn all the math, but through practical fun real world problems. Just have not quiet mustered the energy to do it.
@edSabio572 Жыл бұрын
@@paulmcwhorter I wish I had had you as a teacher. This is how math should be taught. Knowing what is used for.
@BallyBoy959 ай бұрын
Love your outro. We need more engineers, and less people watching cat videos. 🤣
@danny12345 Жыл бұрын
Thank you
@Wythaneye Жыл бұрын
Throat is clear, head is clear, time to record some videos again! Here's my Lesson 3 solution: kzbin.info/www/bejne/imG5mXWlpdt7maM
@paulmcwhorter Жыл бұрын
LEGEND!
@ssyedyaseens7 ай бұрын
Code using decimal to binary converter function incase someone needs it. from machine import Pin from time import sleep four = Pin(12, Pin.OUT) three = Pin(13, Pin.OUT) two = Pin(14, Pin.OUT) one = Pin(15, Pin.OUT) lights = [four, three, two, one] def toBinary(num): if num==1: return "1" elif num==0: return "0" return toBinary(num//2) + str(num%2) def assignToLights(num): binValue = toBinary(num) while len(binValue) < 4: binValue = "0" + binValue for i in range(0, len(binValue)): lights[i].value(int(binValue[i])) count = 0 while True: if count > 15: count = 0 assignToLights(count) sleep(1) count+=1
@TimNudd0525 Жыл бұрын
I am legend! Beginner Based Homework for lesson 4: kzbin.info/www/bejne/sJmtdXZtrZyphK8 Plan to do a more advanced homework video later in the week once I finish fine tuning my creation :)
@ALRXM Жыл бұрын
Homework for lesson 4: kzbin.info/www/bejne/eoCsZ4uCj76KmdE I had great fun trying to figure out a short way to create an interesting pattern.
@paulmcwhorter Жыл бұрын
Nice work!
@jameslewellen150 Жыл бұрын
Here is the link for my homework. kzbin.info/www/bejne/kIXLkmh9i6yVo9k
@paulmcwhorter Жыл бұрын
LEGEND!
@shaggy795828 күн бұрын
For lesson 4, I added an extra LED and modified my counter from the previous lesson to implement a "bidirectional chaser". Here is the link:kzbin.info/www/bejne/Y6ucY6iFmrOdicU
@stevetalley9775 Жыл бұрын
Link to homework code video. Too large for description section on KZbin. kzbin.info/www/bejne/np_Ig3Sthtpjm9U
@parshvapatel8484 Жыл бұрын
Hi Paul can you do a shop talk on how to avoid silly mistakes in maths if possible because. I know how to solve every single question on maths exam but perform horrible due to silly mistakes.
@paulmcwhorter Жыл бұрын
The main issue is you need to practice more. You know the math but make silly mistakes because you are not practicing. Practice, practice, practice so you are working the problems almost without thinking. You have to practice to learn to work quickly and accurately
@parshvapatel8484 Жыл бұрын
@@paulmcwhorter thank you very much I will Practice Practice and Practice because I trust my Guru
better code (just give it your pin numbers): from machine import Pin from time import sleep pins = [18, 19, 20, 21] counter = 0 def control_pins(counter): binaryValue = bin(counter)[2:] binaryValue = '0' * (len(pins) - len(binaryValue)) + binaryValue for i in range(len(pins)): Pin(pins[i], Pin.OUT).value(int(binaryValue[i])) while True: control_pins(counter) sleep(0.5) counter = (counter + 1) % (2**len(pins))
@DrDave327 Жыл бұрын
Double chest bump, Paul! Here is my solution to your homework assignment.: kzbin.info/www/bejne/eX-yhGSqh7-Fm6c The camera doesn't do the colors justice, unfortunately:( Thank you for all of your efforts for us!
@paulmcwhorter Жыл бұрын
LEGEND!
@opokujoel778410 ай бұрын
Boom!!! I am legend😄
@paulmcwhorter10 ай бұрын
LEGEND!
@larryb6759 Жыл бұрын
Got it
@gonepostal63 Жыл бұрын
I am legend (mostly, it took an awfully long time to get it right)
@paulmcwhorter Жыл бұрын
LEGEND!
@Wythaneye Жыл бұрын
I am legend! Lesson 4 homework: kzbin.info/www/bejne/fGfcYX-id7Wtgck
@paulmcwhorter Жыл бұрын
Excellent
@bigbogeyface Жыл бұрын
Here's my homework: kzbin.info/www/bejne/iXTCdIVnn9-kfsU 🙂
@paulmcwhorter Жыл бұрын
Spectacular!
@bigbogeyface Жыл бұрын
@@paulmcwhorter Thank you 😊 🙏
@danielsaenz5570 Жыл бұрын
Here's my homework solution: kzbin.info/www/bejne/naq0Zqmbd6lsgMk A little late! :)
@paulmcwhorter Жыл бұрын
LEGEND!
@stevetalley9775 Жыл бұрын
Link to homework: kzbin.info/www/bejne/fqS2damMe5V2pdU
@paulmcwhorter Жыл бұрын
LEGEND!
@WilliamBurlingame Жыл бұрын
My Lesson 3 homework: kzbin.info/www/bejne/iKCXfqabh7erpq8
@paulmcwhorter Жыл бұрын
LEGEND!
@MooneyManMr10 күн бұрын
I am legend! (but I think there must be a more elegant way to achieve this!)
@paulmcwhorter9 күн бұрын
LEGEND!
@peterbush3972 Жыл бұрын
I am legend!!
@kevinshaver5613 Жыл бұрын
I am legend!
@paulmcwhorter Жыл бұрын
LEGEND!
@arlo4051 Жыл бұрын
This doesn't really fall into this category except for the blinkey Led's (all blue because it's what I had) Might be better on the Raspberry Pi lesson because using Pi 4 with PCA9685 servo driver and Bullseye operating system. kzbin.info/www/bejne/l3vGXo2Oq56bqas
@paulmcwhorter Жыл бұрын
Amazing!
@rassulkuatov61607 ай бұрын
The homework: kzbin.info/www/bejne/hmKknmVtmbuaqassi=0n3_8jO-4_FgnYy2 Thank you very much! The solution is pretty simple,but I enjoyed it and very thankful to you!
@paulmcwhorter7 ай бұрын
LEGEND!
@lorisrobots Жыл бұрын
Thanks Paul! I had this project in the works after we did the binary counter but I think it meets the intent of the HW. It seems a natural next project - thanks to @bigbogeyface for giving me this project idea. kzbin.info/www/bejne/d6vZY4aPpNqCpcU
@charlotteswift Жыл бұрын
Hi Paul & Guys. I won't be joining you for live chat on this lesson because it's Valentine's Day and I have plans💘Hurrah!!!!
Thanks Paul! I am using arrays to program the patterns like the old school of c / c++, and Visual Basic. We used to have header or ini files... pattern1=[03,06,12,24,12,06,06,06, 12,24,12,06,03,06,12,24, 12,06,03,06,12,24,12,06, 03,06,12,24,12,06,03,06] >>> %Run -c $EDITOR_CONTENT Ox% 0 0 0 1 1 Ox% 0 0 1 1 0 Ox% 0 1 1 0 0 Ox% 1 1 0 0 0 . Ox% 0 0 0 1 1 Ox% 0 0 1 1 0
@LetsCalculateSomething Жыл бұрын
Here is my solution: kzbin.info/www/bejne/anOcc4Z-iJeib80 Thanks Paul. Learned to use Sequences and random numbers in Python!
@tripleyt6122 Жыл бұрын
Can we connect the Rasberri Pi pico to camera , we can do that and can we use opencv moduel to perform the comuter vision tasks if we can do that make a viedo on it becuase it's cheap rasberri pi is cheap and if we can use it's capabilities to Max we can be like ICE COLD COFFE Awesom!!!!!
@xprmntlav8r Жыл бұрын
Here's my attempt at homework #4. kzbin.info/www/bejne/aXrIqHeodqpqedE Here's the code: from machine import Pin from time import sleep pinNum=[Pin(14,Pin.OUT),Pin(15,Pin.OUT),Pin(16,Pin.OUT),Pin(17,Pin.OUT),Pin(18,Pin.OUT)] #create an array of pins. delay= .05 def chaseCCW(delay): for n in range(5): pinNum[n].value(1) sleep(delay) pinNum[n].value(0) sleep(delay) def chaseCW(delay): for n in range(4,-1,-1): pinNum[n].value(1) sleep(delay) pinNum[n].value(0) sleep(delay) while True: for x in range(4): chaseCCW(delay) for x in range(4): chaseCW(delay) for x in range(4): chaseCCW(delay) chaseCW(delay) sleep(1)
@paulmcwhorter Жыл бұрын
LEGEND!
@-GrimEngineer-1337Ай бұрын
My Solution: from machine import Pin from time import sleep led1=Pin(12,Pin.OUT) led2=Pin(13,Pin.OUT) led3=Pin(14,Pin.OUT) led4=Pin(15,Pin.OUT) i=0 while True: if i & 1==1: led1.value(1) else: led1.value(0) if i & 2==2: led2.value(1) else: led2.value(0) if i & 4==4: led3.value(1) else: led3.value(0) if i & 8==8: led4.value(1) else: led4.value(0) sleep(.5) i+=1 if i==16: i=0
@kev67uk Жыл бұрын
Another great lesson, thanks Paul, and here's my homework for this week: kzbin.info/www/bejne/mXjKda2MqdWjl7M It took slightly longer than usual as I ended up watching a few episodes of Knight Rider - for research of course! (and to bring back memories of my childhood 😁).
@paulmcwhorter Жыл бұрын
LEGEND!
@snowman58able Жыл бұрын
I am legend, however instead of repeating all 4 leds for each count I only put in the led that change.
@davidh11879 ай бұрын
MicroPython version of the Knight Rider Chaser in a format that KZbins doesn't default to shorts.... kzbin.info/www/bejne/bpW2koKhf8iahbM
@paulmcwhorter9 ай бұрын
LEGEND!
@TheTechRancher Жыл бұрын
Homework finished. Here is my link: kzbin.info/www/bejne/d5a4Z6F_eNZ_g7s Thank you @paulmcwhorter for all your hard work you have put into these courses.
@paulmcwhorter Жыл бұрын
LEGEND!
@320mb2 ай бұрын
This is not Knight Rider stuff but I used Two LED patterns that I know all too well. I have 8 LED's going and took the Liberty of reproducing the first Patterns I learned to write in Assembler for my Breadboard computer that uses the 65c02 Processor. the first video shows 2 LED's scrolling right to left, the 2nd shows the 8 LED's flipping back and forth.... kzbin.infok3d-_twbyh0?si=gcr6tHTdB9kMEtVx kzbin.infoEEFovy-DVPE?si=v3yGLmfo96Fzt8T0
@PhysicsAssignmentHelp Жыл бұрын
Thank you Paul! I wrote a simple code for this, it can be found here: kzbin.info/www/bejne/eoK4Y3msp99qaZo
@paulmcwhorter Жыл бұрын
Well done!
@colepdx187 Жыл бұрын
My homework for this tutorial: kzbin.info/www/bejne/maLFaZ-ch5aJh6c Thank you Mr. McWhorter! Great tutorials as usual.
@paulmcwhorter Жыл бұрын
LEGEND!
@stephenlightkep1621 Жыл бұрын
Hot tea Earl Grey
@davidh11879 ай бұрын
Arduino IDE 2 and C version of Knight Rider Chaser kzbin.info_sFIyC59StM
@paulmcwhorter9 ай бұрын
Excellent! Hey, please upload your homeworks as normal youtube videos, not shorts. Shorts dont allow comments, and you can not pause them. Thanks.
@davidh11879 ай бұрын
Hi @@paulmcwhorter , Seems KZbin doesn't give me any other option than 'Shorts'. I guess I need to just make longer recordings to avoid this 'default'!
@akashdeadpool2824 Жыл бұрын
# smallest algorithm for any numbers sir :) from time import sleep x=[] n=int(input("enter the lenth of binary numbers:")) for i in range(n): x.append(0) for f in range(2**n): y='' for j in range(-1,-len(x)-1,-1):y+=str(x[j]) print(y) sleep(.1) if x[0]==0: x[0]=1 continue else: x[0]=0 z=1 for i in range(1,len(x)): if x[i]==0 and z==1: x[i]=1 z=0 if x[i]==1 and z==1: x[i]=0
@jimworden902111 ай бұрын
Thanks, Paul. Here's my homework kzbin.info/www/bejne/bKm2koZriK16g8k . Spent a little time completely revamping my original code to reflect some of the things I've seen here and learned on my own.
@paulmcwhorter11 ай бұрын
LEGEND!
@karliskide2460 Жыл бұрын
Thank you for the lesson! Here is my homework assignment for this one: kzbin.info/www/bejne/lZ67cqeIlJajrtk
@chases9870 Жыл бұрын
i am legend only 62 lines of code
@paulmcwhorter Жыл бұрын
LEGEND!
@chases9870 Жыл бұрын
we are running out of red led's are we going to use a specil led soon?
@DrDave327 Жыл бұрын
Hey, Paul! I could not resist tweaking the arrays that I used in the LED assignment recently... kzbin.info/www/bejne/l5ukpJqmodWCerc
@paulmcwhorter Жыл бұрын
Incredible. OK, if I had that build, I would make like all the LED red, and then one blue, and have the blue one running around. So many possibilities.
@DrDave327 Жыл бұрын
@@paulmcwhorter Ok. I will see if I can do that.
@JUMPINGDONUT_8 ай бұрын
Walmart lawn chair 😂
@alanbod4710 ай бұрын
Hello Paul, Using your tutorial I created a five LED binary counter that goes through the following sequence 1. All LEDS off 2. All LEDS on 3 LEDS light up in sequence 1 to 5 4. All LEDS flash quickly 5 LEDS light up in binary sequence to count 0 to 31 6 All LEDS flash quickly 7 a 3 second pause then back to 1 I found it helpful to put a comment before each block to help me keep track of problems. The video can be seen here and you can see I wired it in a different way from yours, but it seems to work. kzbin.info/www/bejne/ZmbagIuvnsh_kJI The code i used looked like this from machine import Pin from time import sleep led1=Pin(18,Pin.OUT) led2=Pin(17,Pin.OUT) led3=Pin(16,Pin.OUT) led4=Pin(15,Pin.OUT) led5=Pin(14,Pin.OUT) while True: #pin test led1.value(1) led2.value(1) led3.value(1) led4.value(1) led5.value(1) sleep(1) #all pins 0ff led1.value(0) led2.value(0) led3.value(0) led4.value(0) led5.value(0) sleep(1) #pin 1 on led1.value(1) led2.value(0) led3.value(0) led4.value(0) led5.value(0) sleep(1)
@paulmcwhorter10 ай бұрын
LEGEND!
@ErlankBru3 ай бұрын
I am legend! from machine import Pin from time import sleep redLED1=Pin(12,Pin.OUT) redLED2=Pin(13,Pin.OUT) redLED3=Pin(14,Pin.OUT) redLED4=Pin(15,Pin.OUT) while True: redLED.value(0) redLED.value(0) redLED.value(0) redLED.value(0) sleep(1) redLED.value(0) redLED.value(0) redLED.value(0) redLED.value(1) sleep(1) redLED.value(0) redLED.value(0) redLED.value(1) redLED.value(0) sleep(1) redLED.value(0) redLED.value(0) redLED.value(1) redLED.value(1) sleep(1) redLED.value(0) redLED.value(1) redLED.value(0) redLED.value(0) sleep(1) ...and so on until 15, even though this is only up to 4. I will learn the shorter version with time, but this code did it for now.🙂