Charlotte Swift
Charlotte Swift
  • 143
  • 15 391

Відео

My follow-up to Paul McWhorter's Pico W Lesson 91 Chat - How many PIO commands are there?
Переглядів 68День тому
Why does nobody believe me? Return to Paul's lesson 91: ua-cam.com/video/-Wgo-qkAxBQ/v-deo.htmlsi=QundYqtnY6eaQ3OA
My video inpired by Paul McWhorter's Pico W Lesson 90 - Doing simple arithmetic using PIO.
Переглядів 4514 днів тому
This is a sidetrack that people might be interested in. Return to Paul's lesson 90: ua-cam.com/video/scjKnrcYh0o/v-deo.htmlsi=nMGeadLKidhdMPmI
My video for Paul McWhorter's Pico W Lesson 90 - Creating a binary counter that counts up.
Переглядів 6114 днів тому
Paul also wanted us to add as long a delay as possible to the counter. Thankfully, I am not showing this because this would be VERY boring!! Return to Paul's lesson 90: ua-cam.com/video/scjKnrcYh0o/v-deo.htmlsi=srSWaIIigBUJCjo7
This is my solution to Paul McWhorter's PIO Challenge on the Pico W PIO Challenge
Переглядів 13314 днів тому
Use 4 LEDs as a binary counter and use 2 buttons to add or subtract from the number being displayed. Return to Paul's Challenge: ua-cam.com/users/liveE3zHcl9gHhA?si=ZqOABn8P65sxBoKW Return to Paul's lesson 90: ua-cam.com/video/scjKnrcYh0o/v-deo.htmlsi=NIMAs0rQAUNs6WqH
My video for Paul McWhorter's Pico W Lesson 87 - Starting out with PIO
Переглядів 61Місяць тому
I've included 4 programs to demonstrate some very basic stuff. Return to Paul's lesson 88: ua-cam.com/video/uGzc25ZmZMU/v-deo.htmlsi=yquUdgR1nL1fKILx
My video for Paul McWhorter's Pico W Lessons 83 & 84 - Debouncing buttons
Переглядів 80Місяць тому
My video about the Freenove projects board and the Pico to Pi Hat: ua-cam.com/video/-qvcoYImIcQ/v-deo.htmlsi=gd3OsYwxq 2DNt0 Return to Paul's Lesson 84: ua-cam.com/video/s2tjQbwBkxw/v-deo.htmlsi=TwbgIuVFQLXmi1f1
My video for Paul McWhorter's Arduino R4 Lesson 29 - Create a Pong game
Переглядів 352 місяці тому
This video shows how bad I am at playing Pong! Return to Paul's lesson 29: ua-cam.com/video/QrAduIMIhxE/v-deo.htmlsi=i7StN6I8TIk3HgtS Return to Paul's lesson 30: ua-cam.com/video/kiRX8chd56Q/v-deo.htmlsi=-6ktiLiZaUUdxdPg
My video for Paul McWhorter's Pico W Lesson 81a - Binary counter using a variable number of LEDS
Переглядів 392 місяці тому
This program is much shorter than the original one using 4 LEDs. I forgot to include this in the previous video. Return to Paul's lesson 81: ua-cam.com/video/_-QkTfmr7c8/v-deo.htmlsi=xLZScmlpNRXv7eaY
My (personal) video to remind me how I did Paul McW's Pico W Lesson 80. You're welcome to watch!!
Переглядів 1822 місяці тому
This eliminates the need for that last remianing pesky global variable!! My video for lesson 81: ua-cam.com/video/XZHiKpcdHjI/v-deo.htmlsi=kXN0yy9_H2IhRyWN Return to Paul's lesson 81: ua-cam.com/video/_-QkTfmr7c8/v-deo.htmlsi=UACirLVJwSvSPSHh
My video for Paul McWhorter's Pico W Lesson 81 - Create a binary counter using 4 LEDs and timers
Переглядів 3672 місяці тому
This video also shows how you can pass parameters into the callback. Return to Paul's lesson 81: ua-cam.com/video/_-QkTfmr7c8/v-deo.htmlsi=Jvy7UAN_Ni8Mlaii
My 3rd (and final) video for Paul McWhorter's Pico W Lesson 80 - Using timers with 3 LEDs
Переглядів 3652 місяці тому
This is my 3rd attempt after Peter Karlsson alerted me to the dangers of using one-shot timers as opposed to periodic timers. Return to Paul's lesson 81: ua-cam.com/video/_-QkTfmr7c8/v-deo.htmlsi=fI3zeBNcc2eW-5QE
My second video for Paul McWhorter's Pico W Lesson 80 - Using Timers & LEDs
Переглядів 502 місяці тому
In this video I'm trying (badly) to explain why I feel that Scott's program (which was excellent btw) wasn't doing exactly what it should. Scott's video: ua-cam.com/video/Aow_nFlm3n0/v-deo.htmlsi=P-WVBWOPNJyfSOlg Pauls lesson 80: ua-cam.com/video/69S2g1q5m7E/v-deo.htmlsi=S6HOK2bXrR1IqziO
My video for Paul McWhorter's Pico W Lesson 80 - using timers with LEDs
Переглядів 612 місяці тому
This program uses my LED class that I showed in my solution to Lesson 64. Here's the link: ua-cam.com/video/a9BLMZK1LSU/v-deo.htmlsi=C5_wkZCby8P-pifv Return to Paul's lesson 80: ua-cam.com/video/69S2g1q5m7E/v-deo.htmlsi=AiDmnUIJe35ND09W
(Terrible) video of how to get a Pico W connected to a Freenove RPi Projects Board.
Переглядів 862 місяці тому
I love my Freenove Projects board for Arduino and wanted to see if I could cobble something together with a Pico. I will be using it in Paul's upcoming lessons (if all goes well). I used: Freenove Projects board for Raspberry Pi - approx £15 Pimoroni Pico Decker (Quad Expander) on sale for £7.92 (usually £13.20) Pico to Pi Hat (from The Pi Hut) £10.25 40 pin ribbon cable and 2 x 20 pin long hea...
My video for Paul McWhorter's Arduino R4 Lessons 24, 25 & 27 - Using buttons and LEDs
Переглядів 603 місяці тому
My video for Paul McWhorter's Arduino R4 Lessons 24, 25 & 27 - Using buttons and LEDs
My video for Paul McWhorter's Pico W Lesson 77 - Using an IR remote control and neopixels
Переглядів 383 місяці тому
My video for Paul McWhorter's Pico W Lesson 77 - Using an IR remote control and neopixels
My video for Paul McWhorter's Pico W Lesson 76 - Use an IR remote to control a servo (and RGB LED)
Переглядів 573 місяці тому
My video for Paul McWhorter's Pico W Lesson 76 - Use an IR remote to control a servo (and RGB LED)
My video for Paul McWhorter's Pico W Lesson 75 - Using a remote control with a blown-up IR receiver
Переглядів 783 місяці тому
My video for Paul McWhorter's Pico W Lesson 75 - Using a remote control with a blown-up IR receiver
Video for Paul McWhorter's Arduino R4 Lesson 22 - Control a Servo with a Potentiometer using firmata
Переглядів 644 місяці тому
Video for Paul McWhorter's Arduino R4 Lesson 22 - Control a Servo with a Potentiometer using firmata
My video for Paul McWhorter's Arduino R4 Lesson 22 - Control a servo with a potentiometer
Переглядів 684 місяці тому
My video for Paul McWhorter's Arduino R4 Lesson 22 - Control a servo with a potentiometer
My video inspired by Paul McWhorter's Pico W Lesson 74 - using a .json file.
Переглядів 594 місяці тому
My video inspired by Paul McWhorter's Pico W Lesson 74 - using a .json file.
My video for Paul McWhorter's Pico W Lesson 73 - control an RGB LED with a class & a dictionary.
Переглядів 1344 місяці тому
My video for Paul McWhorter's Pico W Lesson 73 - control an RGB LED with a class & a dictionary.
My video for Paul McWhorter's Arduino Uno R4 Lesson 20 - Flash an RGB LED red, green, blue.
Переглядів 794 місяці тому
My video for Paul McWhorter's Arduino Uno R4 Lesson 20 - Flash an RGB LED red, green, blue.
Using Python to control an Arduino
Переглядів 524 місяці тому
Using Python to control an Arduino
My video for Paul McWhorter's Arduino Uno R4 Lesson 19Arduino R4 Lesson 19
Переглядів 684 місяці тому
My video for Paul McWhorter's Arduino Uno R4 Lesson 19Arduino R4 Lesson 19
Video for Paul McWhorter's Arduino Uno R4 Lessons 12 - 18
Переглядів 774 місяці тому
Video for Paul McWhorter's Arduino Uno R4 Lessons 12 - 18
My video for Paul McWhorter's Pico W Lesson 70 (not really)
Переглядів 855 місяців тому
My video for Paul McWhorter's Pico W Lesson 70 (not really)
My video for Paul McWhorter's Pico W Lesson 69 - Exit a dual core program cleanly.
Переглядів 1355 місяців тому
My video for Paul McWhorter's Pico W Lesson 69 - Exit a dual core program cleanly.
Paul McWhorter's Pico W Lessons 64 - 68. Move a servo and flash LEDs according to the direction.
Переглядів 765 місяців тому
Paul McWhorter's Pico W Lessons 64 - 68. Move a servo and flash LEDs according to the direction.

КОМЕНТАРІ

  • @jimf99
    @jimf99 День тому

    Brilliant! Well Done! I like your use of the FreeNove board. Very versitile for various projects. The Servo is interesting, going from sunny to dull. Congtats! Kind Regards from Calgary Alberta Canada

    • @charlotteswift
      @charlotteswift День тому

      @jimf99 Thanks, Jim. That's very kind. I also have another Freenove projects board for the raspberry pi which I've added to so that I can use it with a Pico for Paul's other classes.

  • @peterkarlsson7801
    @peterkarlsson7801 3 дні тому

    Good video, and a nice picture.

  • @paulmcwhorter
    @paulmcwhorter 5 днів тому

    Nice Work!

  • @leeg.1402
    @leeg.1402 5 днів тому

    Nice job!! I need to get back into the Arduino. I've been concentrating on the Pico these past couple of months. Really like playing with the PIO stuff. I'm thinking about trying to make YT videos. What do you use for video editing?

    • @charlotteswift
      @charlotteswift 5 днів тому

      @leeg.1402 Thanks, Lee. I've been doing more with the Pico recently but I realised that, unless I caught up with the Arduino lessons soon, I never would. I use RecMaster which isn't too complicated. I wouldn't be able to cope if I kept switching views and resizing things like Paul does🙃I originally got RecMaster on a free trial but liked it so much that I actually PAID for it. Please do start making videos. It would be good to see what you've been up to.👍

  • @keithlohmeyer
    @keithlohmeyer 7 днів тому

    Paul seems to get upset when we point out mistakes! I had a similar thing he has not approved my comment (it didn't disappear but I can't see it with my second account) I guess because I jumped ahead and posted a couple videos on my PIO distance sensor code. I think he is going to do distance sensor video too so he blocked my comment.

    • @charlotteswift
      @charlotteswift 7 днів тому

      @keithlohmeyer At least you've never been blocked in the live chat session!! The trouble is that he makes his lessons too far ahead so that, if someone points out an error or a better way of doing something, he will carry on doing it the old way FOR EVER. An example is testing for a button push/release. He also seems to have no interest in learning the intricacies of the languages. Learners ought to be taught that cut-and-paste is not your friend! I actually learn more from looking at Pascal's, Peter Karlssen's (and your, of course) programs. WHERE IS PASCAL???? I'll take a look at your distance sensor video sometime. Does it have any bears in it?

    • @keithlohmeyer
      @keithlohmeyer 6 днів тому

      @@charlotteswift "At least you've never been blocked in the live chat session!!" OUCH! Yes and he wonders why his viewership is declining. BTW I am heading out for a week long road trip today so will be away from the computer most of the week. Hold the fort down while I am away.

    • @charlotteswift
      @charlotteswift 6 днів тому

      @keithlohmeyer I hope you have a jolly good time.

  • @charlotteswift
    @charlotteswift 11 днів тому

    I did actually cheat in this video. One of the bears🐻🐻🐻‍❄🐻‍❄🐼🐼🐻🐻 was a duck🦆

  • @vaughntaylor2855
    @vaughntaylor2855 11 днів тому

    Very nice Charlotte!

    • @charlotteswift
      @charlotteswift 11 днів тому

      @vaughntaylor2855 Thanks, Vaughn😊 My next mission is to convince everyone that there are 9 PIO commands available, not 8. 🙃That will be a lot harder😀and, no, I'm not counting nop.

  • @peterkarlsson7801
    @peterkarlsson7801 12 днів тому

    Very interesting! I have found a way to to bitwise AND operations using the PIO. And I found it out all by myself...

    • @charlotteswift
      @charlotteswift 12 днів тому

      @peterkarlsson7801 That would be interesting

  • @peterkarlsson7801
    @peterkarlsson7801 13 днів тому

    Very good! But there is no nop() in your code : - ( My solution requires 22 instructions. Both you and Quaternion used a better method to read 2 buttons. I'm doing jmp(x_not_y, 'label'), which requires more instructions, I also have a solution using 28 instructions, where the counter value (the x register in your code) will be in the interval 0 -15.

    • @charlotteswift
      @charlotteswift 13 днів тому

      @peterkarlsson7801 Thanks, Peter. I forgot to put the button debouncing back into my program when I made the video so I actually used more than 16 instructions. Are you going to make a video to show us how you did it? David aka Very US Mumblings used x_not_y but I found it all very confusing🙃but that was probably because his program still had a bug in it when he made the video. There may not be any nop()s in my video but there are elephants🐘🐘👍

  • @VeryUsMumblings
    @VeryUsMumblings 15 днів тому

    Congratulations! I thought mine was slow, but you get the prize! 👍

    • @charlotteswift
      @charlotteswift 15 днів тому

      @VeryUsMumblings Thanks, David. Is it the prize for the most boring program in the world?

    • @charlotteswift
      @charlotteswift 15 днів тому

      @VeryUsMumblings I tried to leave a comment on your video but YT wasn't having it!! It was one of the most confusing programs I've ever seen🙃🙃I tried it out. Maybe I had a typo but it started counting from 2 which was weird. I'm going for a valium and a lie down😁

    • @VeryUsMumblings
      @VeryUsMumblings 15 днів тому

      @@charlotteswift UA-cam is deleting my comments for some reason. I see them on my edit page, but they disappear when I go to read them. I can copy paste my reply here, if that helps. Yes, I solved it after I made the video. at the start of pio_Prog, i set x to 1111, but that's taken care of in the wrap loop, so, instead, it should set the isr to 0001. the x_not_y is needed to jump over the imcrement of the y upwards through the isr. basically it makes extra loops counting down x from 1111 to 0000 every time until x and y are the same, putting more nops in the way. As far as the invert is concerned, I just missed it or didn't understand it. do better next time, I guess. 😄 Thanks for the comment! 👍

    • @charlotteswift
      @charlotteswift 15 днів тому

      @VeryUsMumblings You should say 'Thanks for the mean comment! '👎

    • @VeryUsMumblings
      @VeryUsMumblings 15 днів тому

      @@charlotteswift That's not mean. That's just curious. Mean people drop f-bombs and write in all caps! 😄

  • @leeg.1402
    @leeg.1402 16 днів тому

    Nice job! I'm always learning new ways of doing things from you. Thanks for posting.

  • @keithlohmeyer
    @keithlohmeyer 16 днів тому

    I like it! You are so clever. I posted a second video on lesson 90 taking what you showed a little farther. I am sure you already know what I showed but it might help others. Thanks for keeping me thinking

    • @charlotteswift
      @charlotteswift 16 днів тому

      @keithlohmeyer Thanks, Keith but I have to correct you. I'm not clever, I'm bonkers!! Who in their right mind would want a LED to delay for over 2 years?? Thanks for watching and I'll take a look at your video soon.

  • @paulmcwhorter
    @paulmcwhorter 17 днів тому

    Nice solution.

  • @charlotteswift
    @charlotteswift 17 днів тому

    My maths may be completely up the swanny ((2**32 - 1) * 16 /(1000 * 60 * 60 *24 * 365)) but I think it will take over 2 years to increment the counter by 1.

    • @peterkarlsson7801
      @peterkarlsson7801 12 днів тому

      Most of the time, we don't need a delay of 2 years. So I think it's better to set y to 31 in the delay loop, and insert some nop() [31] instructions to adjust the delay.

  • @paulmcwhorter
    @paulmcwhorter 18 днів тому

    Very nice. we will declare you and quaternion co-champions. Both of you came up with very similar solutions, which is the same strategy I took. We will gradually build up to this over the next few lessons, and this will become a standard homework in the next few weeks.

    • @charlotteswift
      @charlotteswift 17 днів тому

      @paulmcwhorter Thanks, Paul. I'm trying to get my head round multiplication now.

  • @charlotteswift
    @charlotteswift 19 днів тому

    I'm very careless!!! In the video and the comments in the program, I got my left and right muddled up. It's probably because I'm living in a country where they drive on the wrong side of the road🙃 I also made a mistake in this comment. I meant to say 'set(y,3)', not 'set(y,5)'. I took out the debouncing bit and forgot to put it back🙃🙃 So the program needs set(y, 5) label("debounce1") jmp (y_dec, "debounce1") [31] before the first wait on line 30 and set(y, 5) label("debounce2") jmp (y_dec, "debounce2") [31] before the second wait on line 42.

    • @keithlohmeyer
      @keithlohmeyer 18 днів тому

      At 2000 hz you might get away with a single 31 cycle pause as it will get you 16 ms and you can tack it on one of your existing instructions but more is better if you have the instructions to spare. You and Carter have done such a good job on this I have nothing to add except maybe using jmp pin for one of the buttons but you still have to use in_ for the other one.

    • @charlotteswift
      @charlotteswift 18 днів тому

      @keithlohmeyer Thanks, Keith. I was aiming for 50 ms but put 5 instead of 3 by mistake🙃

  • @arnoldschmucker9977
    @arnoldschmucker9977 19 днів тому

    Bravo!

  • @quaternion-pi
    @quaternion-pi 19 днів тому

    Very nice, Charlotte! I like how you accounted for both buttons pressed at the same time, something I looked at in my code but ignored. I cede my bestowed "grand champion" to you - I am just happy I could do the assignment. Probably spent 10 hours on it, slept on it overnight, and pondered it while running. Your coding skills are more advanced than mine, and I always pick up useful tips with your assignments. Thanks, and I hope the issue with your posts being deleted mysteriously gets resolved

    • @charlotteswift
      @charlotteswift 19 днів тому

      @quaternion-pi Thanks, Carter. I was quite lucky that I had already made a binary counter and therefore realised that's it's much easier to count backwards than forwards. It's strange that there are so few commands available. You can keep the trophy 🏆. You earned it fair and square and I wouldn't want to have to dust it anyway😁 Everyone says that there are not many examples of using PIO and micropython available so maybe you could make your video public? When I watch your videos, I see how a grown up does it👍as opposed to some of my bonkers ideas.

    • @quaternion-pi
      @quaternion-pi 19 днів тому

      @@charlotteswift Charlotte, your posted solutions are very thoughtful and well explained. As far as making my video public - I am too thin skinned. I make the videos mostly for myself and to ensure I finish the project quickly. I do enjoy speaking especially with you and Keith about this material - members of the hardcore "top tech boys". This guy, David, taught me a lot: ua-cam.com/play/PLiRALtgGsxmZs_LXGkh09Zr2NUmk_mtEI.html. Way above my pay grade, but very well explained. Thanks for your thoughts!

    • @charlotteswift
      @charlotteswift 19 днів тому

      @quaternion-pi You're very kind, Carter. I am a bit sensitive about my videos too. It upsets me when I get a dislike because, if there's nothing about the content to dislike, then it must be me that they hate😿I deliberately don't put any tags on the videos so that they are less likely to come up in searches. Like you, I mainly make the videos for myself so that I can remind myself of how to do something when I've forgotten (probably the following week🙃). Keith is very good at finding things out and @peterkarlsson7801 can be relied on to know things about the lower level stuff. I've looked at Life with David fairly briefly but it's very disappointing when he starts using C instead of micropython.

  • @charlotteswift
    @charlotteswift 20 днів тому

    You Tube deleted my comments (as usual) so I missed out on being the Grand Champion!!!!!

  • @leeg.1402
    @leeg.1402 20 днів тому

    Nice job!! I haven't figured it out yet, so I didn't really study your code. Will probably have to take a closer look to get a hint if I don't get it soon. Thanks for posting.

    • @charlotteswift
      @charlotteswift 20 днів тому

      @leeg.1402 Thanks, Lee. There must be many ways of doing it because Paul said he used all 32 commands and I did it in 16.

  • @keithlohmeyer
    @keithlohmeyer 20 днів тому

    Nice job! You got the challenge before me. Now I don't have to rush to post my slightly different solution. I "hunter gathered" the bit manipulation increment trick back in my Arduino days. That trick is probably why Paul thought this would be hard. In my opinion we need to be both hunter gathers and inventors.

    • @charlotteswift
      @charlotteswift 20 днів тому

      @keithlohmeyer Thanks, Keith. As you know, I don’t google anything. I have no idea about the bit manipulation increment trick. I just thought about it while I was in the bath. I am definitely not a hunter gatherer!. l’m far too lazy!

    • @keithlohmeyer
      @keithlohmeyer 20 днів тому

      @@charlotteswift I wish I had a brilliant mind like you!

    • @charlotteswift
      @charlotteswift 20 днів тому

      @keithlohmayer You obviously need to spend more time in the bath!

    • @keithlohmeyer
      @keithlohmeyer 20 днів тому

      @@charlotteswift If I didn't Google or remember things I "hunter gathered" in the past, I would probably sit in the bath trying to reinvent the wheel.

  • @jbelmont72
    @jbelmont72 26 днів тому

    Thank you for sharing your work with us distant and unknown persons. It made sense to me that somehow the ons-shot timers would throw the timing off although my puny human senses could not perceive it. It was reassuring when I saw that you and others who are infinitely more experienced were addressing that issue. I have copied your program which I'm attaching as well as the terminal output. It shows that the redBlinker function was only called the first time and after that there is just rapid toggling by the redBlinker2 function. Been pondering this and hoping for your insight. The red LED appears to stay on but I can see that it is appearing to toggle (perhaps at a faster rate than can be printed each half second). import time from machine import Pin,Timer rPin=17 gPin=16 bPin=13 rLed=Pin(rPin,Pin.OUT) gLed=Pin(gPin,Pin.OUT) bLed=Pin(bPin,Pin.OUT) blueP=100 greenP= 10000 redP= 1000 redOnPerc =0.1 redOnP=int(redP+redOnPerc) def redBlinker(timer): global redTimer, redP rLed.toggle() print('redBlinker rLed value: ',rLed.value()) print('redP: ',redP) redTimer = Timer(mode = Timer.PERIODIC, period=redP,callback= redBlinker2) def redBlinker2(timer): print('first redBlinker2 rLed Value: ',rLed.value()) rLed.toggle() print('redBlinker2 rLed value: ',rLed.value()) def greenBlinker(timer): gLed.toggle() def blueBlinker(Timer): bLed.toggle() rLed.on() gLed.on() bLed.on() if rLed.value()==1: redPeriod =redOnP else: redPeriod= redP-redOnP x=0 redTimer= Timer(period=redPeriod,mode=Timer.ONE_SHOT,callback=redBlinker) redTimer2=Timer(period=redP,mode=Timer.PERIODIC,callback=redBlinker2) greenTimer=Timer(period=greenP,mode=Timer.PERIODIC,callback=greenBlinker) blueTimer=Timer(period=blueP,mode=Timer.PERIODIC,callback=blueBlinker) try: while True: print(x) time.sleep(1) x+=1 except KeyboardInterrupt: print('all done') redTimer.deinit() # buzzerTimer.deinit() greenTimer.deinit() blueTimer.deinit() rLed.value(0) gLed.value(0) bLed.value(0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ terminal output: 0 redBlinker rLed value: 0 redP: 1000 first redBlinker2 rLed Value: 0 redBlinker2 rLed value: 1 1 first redBlinker2 rLed Value: 1 redBlinker2 rLed value: 0 first redBlinker2 rLed Value: 0 redBlinker2 rLed value: 1 2 ...

    • @charlotteswift
      @charlotteswift 25 днів тому

      @jbelmont72 Hi J (jack, john, joshua, jimmy?) You're quite right, redBlinker is only called once (by the one shot instance of redTimer). This is to set up the moment when the periodic instance of redTimer should be set up. Imagine that the red LED wants to be on for 1 second and off for 2 seconds. Both periodic timers would have a period of 3 seconds and would just toggle the red LED. The toggling for the 1 and 2 seconds example would work something like this: 0 seconds: state = ON 1 seconds: toggle (state = OFF) 3 seconds: toggle (state = ON) 4 seconds: toggle (state = OFF) 6 seconds: toggle (state = ON) 7 seconds: toggle (state = OFF) 9 seconds: toggle (state = ON) 10 seconds: toggle (state = OFF) 12 seconds: toggle (state = ON) The 2 timers work independently to each other but, as long as the period for each of them is the same, they will remain in sync. Does this make any sense at all? In your program, you could increase the red period so that it would be easier to see what's going on. eg 0.5 seconds on and 4.5 seconds off. I've got my pico set up for something else at the moment so can't try out your program. I haven't gone through it line by line but I've just noticed that the line above def redBlinker says redOnP=int(redP+redOnPerc) instead of redOnP = int(redP * redOnPerc) This would explain why things aren't working properly. redOnPerc is the percentage of time that the red LED should be on for.

    • @jbelmont72
      @jbelmont72 20 днів тому

      @@charlotteswift Thank you for helping me immensely. Your thoughtfulness is greatly appreciated. I look at your programs and explanations as taking PW's work to a more in depth and greater understanding level. Respectfully, Judson

    • @charlotteswift
      @charlotteswift 20 днів тому

      @jbelmont72 You're very welcome, Judson. Some of my solutions are totally bonkers because I try not to google other people's work and I'm too lazy to read the documentation often.

  • @lorisrobots
    @lorisrobots 27 днів тому

    Very efficient code. Thanks for sharing!

    • @charlotteswift
      @charlotteswift 27 днів тому

      @lorisrobots Thanks, Lori. I hope the wedding went well.👰🤵🎂🍾

  • @lorisrobots
    @lorisrobots 27 днів тому

    Great work - I am finally catching up on the Uno R4 course. Hope to catch up on the pico course later in the year. Thanks for sharing!

    • @charlotteswift
      @charlotteswift 27 днів тому

      @lorisrobots Thanks, Lori. I've fallen behind on the Arduino lessons too. I'll try to catch up by doing 5 programs in 1 video again which means that I'll get fewer dislikes.😁

  • @leeg.1402
    @leeg.1402 Місяць тому

    Good video!! Oh, I figured out what that LED thingy is... it's an LED bar graph. I'm going to get a couple 2 or 3 to play with. Seems to make a neater build than individual LED's, especially on the little project board I have for the Pico. Take care. 🙂

    • @charlotteswift
      @charlotteswift Місяць тому

      @leeg.1402 Thanks, Lee. You can also get bi-colour ones that have a green and a red element so that you can display red, green and yellow. I wish I could find them🙃

  • @peterkarlsson7801
    @peterkarlsson7801 Місяць тому

    VERY GOOD!

    • @charlotteswift
      @charlotteswift Місяць тому

      @peterkarlsson7801 But not very exciting👎

  • @paulmcwhorter
    @paulmcwhorter Місяць тому

    Nice!

  • @peterbrylka7877
    @peterbrylka7877 Місяць тому

    Hello Charlotte Swift, there are from the videos Raspberry Pi Pico W Lessons for Absolute Beginners the Python files to download. They are great videos Thanks Peter

    • @charlotteswift
      @charlotteswift Місяць тому

      @peterbrylka7877 Thank you, Peter. That’s very kind of you to say so.

  • @VeryUsMumblings
    @VeryUsMumblings Місяць тому

    Congratulations! I like the copy-pasting of code! 👍 Your button may be wonky, my button broke completely. 😄

  • @charlotteswift
    @charlotteswift Місяць тому

    I've replaced line 125 by the following lines // next line is to stop changing deltaY twice in corner if (yPos > 0 && yPos < 7) { deltaY = - deltaY; } There was a problem when the paddle was 1 pixel below or above the corner and the ball was 1 pixel to the left or right of the same corner.

  • @charlotteswift
    @charlotteswift Місяць тому

    I've added this line to my solution to lesson 83 (in the Keyboard Interrupt before led.off()) button.irq(handler=None) And I've added these 2 lines to my solution to lesson 84 (in the Keyboard Interrupt before for led in leds:) add_button.irq(handler=None) sub_button.irq(handler=None) This was just in case something strange happened if I pressed the button after I stopped the program

  • @peterkarlsson7801
    @peterkarlsson7801 Місяць тому

    Interesting way to control the LEDs. I use statements like led2_value = bool(counter & 4) and led1_value = bool(counter & 2) in my solution

    • @charlotteswift
      @charlotteswift Місяць тому

      @peterkarlsson7801 Ah, you do it the grown up way because you read the documentation! I just pictured in my mind how the binary string looked exactly how I wanted the LED array to be. PS Whenever anyone says that my solution is 'interesting', they really mean 'strange'😺

  • @anthonyorf8827
    @anthonyorf8827 Місяць тому

    For some reason even after installing mpy-cross, whenever I try to import it it just says no module named mpy_cross

    • @charlotteswift
      @charlotteswift Місяць тому

      @anthonyorf8827 That's probably because you've installed it into a different version of python. Maybe this video might help you ua-cam.com/video/S-yTMuC-adA/v-deo.html

    • @anthonyorf8827
      @anthonyorf8827 Місяць тому

      @@charlotteswift thx, for now I found a temporary loop hole, I went to the file location of where mpy_cross was installed and copied it to the folder of the file I wanted to convert was in, then when I moved to that folder and imported, instead of being in the library it was in the actual folder, I was pretty surprised it worked

    • @charlotteswift
      @charlotteswift Місяць тому

      @@anthonyorf8827 Maybe that's the equivalent of what I did. I can't remember🙃🙃Perhaps I put the file that I wanted to convert in the same folder as mpy_cross. This is why I make videos, not just to help other people out but also to remind myself of all the things that I've forgotten.

  • @keithlohmeyer
    @keithlohmeyer Місяць тому

    Nice! I always learn something new from your vids. Thanks for posting.

    • @charlotteswift
      @charlotteswift Місяць тому

      @keithlohmeyer Thanks, Keith. If I wasn't so lazy, I would have created a debounce class but then I probably would have forgotten to ever use it.

  • @scottpettygrove7821
    @scottpettygrove7821 Місяць тому

    Nicely done, Charlotte. Really like the flag class and the special character prints. Those characters are part of the default Windows code page I assume?

    • @charlotteswift
      @charlotteswift Місяць тому

      @scottpettygrove7821 Thanks, Scott. I don't know whether anyone apart from Keith has used my idea of using a class to avoid having to use global variables. I just cut and pasted the emojis themselves via WordPad. A more sensible approach would be to have a dictionary with the names and unicodes of the emojis that you want. For example emoji_dict = { "grinning cat" : chr(0x1F63A), "grinning cat with smiling eyes" : chr(0x1F638), "cat with tears of joy" : chr(0x1F639), "smiling cat with heart-eyes" : chr(0x1F63B), "cat with wry smile" : chr(0x1F63C), "kissing cat" : chr(0x1F63D), "weary cat" : chr(0x1F640), "crying cat" : chr(0x1F63F), "pouting cat" : chr(0x1F63E), "Big Burger Face" : chr(0x1F920), } for key, value in emoji_dict.items(): print(f"{key}: {value}") print(" Hurrah!! It's BBF!!!", emoji_dict["Big Burger Face"]) PS Do you get the feeling that I like cats (and BBF)?😸

    • @charlotteswift
      @charlotteswift Місяць тому

      @scottpettygrove7821 Hi Scott. Your channel says that it doesn't have any content. Is it something that you've done or has UA-cam eaten all your videos?

    • @scottpettygrove7821
      @scottpettygrove7821 Місяць тому

      @@charlotteswift Hi Charlotte. I deleted them all after someone subscribed to my channel who is a potentially bad actor. He left his playlist public and when I looked, there was zero interest in programming but tons of interest in things like survivalist training, how to handle knives, how to carry them unseen, and other subjects that caused me concern. I decided that I just don’t need to put myself out there in a way that makes it easier for folks to glean info or use AI to simulate my voice. If I submit future homework’s, they will not be narrated.

    • @charlotteswift
      @charlotteswift Місяць тому

      @scottpettygrove7821 That's very strange! I don't know whether my playlist is public but if it is, it would be about knitting stitches, how to make rag rugs and (obviously) cats. I never got to see your breakout game😿 Carter (quaternion but I've probably got the spelling wrong) makes all his videos so that you need a link to watch them. I can't see that learning how to flash an LED on and off would help a homocidal, knife-wielding maniac but maybe you're right to be cautious. I much prefer narrated videos. I hope that I'll be able to continue doing them but I'm having medical problems and I'm noticing a decline in my speech and manual dexterity which is a bummer. Maybe I could use AI to simulate my own voice. Or maybe it would be better to sound like Darth Vader👍👍👍😸I'll miss your videos😿😿

  • @-MYkus-
    @-MYkus- 2 місяці тому

    Wonderful program!

  • @VeryUsMumblings
    @VeryUsMumblings 2 місяці тому

    Great Video and great game! I especially like the way the camera AI recognizes the happy/sad face of the game and puts a square around it! 😄👍

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @gabriel38g Thanks, David. The square around the face just happened. I wouldn't have a clue how to do it🙃

  • @bigbogeyface
    @bigbogeyface 2 місяці тому

    Jolly good 👍 I like the smiling face best 😃 👌

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @bigbogeyface That's because you're a happy chappie😁

  • @peterkarlsson7801
    @peterkarlsson7801 2 місяці тому

    Very good! You should slow down the bouncing pixel, and allow the play to select an even longer padel :-)

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @peterkarlsson7801 Thanks, Peter, but that would be cheating!! I'm actually much better at Pong when I'm not trying to make a video at the same time.

    • @bigbogeyface
      @bigbogeyface 2 місяці тому

      @peterkarlsson7801 Yeah, I would totally make the panel length 8 😄😅🤣

  • @VeryUsMumblings
    @VeryUsMumblings 2 місяці тому

    Nice. Solution. Better than choosing the easier solution that I did. 👍

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @gabriel38g Thanks, David. I forgot to show the version using a variable number of LEDs. ua-cam.com/video/IPjzDj4Bhjo/v-deo.html

  • @DrDave327
    @DrDave327 2 місяці тому

    Great solution, Charlotte!

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @DrDave327 Thanks, Dr Dave, but I forgot to show the version using a variable numbe of LEDs. Here's the link in case you're interested: ua-cam.com/video/IPjzDj4Bhjo/v-deo.html

  • @bigbogeyface
    @bigbogeyface 2 місяці тому

    Nicely explained 👌

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @bigbogeyface and short👍😁

    • @bigbogeyface
      @bigbogeyface 2 місяці тому

      @@charlotteswift and short 😃👍

  • @peterkarlsson7801
    @peterkarlsson7801 2 місяці тому

    My not so optimized version is setting up 12 timers, controlling 12 Neopixels

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @peterkarlsson7801 Hi Peter I had thought of using Neopixels but a binary counter on a Neopixel ring would be even more confusing than my Italian traffic lights🙃 About 5 months ago, I made a video about using direct port manipulation on the arduino uno and you pointed out that it would only work on an R3. You also said that you had managed to do the same thing on an R4. I am about to get my R4 out of its box because Paul's started doing lessons on the little LED matrix. I would be _really_ grateful if you could send me your DDM code for the R4 because I'm no good at reading documentation. Sometimes you need to already know what they're talking about in order to understand what they're saying🙃Looking at an example that works would help me a lot. Thanks for watching!!

  • @keithlohmeyer
    @keithlohmeyer 2 місяці тому

    Great job! I really like indexing over lists in a loop. Thanks for the video.

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @keithlohmeyer Thanks, Keith. I thought I ought to publish it after seeing Arnold setting up 8 timers one by one.

  • @peterkarlsson7801
    @peterkarlsson7801 2 місяці тому

    There are always something new to learn...

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @peterkarlsson7801 Even for you?😁

  • @paulmcwhorter
    @paulmcwhorter 2 місяці тому

    Nicely done.

  • @scottpettygrove7821
    @scottpettygrove7821 2 місяці тому

    Wow! That’s an impressive solution, Charlotte! Well done.

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @scottpettygrove7821 Thanks, Scott. I'm glad that it could be done so simply - Keith's lambda functions made my head hurt🤕

  • @keithlohmeyer
    @keithlohmeyer 2 місяці тому

    Nice solution! I learned something new today. Thanks for the video.

  • @bigbogeyface
    @bigbogeyface 2 місяці тому

    What a most excellent solution 😃👏👏👏👏

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @bigbogeyface Thank you, Mr Burger. It's so simple when you know how😆

  • @shawnlowe1392
    @shawnlowe1392 2 місяці тому

    Well Done!

    • @charlotteswift
      @charlotteswift 2 місяці тому

      @shawnlowe1392 Thanks, Shawn. Third time lucky!!