0

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

ɢʀᴜɴᴛ
  • 32,025
  • 15
  • 116
  • 110
  • I think you would do better if you explained the exact thing you're trying to do (with the code you've tried) and not focus so much on the specific library. The SO community can point you to the right library if that's not it. – Patrick Mar 18 '20 at 21:19

1 Answers1

2

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.

suvy
  • 693
  • 6
  • 18