1 / 5
[ Lab14] GPIO Interrupt
50 likes | 186 Vues
[ Lab14] GPIO Interrupt. Example. GPIO Interrupt. from bbio import * def isr1(): print “isr1 executed” delay(500) def isr2(): print “isr2 executed” delay(500). GPIO Interrupt. def setup(): pinMode(USR3, OUTPUT) pinMode(GPIO1_6, INPUT) pinMode(GPIO1_2, INPUT)
Télécharger la présentation
[ Lab14] GPIO Interrupt
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.
Content is provided to you AS IS for your information and personal use only.
Download presentation by click this link.
While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
During download, if you can't get a presentation, the file might be deleted by the publisher.
E N D
Presentation Transcript
[Lab14] GPIO Interrupt • Example
GPIO Interrupt from bbio import * def isr1(): print “isr1 executed” delay(500) def isr2(): print “isr2 executed” delay(500)
GPIO Interrupt def setup(): pinMode(USR3, OUTPUT) pinMode(GPIO1_6, INPUT) pinMode(GPIO1_2, INPUT) attachInterrupt(GPIO1_6, isr1, FALLING) attachInterrupt(GPIO1_12, isr2, FALLING) def loop(): toggle(USR3) delay(500) run(setup, loop)
More Related