/dports/lang/micropython/micropython-1.17/tests/pyb/ |
H A D | pyb1.py | 3 import pyb 7 pyb.delay(-1) 8 pyb.delay(0) 9 pyb.delay(1) 12 pyb.delay(17) 17 pyb.udelay(-1) 18 pyb.udelay(0) 19 pyb.udelay(1) 28 pyb.enable_irq() 32 pyb.sync() [all …]
|
H A D | i2c_error.py | 3 import pyb 4 from pyb import I2C 11 pyb.Accel() 17 pyb.disable_irq() 19 pyb.enable_irq() 21 pyb.disable_irq() 24 pyb.enable_irq() 29 pyb.disable_irq() 31 pyb.enable_irq() 33 pyb.disable_irq() [all …]
|
H A D | irq.py | 1 import pyb 6 i1 = pyb.disable_irq() 8 pyb.enable_irq() # by default should enable IRQ 11 pyb.delay(10) 14 i1 = pyb.disable_irq() 15 i2 = pyb.disable_irq() 17 pyb.enable_irq(i2) 18 pyb.enable_irq(i1) 21 pyb.delay(10)
|
H A D | timer_callback.py | 3 import pyb 4 from pyb import Timer 31 pyb.delay(5) 33 pyb.delay(15) 37 pyb.delay(5) 39 pyb.delay(15) 45 pyb.delay(5) 47 pyb.delay(15) 52 pyb.delay(5) 54 pyb.delay(15)
|
H A D | led.py | 1 import os, pyb 5 leds = [pyb.LED(i) for i in range(1, 5)] 8 leds = [pyb.LED(i) for i in range(1, 4)] 22 pyb.delay(100) 25 pyb.delay(100) 31 pyb.delay(100) 38 pyb.delay(1) 42 pyb.delay(1)
|
H A D | dac.py | 1 import pyb 3 if not hasattr(pyb, "DAC"): 7 dac = pyb.DAC(1) 12 dac.write_timed(bytearray(10), 100, mode=pyb.DAC.NORMAL) 13 pyb.delay(20) 17 dac = pyb.DAC(1, buffering=True)
|
/dports/devel/eric6/eric6-21.11/eric/eric6/APIs/MicroPython/ |
H A D | micropython.api | 389 pyb.ADC?1(pin) 395 pyb.Accel?1() 465 pyb.LED?1(id) 469 pyb.Pin.IN?7 494 pyb.RTC?1() 495 pyb.SPI.LSB?7 497 pyb.SPI.MSB?7 592 pyb.rng?4() 594 pyb.stop?4() 595 pyb.sync?4() [all …]
|
/dports/devel/eric6/eric6-21.11/eric/eric6/APIs/Python3/ |
H A D | micropython.api | 392 pyb.ADC?1(pin) 398 pyb.Accel?1() 468 pyb.LED?1(id) 472 pyb.Pin.IN?7 497 pyb.RTC?1() 498 pyb.SPI.LSB?7 500 pyb.SPI.MSB?7 595 pyb.rng?4() 597 pyb.stop?4() 598 pyb.sync?4() [all …]
|
/dports/lang/micropython/micropython-1.17/tools/mpremote/mpremote/ |
H A D | main.py | 209 def do_disconnect(pyb): argument 211 if pyb.mounted: 215 if pyb.in_raw_repl: 222 pyb.close() 300 def do_repl(pyb, args): argument 339 pyb, 373 pyb = None 409 if pyb is None: 423 pyb = None 454 if pyb is None: [all …]
|
/dports/lang/micropython/micropython-1.17/docs/pyboard/ |
H A D | quickref.rst | 61 See :ref:`pyb.LED <pyb.LED>`. :: 88 See :ref:`pyb.Pin <pyb.Pin>`. :: 102 See :ref:`pyb.Servo <pyb.Servo>`. :: 124 See :ref:`pyb.Timer <pyb.Timer>`. :: 136 See :ref:`pyb.RTC <pyb.RTC>` :: 147 See :ref:`pyb.Pin <pyb.Pin>` and :ref:`pyb.Timer <pyb.Timer>`. :: 159 See :ref:`pyb.Pin <pyb.Pin>` and :ref:`pyb.ADC <pyb.ADC>`. :: 169 See :ref:`pyb.Pin <pyb.Pin>` and :ref:`pyb.DAC <pyb.DAC>`. :: 179 See :ref:`pyb.UART <pyb.UART>`. :: 190 See :ref:`pyb.SPI <pyb.SPI>`. :: [all …]
|
/dports/lang/micropython/micropython-1.17/examples/SDdatalogger/ |
H A D | boot.py | 9 import pyb 11 pyb.LED(3).on() # indicate we are waiting for switch press 12 pyb.delay(2000) # wait for user to maybe press the switch 13 switch_value = pyb.Switch()() # sample the switch at end of delay 14 pyb.LED(3).off() # indicate that we finished waiting for the switch 16 pyb.LED(4).on() # indicate that we are selecting the mode 19 pyb.usb_mode("VCP+MSC") 20 pyb.main("cardreader.py") # if switch was pressed, run this 22 pyb.usb_mode("VCP+HID") 23 pyb.main("datalogger.py") # if switch wasn't pressed, run this [all …]
|
H A D | datalogger.py | 4 import pyb 7 accel = pyb.Accel() 8 blue = pyb.LED(4) 9 switch = pyb.Switch() 16 pyb.wfi() 20 pyb.delay(200) # delay avoids detection of multiple presses 26 t = pyb.millis() # get time 33 pyb.delay(200) # delay avoids detection of multiple presses
|
/dports/devel/gettext-tools/gettext-0.21/gettext-tools/tests/ |
H A D | format-python-brace-1 | 6 cat <<\EOF > f-pyb-1.data 54 cat <<EOF > f-pyb-1-$n.in 57 ${XGETTEXT} -L Python -o f-pyb-1-$n.po f-pyb-1-$n.in || Exit 1 58 test -f f-pyb-1-$n.po || Exit 1 61 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 67 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 75 cat f-pyb-1-$n.in 1>&2 77 cat f-pyb-1-$n.po 1>&2 80 rm -f f-pyb-1-$n.in f-pyb-1-$n.po 81 done < f-pyb-1.data
|
H A D | format-python-brace-2 | 6 cat <<\EOF > f-pyb-2.data 39 cat <<EOF > f-pyb-2-$n.po 46 if ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po; then 52 ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po 2> /dev/null 61 cat f-pyb-2-$n.po 1>&2 64 rm -f f-pyb-2-$n.po f-pyb-2-$n.mo 65 done < f-pyb-2.data
|
/dports/devel/gettext-runtime/gettext-0.21/gettext-tools/tests/ |
H A D | format-python-brace-1 | 6 cat <<\EOF > f-pyb-1.data 54 cat <<EOF > f-pyb-1-$n.in 57 ${XGETTEXT} -L Python -o f-pyb-1-$n.po f-pyb-1-$n.in || Exit 1 58 test -f f-pyb-1-$n.po || Exit 1 61 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 67 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 75 cat f-pyb-1-$n.in 1>&2 77 cat f-pyb-1-$n.po 1>&2 80 rm -f f-pyb-1-$n.in f-pyb-1-$n.po 81 done < f-pyb-1.data
|
H A D | format-python-brace-2 | 6 cat <<\EOF > f-pyb-2.data 39 cat <<EOF > f-pyb-2-$n.po 46 if ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po; then 52 ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po 2> /dev/null 61 cat f-pyb-2-$n.po 1>&2 64 rm -f f-pyb-2-$n.po f-pyb-2-$n.mo 65 done < f-pyb-2.data
|
/dports/devel/gettext-po-mode/gettext-0.21/gettext-tools/tests/ |
H A D | format-python-brace-1 | 6 cat <<\EOF > f-pyb-1.data 54 cat <<EOF > f-pyb-1-$n.in 57 ${XGETTEXT} -L Python -o f-pyb-1-$n.po f-pyb-1-$n.in || Exit 1 58 test -f f-pyb-1-$n.po || Exit 1 61 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 67 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 75 cat f-pyb-1-$n.in 1>&2 77 cat f-pyb-1-$n.po 1>&2 80 rm -f f-pyb-1-$n.in f-pyb-1-$n.po 81 done < f-pyb-1.data
|
H A D | format-python-brace-2 | 6 cat <<\EOF > f-pyb-2.data 39 cat <<EOF > f-pyb-2-$n.po 46 if ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po; then 52 ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po 2> /dev/null 61 cat f-pyb-2-$n.po 1>&2 64 rm -f f-pyb-2-$n.po f-pyb-2-$n.mo 65 done < f-pyb-2.data
|
/dports/devel/libtextstyle/gettext-0.21/gettext-tools/tests/ |
H A D | format-python-brace-1 | 6 cat <<\EOF > f-pyb-1.data 54 cat <<EOF > f-pyb-1-$n.in 57 ${XGETTEXT} -L Python -o f-pyb-1-$n.po f-pyb-1-$n.in || Exit 1 58 test -f f-pyb-1-$n.po || Exit 1 61 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 67 if grep python-brace-format f-pyb-1-$n.po > /dev/null; then 75 cat f-pyb-1-$n.in 1>&2 77 cat f-pyb-1-$n.po 1>&2 80 rm -f f-pyb-1-$n.in f-pyb-1-$n.po 81 done < f-pyb-1.data
|
H A D | format-python-brace-2 | 6 cat <<\EOF > f-pyb-2.data 39 cat <<EOF > f-pyb-2-$n.po 46 if ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po; then 52 ${MSGFMT} --check-format -o f-pyb-2-$n.mo f-pyb-2-$n.po 2> /dev/null 61 cat f-pyb-2-$n.po 1>&2 64 rm -f f-pyb-2-$n.po f-pyb-2-$n.mo 65 done < f-pyb-2.data
|
/dports/lang/micropython/micropython-1.17/examples/ |
H A D | pins.py | 4 import pyb 25 pyb.Pin.IN: "IN", 26 pyb.Pin.OUT_PP: "OUT_PP", 27 pyb.Pin.OUT_OD: "OUT_OD", 28 pyb.Pin.AF_PP: "AF_PP", 29 pyb.Pin.AF_OD: "AF_OD", 30 pyb.Pin.ANALOG: "ANALOG", 32 pull_str = {pyb.Pin.PULL_NONE: "", pyb.Pin.PULL_UP: "PULL_UP", pyb.Pin.PULL_DOWN: "PULL_DOWN"} 38 pin = pyb.Pin(pin_name) 43 if pin_mode == pyb.Pin.AF_PP or pin_mode == pyb.Pin.AF_OD:
|
/dports/lang/micropython/micropython-1.17/docs/library/ |
H A D | pyb.ExtInt.rst | 1 .. currentmodule:: pyb 19 extint = pyb.ExtInt(pin, pyb.ExtInt.IRQ_FALLING, pyb.Pin.PULL_UP, callback) 35 extint = pyb.ExtInt(pin, mode, pull, callback) 37 Valid modes are pyb.ExtInt.IRQ_RISING, pyb.ExtInt.IRQ_FALLING, 38 pyb.ExtInt.IRQ_RISING_FALLING, pyb.ExtInt.EVT_RISING, 39 pyb.ExtInt.EVT_FALLING, and pyb.ExtInt.EVT_RISING_FALLING. 44 Valid pull values are pyb.Pin.PULL_UP, pyb.Pin.PULL_DOWN, pyb.Pin.PULL_NONE. 54 .. class:: pyb.ExtInt(pin, mode, pull, callback) 64 - ``pyb.Pin.PULL_NONE`` - no pull up or down resistors; 65 - ``pyb.Pin.PULL_UP`` - enable the pull-up resistor; [all …]
|
H A D | pyb.Pin.rst | 1 .. currentmodule:: pyb 15 x1_pin = pyb.Pin.board.X1 17 g = pyb.Pin(pyb.Pin.board.X1, pyb.Pin.IN) 26 g = pyb.Pin('X1', pyb.Pin.OUT_PP) 32 g = pyb.Pin("LeftMotorDir", pyb.Pin.OUT_OD) 44 pyb.Pin.mapper(MyMapper) 46 So, if you were to call: ``pyb.Pin("LeftMotorDir", pyb.Pin.OUT_PP)`` 77 .. class:: pyb.Pin(id, ...) 231 x3 = pyb.Pin.board.X3 246 pin = pyb.Pin(pyb.Pin.board.X3, mode=pyb.Pin.AF_PP, af=pyb.Pin.AF1_TIM2) [all …]
|
/dports/lang/micropython/micropython-1.17/tests/ |
H A D | run-internalbench.py | 22 def run_tests(pyb, test_dict): argument 31 if pyb is None: 41 pyb.enter_raw_repl() 43 output_mupy = pyb.execfile(test_file).replace(b"\r\n", b"\n") 74 pyb = pyboard.Pyboard("/dev/ttyACM0") 75 pyb.enter_raw_repl() 77 pyb = None 80 if pyb is None: 102 if not run_tests(pyb, test_dict):
|
/dports/lang/micropython/micropython-1.17/docs/pyboard/tutorial/ |
H A D | lcd_skin.rst | 29 >>> import pyb 30 >>> lcd = pyb.LCD('X') 36 import pyb 37 lcd = pyb.LCD('X') 43 pyb.delay(25) 53 >>> import pyb 54 >>> i2c = pyb.I2C(1, pyb.I2C.CONTROLLER) 69 >>> import pyb 71 >>> m = mpr121.MPR121(pyb.I2C(1, pyb.I2C.CONTROLLER)) 74 ... pyb.delay(100) [all …]
|