TinyGo and Raspberry Pi Pico: GPIO and Interrupts

  Рет қаралды 1,989

Pragmatik Tech

Pragmatik Tech

Күн бұрын

Пікірлер: 15
@iaingeddes7159
@iaingeddes7159 5 ай бұрын
Fantastic series! Thanks
@nodidog
@nodidog Жыл бұрын
Just wanted to say thanks, for putting this series out. I really appreciate it!
@crooked8168
@crooked8168 19 күн бұрын
Did they add Wi-Fi connection to ESP32 ?
@jyoun79
@jyoun79 2 жыл бұрын
Very cool!
@tonygilkerson
@tonygilkerson 2 жыл бұрын
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?
@pragmatiktech
@pragmatiktech 2 жыл бұрын
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.
@pragmatiktech
@pragmatiktech 2 жыл бұрын
Tony: Here you go: kzbin.info/www/bejne/bZC9hHSIrcaFas0
@tonygilkerson
@tonygilkerson 2 жыл бұрын
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?
@tonygilkerson
@tonygilkerson 2 жыл бұрын
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
@pragmatiktech
@pragmatiktech 2 жыл бұрын
@@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.
@pragmatiktech
@pragmatiktech 2 жыл бұрын
Take a look at github.com/tinygo-org/tinygo/pull/2233/files for a possible example.
@tonygilkerson
@tonygilkerson 2 жыл бұрын
@@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,
@pragmatiktech
@pragmatiktech 2 жыл бұрын
@@tonygilkerson More than happy to help and to have people like you with whom I can share this learning journey.
TinyGo and Raspberry Pi Pico: More on Interrupt Handling
17:01
Pragmatik Tech
Рет қаралды 846
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 199 МЛН
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН
Using PICO Interrupts
25:15
Making Stuff with Chris DeHut
Рет қаралды 19 М.
TinyGo and Raspberry Pi Pico: Channels and Concurrency
16:30
Pragmatik Tech
Рет қаралды 2 М.
Another Smart Thermostat using the Raspberry Pi Pico W
11:45
Smarter Circuits
Рет қаралды 1,6 М.
TinyGo and Raspberry Pi Pico: Blink LED
12:40
Pragmatik Tech
Рет қаралды 2,3 М.
Raspberry Pi Pico PIO - PIO Interrupts using C - Ep. 19
27:15
Life with David
Рет қаралды 7 М.
Inductive current measuring using Raspberry Pi
12:54
Matthias random stuff
Рет қаралды 53 М.
TinyGo and Raspberry Pi Pico: Concurrency (GoRoutines)
6:56
Pragmatik Tech
Рет қаралды 2,8 М.
Radxa X4: An N100 Pi
20:48
ExplainingComputers
Рет қаралды 87 М.