@@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
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 :-( .
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:]
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.
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.
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!
I forgot to add the comment " Looks like I'm going to need a bigger breadboard ! "
Nice video! You explain things so well that it makes it easy for everyone to understand. Thanks for posting.😊
Thanks for watching!
Great examples, makes understanding binary super easy thanks for the video!
Thanks for watching!
Very well done, I also love the wide variety of approaches everyone comes up with to achieve the homework solution!
Thanks for watching! It is awesome how many approaches folks have used to get this one done. I have learned some new stuff.
Very clean and well thought out. Thank you for the new ideas.
Thanks for watching!
Thanks for sharing, very well made. including more then one way of thinking to the world of the makers :)
Thanks for watching!
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.
It is fun to see all the different approaches that folks come up with.
Another thumbs up. Great video. Thank you!!
Thanks for watching!
nice and clean, thank you for this, I'll show this to my son (10yr) he is really enjoying it.
Glad it is helpful. Thanks for watching!
@@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
We copied everything the same as you line for line, so line 29 is: sleep(delayTime)
@@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
@@hanalei412002 The 'K' Has to be capitalized too.
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 :-( .
Awesome! It does not matter how fancy you do it - just that you get it to work and have fun. Thanks for watching!
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:]
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.
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.
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!