examples: Update examples to use newer maa functions
* Use maa_init() before any other maa functions are called * Use ioNN instead of gpioXX, Using mapping Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
@@ -25,8 +25,9 @@
|
||||
import pymaa as maa
|
||||
import time
|
||||
|
||||
maa.maa_init()
|
||||
x = maa.gpio_t()
|
||||
maa.gpio_init(x, 26)
|
||||
maa.gpio_init(x, 8)
|
||||
maa.gpio_dir(x, "out")
|
||||
|
||||
while True:
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
import pymaa as maa
|
||||
import time
|
||||
|
||||
maa.maa_init()
|
||||
x = maa.PWM(0,3)
|
||||
x.enable(1);
|
||||
x.period_us(20)
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
import pymaa
|
||||
|
||||
pumaa.maa_init()
|
||||
x = pymaa.gpio_t()
|
||||
print(x.pin)
|
||||
pymaa.gpio_init(x, 20)
|
||||
pymaa.gpio_init(x, 8)
|
||||
print(x.pin)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
import pymaa
|
||||
|
||||
pumaa.maa_init()
|
||||
x = pymaa.I2CSlave(27,28)
|
||||
x.address(0x62)
|
||||
y= " "
|
||||
|
||||
Reference in New Issue
Block a user