hello_isr.py: add sleep to the example to reduce confusion
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
|
||||
|
||||
import mraa
|
||||
import time
|
||||
|
||||
def test(args):
|
||||
print("wooo")
|
||||
@@ -30,3 +31,5 @@ def test(args):
|
||||
x = mraa.Gpio(6)
|
||||
x.dir(mraa.DIR_IN)
|
||||
x.isr(mraa.EDGE_BOTH, test, test)
|
||||
|
||||
time.sleep(500)
|
||||
|
||||
@@ -28,6 +28,9 @@ controlled by the mode that the 'edge' is in.
|
||||
:prepend: import mraa
|
||||
:start-after: import mraa
|
||||
|
||||
**Note:** If the python script is ended the destructors will run meaning that
|
||||
the ISR will not run. The sleep call is there for that function.
|
||||
|
||||
I2c
|
||||
===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user