summaryrefslogtreecommitdiffstatshomepage
path: root/examples/hwapi
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hwapi')
-rw-r--r--examples/hwapi/README.md6
-rw-r--r--examples/hwapi/button_led.py4
-rw-r--r--examples/hwapi/button_reaction.py4
-rw-r--r--examples/hwapi/soft_pwm.py6
4 files changed, 10 insertions, 10 deletions
diff --git a/examples/hwapi/README.md b/examples/hwapi/README.md
index f3de752f9c..a1b0c5642a 100644
--- a/examples/hwapi/README.md
+++ b/examples/hwapi/README.md
@@ -40,13 +40,13 @@ application of this idea would look like:
`app.py`:
from hwconfig import *
- import utime
+ import time
while True:
LED.value(1)
- utime.sleep_ms(500)
+ time.sleep_ms(500)
LED.value(0)
- utime.sleep_ms(500)
+ time.sleep_ms(500)
To deploy this application to a particular board, a user will need:
diff --git a/examples/hwapi/button_led.py b/examples/hwapi/button_led.py
index bd6fe01729..c73bcfc89a 100644
--- a/examples/hwapi/button_led.py
+++ b/examples/hwapi/button_led.py
@@ -1,4 +1,4 @@
-import utime
+import time
from hwconfig import LED, BUTTON
# Light LED when (and while) a BUTTON is pressed
@@ -6,4 +6,4 @@ from hwconfig import LED, BUTTON
while 1:
LED.value(BUTTON.value())
# Don't burn CPU
- utime.sleep_ms(10)
+ time.sleep_ms(10)
diff --git a/examples/hwapi/button_reaction.py b/examples/hwapi/button_reaction.py
index e5a139a575..52bdf79384 100644
--- a/examples/hwapi/button_reaction.py
+++ b/examples/hwapi/button_reaction.py
@@ -1,4 +1,4 @@
-import utime
+import time
import machine
from hwconfig import LED, BUTTON
@@ -18,4 +18,4 @@ while 1:
print("Well, you're *really* slow")
else:
print("You are as slow as %d microseconds!" % delay)
- utime.sleep_ms(10)
+ time.sleep_ms(10)
diff --git a/examples/hwapi/soft_pwm.py b/examples/hwapi/soft_pwm.py
index 72291b0ecd..466de08f09 100644
--- a/examples/hwapi/soft_pwm.py
+++ b/examples/hwapi/soft_pwm.py
@@ -1,4 +1,4 @@
-import utime
+import time
from hwconfig import LED
@@ -15,10 +15,10 @@ def pwm_cycle(led, duty, cycles):
for i in range(cycles):
if duty:
led.on()
- utime.sleep_ms(duty)
+ time.sleep_ms(duty)
if duty_off:
led.off()
- utime.sleep_ms(duty_off)
+ time.sleep_ms(duty_off)
# At the duty setting of 1, an LED is still pretty bright, then