Jan Seewald
Jan Seewald

Reputation: 11

Using Pyb-Library in WiPy

How do I use the pyb-library in WiPy? The documentation is incomplete. import pyb doesn't work. Also not from pyb import delay or something. Also machine hasn't delay in it. How do I use following code?

https://docs.micropython.org/en/latest/pyboard/library/pyb.html#pyb.delay

Upvotes: 0

Views: 490

Answers (1)

suvy
suvy

Reputation: 693

easiest way to put a delay in micropython is

import time
time.sleep(Nseconds)
time.sleep_ms(N_milliseconds)

FYI:

pyb library is a module specific for pyboard, will not work in WiPy or ESP32 default micropython firmware. Basically the firmware for pyboard has a module called pyb along with other micropython standard modules. you could always add different modules and build a custom firmware and flash your WiPy.

Upvotes: 2

Related Questions