My alternative video for Paul McWhorter's Pico W Lesson 95

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ม.ค. 2025

ความคิดเห็น • 4

  • @johnganci933
    @johnganci933 2 หลายเดือนก่อน

    Nice idea about button placement. Where are the kittens, ducklings and puppies? 🙂 One of these days our cat will sneak into one of my videos.

    • @charlotteswift
      @charlotteswift  2 หลายเดือนก่อน

      @johnganci933 Thanks, John. TH-cam has obviously decided that I post too many boring videos and comments. Any comments with links to my videos get deleted almost instantaneously and most of the others suffer the same fate unless I mention cute animals. When YT gets wise to this, I'm going to have to call everything 'The best chocolate cake recipe in the world, ever' or 'How to knit an umbrella' 😸I look forward to seeing your cat - much more interesting than PIO. Paul's made 16 lessons about it and he's not done yet😿He probably did them all in a weekend but 4 months of the same stuff is driving me to chew my left arm off!
      Sorry about the lack of kittens🐈🐈🐈, ducklings🦆🦆🦆 and puppies🐕🐕🐕

  • @jyvben1520
    @jyvben1520 หลายเดือนก่อน

    semi colon divides commands, so you can put many commands on 1 line
    from machine import Pin ; led=Pin('LED') ; led.on() ; x = 5; z = 0 ; print(x, z)
    works but makes it a bit more difficult to read,
    other way to declare x and z
    x, z = 5, 0
    you can put comments (almost) anywhere
    @rp2.asm_pio(set_init=rp2.PIO.OUT_LOW, # test comment
    out_shiftdir=rp2.PIO.SHIFT_RIGHT)
    like inside a list ( or dictionary)
    x = [ [1,2,3] # first tuple
    , [2,3,4] # second tuple
    ] # end of list x
    to block multiple lines use the triple quote or triple double quote, but use #""" at the end, to unblock just put a # before the starting """
    """
    blocked ....
    #""" # end of block
    with 1 # added you unblock
    #"""
    unblocked ....
    #""" # end of block
    Thonny editor might not show it correctly (to force it, add a space inside the triple + del it) but the compiler will work as expected.
    do you use #TODO in your code, insert #TODO anywhere you still need to enhance/develop/review code, then in Thonny you can choose View/TODO, to get a list of todo ....
    and #TODO is a comment so you can type any text behind it to remind you of ....
    click on the line in the TODO window to jump to that line in your code

    • @charlotteswift
      @charlotteswift  หลายเดือนก่อน +2

      @jyvben1520 I agree with what you've said. I just mentioned being able to put a semi colon at the end of a line in micropython because I get fed up with people whining about the syntax being different in micopython and C++. I don't tend to use a semi colon to join lines because, yes, it does make it more difficult to read.
      Personally, I don't use #TODO because I find it quicker to type three dots and they're easy to see. (I am a VERY lazy typist).
      Even if using semi colons like I said is a stupid idea (I did say in the video that it was probably a stupid idea), I'm quite pleased with my idea of bending the button leg😁
      On the subject of being difficult to read, when I opened the email containing your comment, TH-cam/Gmail had scrunched it all together with no new lines or tabs. Aargh!!!!
      Thanks for watching/commenting.