全文搜索结果:
- micropython程序优化实例 @micropython:代码和程序
- code python> from machine import Pin import time led = Pin('A13') N = 200000 t0 = time.ticks_us() for i in range(N): led.on() led.off() t1 = time.ticks_us() dt = time.ticks_diff(t1, t0) fmt = '{:5.3f} sec, {:6.3f} usec... * 1e3)) </code> :!:我们将这段代码保存为文件led1.py,然后import led1执行。在pybv10或者pyboardCN上结果是: <code> 3.381 sec, 16.
- pyboard快速指南 @micropython:主要硬件平台:stm32
- /code> **内部LED** <code python> from pyb import LED led = LED(1) # 1=red, 2=green, 3=yellow, 4=blue led.toggle() led.on() led.off() # LEDs 3 and 4 support PWM inte
- demo @micropython:开发板:pyesp32
- ====== pyESP32 demo ====== LED <code python> # pyESP32 LED demo from machine import Pin from time import sleep_ms LED=Pin(12, Pin.OUT) while 1: LED(not LED()) sleep_ms(200) </code> ---- 呼吸灯 <code python> # py
- 用pascal开发microbit @micropython:mpy-lib:misc
- 1; GPIO_PIN_CNF_DIR_Output = 1; microbit_led_col1 = 4; microbit_led_row1 = 13; var i : longint; begin GPIO.PIN_CNF[microbit_led_col1]:=(GPIO_PIN_CNF_INPUT_Disconnect shl 1) or G... PIO_PIN_CNF_DIR_Output; GPIO.PIN_CNF[microbit_led_row1]:=(GPIO_PIN_CNF_INPUT_Disconnect shl 1) or G
- demo @circuitpython:开发板:clue:demo
- CircuitPython_NeoPixel ---- ====== 基本功能 ====== LED CLUE开发板有两组LED,正面的两个白光LED和反面的红色LED。 <code python> from adafruit_clue import clue clue.red_led = True clue.white_leds = True </code> 板载 NeoPixel RGB LED(pixel) <code python> from adafruit_clue import c
- programmable_io @micropython:开发板:rpipico:demo
- n import time @asm_pio(set_init=PIO.OUT_LOW) def led_quarter_brightness(): set(pins, 0) [2] set(pins, 1) @asm_pio(set_init=PIO.OUT_LOW) def led_half_brightness(): set(pins, 0) set(pins, 1) @asm_pio(set_init=PIO.OUT_HIGH) def led_full_brightness(): set(pins, 1) sm1 = StateMachine(1, led_quarter_brightness, freq=10000, set_base=Pin(25))
- 可爱的变色led头饰 @创意diy
- d头饰_效果3.jpeg?600|}} [[https://www.hackster.io/alexandracovor/circuit-sculpture-led-tiara-50aad7|项目链接]]
- 用microbit控制树莓派的gpio @microbit:趣味程序:micropython
- python> import serial, time from gpiozero import LED port = "/dev/ttyACM0" baud = 115200 led = LED(18) while True: s = serial.Serial(port) s.baudrate = baud data = s.readline() data = str(data) if "on" in data: led.on() print("On") </code> 最后在树莓派的GPIO上连接电
- 闪灯 @micropython:开发板:rpipico:demo
- 可以通过将GPIO25设置为输出控制LED。 <code python> from machine import Pin LED=Pin(25,Pin.OUT) LED(1) LED(0) </code>
- gobot_-_microbit_的_golang_framework @microbit:misc
- 不同的驱动程序,每个驱动程序对应不同的功能: * 加速计 * 按键 * IO * LED * 磁力计 * 温度 **LEDDriver** <code go> package ... button := gpio.NewButtonDriver(ubit, "0") led := gpio.NewLedDriver(ubit, "1") work := ... func(data interface{}) { led.On() }) button.On... func(data interface{}) { led.Off() }) } robot
- 用mbed开发microbit @microbit:misc
- * * All the LEDs on the micro:bit are part of the LED Matrix, * In order to get simple blinking behavio
- 触摸传感 @micropython:开发板:rpipico:demo
- y CWE from machine import * from utime import * led= Pin(25, Pin.OUT) led.value(0) send= Pin(16, Pin.OUT) # via 1meg resistor connected to touch pad send... , if two consecutive same levels detected led.value(1) elif actT1==False and lastT1==False: led.value(0) print(trigLevel,t1Val) # use with pl
- scrollbit_17x7_led阵列 @microbit:相关产品
- 17x7 高亮的像素阵列 * 独立的PWM亮度控制每个像素 * 使用IS31FL3731 LED 阵列驱动芯片 * 与micro:bit兼容 * 支持MakeCode和MicroPytho