Pico W Episode 4: Pico Binary Counter

Поділитися
Вставка
  • Опубліковано 22 жов 2024

КОМЕНТАРІ • 29

  • @ronkline8726
    @ronkline8726 Рік тому +1

    I forgot to add the comment " Looks like I'm going to need a bigger breadboard ! "

  • @leeg.1402
    @leeg.1402 Рік тому +1

    Nice video! You explain things so well that it makes it easy for everyone to understand. Thanks for posting.😊

  • @michaelijff400
    @michaelijff400 Рік тому

    Great examples, makes understanding binary super easy thanks for the video!

  • @TimNudd0525
    @TimNudd0525 Рік тому +1

    Very well done, I also love the wide variety of approaches everyone comes up with to achieve the homework solution!

    • @lorisrobots
      @lorisrobots  Рік тому

      Thanks for watching! It is awesome how many approaches folks have used to get this one done. I have learned some new stuff.

  • @albrody8861
    @albrody8861 Рік тому

    Very clean and well thought out. Thank you for the new ideas.

  • @aryeguetta8592
    @aryeguetta8592 Рік тому

    Thanks for sharing, very well made. including more then one way of thinking to the world of the makers :)

  • @keithlohmeyer
    @keithlohmeyer Рік тому +1

    Great job. One more way to create a binary string that we can manipulate! I had not seen this one before. Thanks for another well produced video.

    • @lorisrobots
      @lorisrobots  Рік тому

      It is fun to see all the different approaches that folks come up with.

  • @44mod
    @44mod Рік тому

    Another thumbs up. Great video. Thank you!!

  • @hanalei412002
    @hanalei412002 Рік тому

    nice and clean, thank you for this, I'll show this to my son (10yr) he is really enjoying it.

    • @lorisrobots
      @lorisrobots  Рік тому +1

      Glad it is helpful. Thanks for watching!

    • @hanalei412002
      @hanalei412002 Рік тому

      @@lorisrobots Hi, My son ran the Advance Version but it didn't allow us to run it, it kept sending us this error: Traceback (most recent call last):
      File "", line 29, in
      NameError: name 'keyboardInterrupt' isn't defined

    • @hanalei412002
      @hanalei412002 Рік тому

      We copied everything the same as you line for line, so line 29 is: sleep(delayTime)

    • @hanalei412002
      @hanalei412002 Рік тому

      @@lorisrobots any assistance here would be much help, but if you can't don't worry it was a blast and we gave it a go. thank you

    • @keithlohmeyer
      @keithlohmeyer Рік тому

      @@hanalei412002 The 'K' Has to be capitalized too.

  • @ronkline8726
    @ronkline8726 Рік тому

    Thank you, Lori. I was able to follow your logic explanation and code to add additional LEDs (and have it work :-) ) I did all of the "beginner code" for the five LEDs; zero to 31 and 31 to zero. A LOT of copy and paste :-( .

    • @lorisrobots
      @lorisrobots  Рік тому

      Awesome! It does not matter how fancy you do it - just that you get it to work and have fun. Thanks for watching!

  • @jyvben1520
    @jyvben1520 Рік тому +1

    xval=13;; "{0:04b}".format(xval) gives 1101;; xval=23 gives '10111' so the {0:04b} is just a suggestion as is {:b} ,
    xval=13;; bin(xval) gives 0b1101;; x=bin(xval)[2:6] gives 1101;; xval=23;; x=bin(xval)[2:6] gives 1011, fixed length from '0b10111'
    to reverse string : x_reversedstring = ''.join(reversed(x)) (tested on MicroPython v1.19.1)
    want last 4 then bin(xval)[-4:]

    • @lorisrobots
      @lorisrobots  Рік тому

      Thanks for sharing. I am only counting from 0 to 15 so getting to 23 doesn't happen in my program. Also the way the code works, it pulls the zeros and ones from the indexes zero through three regardless of the length of myBin. If you wished to display a decimal "23", you would need five LEDs to display that number. I believe the concept of my program would work just fine going to binary numbers that need five places. The code would need to change to {0:05b}.format(myNum) to go that high and then you would need to add one more LED to get the additional binary digit. Best wishes.

  • @robakers6127
    @robakers6127 Рік тому

    nice job.... I really like your video and format.. The one thing I am struggling with the working storage size of the varables. wth python, and micro python how do you know the storage size? like is a 2 byte integer, 4 byte integer, or 8 byte integer, same thing with float.... Anyway if you have time and the answer is easy sure would like to understand this. Take Care, and I really did like your solution.

    • @lorisrobots
      @lorisrobots  Рік тому +1

      That is a detailed question that I don't really know how to best answer. I am still learning too. I think you can control the size of the variables as you set them up. I haven't really needed to address that so far - I just use the defaults. Hope you can find your answer. Thanks for watching!