Just wanted to say thanks, for putting this series out. I really appreciate it!
@crooked816819 күн бұрын
Did they add Wi-Fi connection to ESP32 ?
@jyoun792 жыл бұрын
Very cool!
@tonygilkerson2 жыл бұрын
This is great, I am learning how to code pico with TinoGo and there are many python examples but actual TinyGo examples are hard to find so please keep them coming. I do have a question. Is the execution of the interrupt function concurrent or parallel? For example if you were to put a sleep in your function that checks the button status would the other light pause for awhile?
@pragmatiktech2 жыл бұрын
Yes it would. Although time.Sleep seems to be disabled in an interrupt service routine. I'm working on a video to illustrate this - based on this question and the one you asked on my other video. Stay tuned.
@pragmatiktech2 жыл бұрын
Tony: Here you go: kzbin.info/www/bejne/bZC9hHSIrcaFas0
@tonygilkerson2 жыл бұрын
I finally got around to trying this out. I have a single push button and I SetInterrupt for when it is pressed. When pressed I print "hi". This works but sometimes it prints "hi" real quick several times if I don't push the button quickly. I think I heard someone call this pin-bouncing? Can you suggest a technique I can us to avoid this?
@tonygilkerson2 жыл бұрын
I did some searching and found that I can fix in software or hardware, I am better at programming so I will try to fix in software. Looks like I can read the pin value in a loop and introduce a small delay when pressed to debounce. Looks like that can work but seems to make the use of SetInterrupt not needed. I like the SetInterrupt approach so any advice is appreciated
@pragmatiktech2 жыл бұрын
@@tonygilkerson You'll need to debounce your switches. Unfortunately, I couldn't figure out an easy way to debounce in software on the Pico using TinyGo since we need to keep the ISR execution time really small. A simple hardware debouncer might do the trick.
@pragmatiktech2 жыл бұрын
Take a look at github.com/tinygo-org/tinygo/pull/2233/files for a possible example.
@tonygilkerson2 жыл бұрын
@@pragmatiktech I just took a look at that example, I like it... I will try that next. You are a great resource, I appreciate your help. I will report back to let you know if it works,
@pragmatiktech2 жыл бұрын
@@tonygilkerson More than happy to help and to have people like you with whom I can share this learning journey.