全文搜索结果:
- sht3x温湿度传感器 @micropython:mpy-lib:sensor
- 度 * SHT3x.**ht()**\\ 读取湿度和温度 * SHT3x.**config(mode = 0x240b, delay = 6, decimal = 1)** * mode, 测量命令. 请参考下面的 mode 表 * delay, 测量持续时间 * low repeatability, 4ms * Medium repeatability, 6... atus()**\\ 清除状态寄存器 * SHT3x.**reset()**\\ 软复位 **mode 表** ^ **mode** ^ **Repeatability** ^ **Measureme
- microbit上的life_game_生命游戏 @microbit:趣味程序:micropython
- from microbit import * def draw_cursor(universe, mode, x, y): if mode == "CONFIG": if cell_state(universe, x, y) == 0: display.set_pi... 0, 0,] cursor_x = 2 cursor_y = 2 mode = "CONFIG" display.scroll(mode) while True: if mode == "RUN": current_universe = evolv
- lsm6ds33陀螺仪传感器 @micropython:mpy-lib:sensor
- toggle() print('A:', gyr.a_raw()) gyr.wakeup_mode(True, Pin('PA6'), GYR_IRQ) </code> ---- <code p... self._power_g = 0x10 self._wakeup_mode = 0 if self.getreg(15) != 0x69: ... _CTRL2_G, self._scale_g<<1, 0xF1) def wakeup_mode(self, on = None, pin = None, callback = None, ths... if on == None: return self._wakeup_mode if on == True: self._wakeup_m
- microbit摩尔斯码发报机 @microbit:趣味程序:micropython
- . GHIJKLM give tones NOPQRS give channels T tutor mode UV power high/low WXYZ" di = 80 dah = 240 space =... . GHIJKLM give tones NOPQRS give channels T tutor mode UV power high/low WXYZ" def menu(*command): g... conf[2] = i # elif x is 20: pass #tutor mode needs creating elif x is 21: #power hi U ... ept: display.scroll('-') tx = 1 #exit command mode. def receiver(): global tx message = ''
- lis2dw12 @micropython:mpy-lib:sensor
- 0, 0] self._power = 0x20 # ODR=5 MODE=0 LP=1 self.setreg(LIS2DW12_CTRL1, 0x51) ... self.setreg(LIS2DW12_CTRL2, 0x0C) # SLP_MODE_SEL=1 self.setreg(LIS2DW12_CTRL3, 0x02) ... self.scale(self._scale) self.oneshot_mode(False) def int16(self, d): r... self.setreg(reg, self.rb[0]) def oneshot_mode(self, oneshot=None): if oneshot is None:
- mpl115a1驱动 @microbit:micropython:驱动库
- n15, cs=pin16, baudrate=1000000, mode=0, altitude=0.0): self.cs = cs se... enable(False) spi.init(baudrate=baudrate, mode=mode, sclk=sclk, miso=miso, mosi=mosi) self._get_coefficients() self.P = 0 # measured
- 步进电机驱动_pca9685 @microbit:micropython:驱动库
- n(self, servoIndexList, directionList, stepCount, mode=FULL_STEP, delay=3): for x in range(stepCount): for y in range(len(mode)): for z in range(len(servoIndexL... List[servoIndexList[z]] bit = mode[::directionList[z]][y] self.p
- bmp280气压传感器 @micropython:mpy-lib:sensor
- _P9 = self.short(self.get2Reg(0x9E)) self.mode = 3 self.osrs_p = 3 self.osrs_t =... (self.getPress()/101325)**(1/5.255)) # sleep mode def poweroff(self): self.setReg(0xF4, 0) # normal mode def poweron(self): self.setReg(0xF4,
- bme280温湿度气压传感器 @micropython:mpy-lib:sensor
- >127: self.dig_H6 -= 256 self.mode = 3 self.osrs_p = 3 self.osrs_t =... (self.getPress()/101325)**(1/5.255)) # sleep mode def poweroff(self): self.setReg(0xF4, 0) # normal mode def poweron(self): self.setReg(0xF4,
- demo @micropython:开发板:pyesp32
- = (n + 1) % 64 T0 = Timer(1) T0.init(period=20, mode=Timer.PERIODIC, callback=breathing) </code> ---... n = (n + 1) % 64 T0 = Timer(1) T0.init(period=50, mode=Timer.PERIODIC, callback=breathing) </code>
- lis2mdl @micropython:mpy-lib:sensor
- (reg) + self.getreg(reg+1) * 256 def oneshot_mode(self, oneshot=None): if oneshot is None: ... if self.oneshot: self.oneshot_mode(1) while 1: if self.g
- hts221 @micropython:mpy-lib:sensor
- self.setreg(0x20, 0x85) self.oneshot_mode(0) def oneshot_mode(self, oneshot = None): if oneshot is None: return self.one
- esp32快速指南 @micropython:主要硬件平台:esp32
- mport Timer tim = Timer(-1) tim.init(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1)) tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2)) </cod
- esp8266快速指南 @micropython:主要硬件平台:esp8266
- port Timer tim = Timer(-1) tim.init(period=5000, mode=Timer.ONE_SHOT, callback=lambda t:print(1)) tim.init(period=2000, mode=Timer.PERIODIC, callback=lambda t:print(2)) </cod
- stts751温度传感器 @micropython:mpy-lib:sensor
- self.oneshot = False self.oneshot_mode(False) def int16(self, d): return d ... (STTS751_REG_CONFIG, self.rb[0]) def oneshot_mode(self, oneshot=None): if oneshot is None: