• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python micropython.const函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中micropython.const函数的典型用法代码示例。如果您正苦于以下问题:Python const函数的具体用法?Python const怎么用?Python const使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了const函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: const

* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
"""
import time

from micropython import const

import adafruit_bus_device.spi_device as spidev


__version__ = "1.2.3"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git"


# pylint: disable=bad-whitespace
# Internal constants:
_REG_FIFO            = const(0x00)
_REG_OP_MODE         = const(0x01)
_REG_DATA_MOD        = const(0x02)
_REG_BITRATE_MSB     = const(0x03)
_REG_BITRATE_LSB     = const(0x04)
_REG_FDEV_MSB        = const(0x05)
_REG_FDEV_LSB        = const(0x06)
_REG_FRF_MSB         = const(0x07)
_REG_FRF_MID         = const(0x08)
_REG_FRF_LSB         = const(0x09)
_REG_VERSION         = const(0x10)
_REG_PA_LEVEL        = const(0x11)
_REG_RX_BW           = const(0x19)
_REG_AFC_BW          = const(0x1A)
_REG_RSSI_VALUE      = const(0x24)
_REG_DIO_MAPPING1    = const(0x25)
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:adafruit_rfm69.py


示例2: const

* Author(s): Tony DiCola, Michael McWethy
"""

import time

from micropython import const
from adafruit_bus_device import i2c_device, spi_device
import framebuf

__version__ = "2.4.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1306.git"

#pylint: disable-msg=bad-whitespace
# register definitions
SET_CONTRAST        = const(0x81)
SET_ENTIRE_ON       = const(0xa4)
SET_NORM_INV        = const(0xa6)
SET_DISP            = const(0xae)
SET_MEM_ADDR        = const(0x20)
SET_COL_ADDR        = const(0x21)
SET_PAGE_ADDR       = const(0x22)
SET_DISP_START_LINE = const(0x40)
SET_SEG_REMAP       = const(0xa0)
SET_MUX_RATIO       = const(0xa8)
SET_COM_OUT_DIR     = const(0xc0)
SET_DISP_OFFSET     = const(0xd3)
SET_COM_PIN_CFG     = const(0xda)
SET_DISP_CLK_DIV    = const(0xd5)
SET_PRECHARGE       = const(0xd9)
SET_VCOM_DESEL      = const(0xdb)
开发者ID:eiselekd,项目名称:hw,代码行数:30,代码来源:adafruit_ssd1306.py


示例3: const

  <https://www.adafruit.com/product/935>`_ (Product ID: 935)

**Software and Dependencies:**

* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
  https://github.com/adafruit/circuitpython/releases
"""
from micropython import const

__version__ = "1.1.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MCP4725.git"


# Internal constants:
_MCP4725_DEFAULT_ADDRESS = 0b01100010
_MCP4725_WRITE_FAST_MODE = const(0b00000000)


class MCP4725:
    """
    MCP4725 12-bit digital to analog converter.  This class has a similar
    interface as the CircuitPython AnalogOut class and can be used in place
    of that module.

    :param ~busio.I2C i2c: The I2C bus.
    :param int address: The address of the device if set differently from the default.
    """


    # Global buffer to prevent allocations and heap fragmentation.
    # Note this is not thread-safe or re-entrant by design!
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:adafruit_mcp4725.py


示例4: const

* Author(s): Original Raspberry Pi code by Tony DiCola, CircuitPython by ladyada,
             refactor by Carter Nelson

"""

__version__ = "2.0.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PN532.git"

import time
import adafruit_bus_device.i2c_device as i2c_device
from digitalio import Direction
from micropython import const
from adafruit_pn532.adafruit_pn532 import PN532, BusyError, _reset

# pylint: disable=bad-whitespace
_I2C_ADDRESS                   = const(0x24)

class PN532_I2C(PN532):
    """Driver for the PN532 connected over I2C."""
    def __init__(self, i2c, *, irq=None, reset=None, req=None, debug=False):
        """Create an instance of the PN532 class using I2C. Note that PN532
        uses clock stretching. Optional IRQ pin (not used),
        reset pin and debugging output.
        """
        self.debug = debug
        self._irq = irq
        self._req = req
        if reset:
            _reset(reset)
        self._i2c = i2c_device.I2CDevice(i2c, _I2C_ADDRESS)
        super().__init__(debug=debug, reset=reset)
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:i2c.py


示例5: Copyright

# Driver for official MicroPython LCD160CR display
# MIT license; Copyright (c) 2017 Damien P. George

from micropython import const
from utime import sleep_ms
from ustruct import calcsize, pack_into
import uerrno, machine

# for set_orient
PORTRAIT = const(0)
LANDSCAPE = const(1)
PORTRAIT_UPSIDEDOWN = const(2)
LANDSCAPE_UPSIDEDOWN = const(3)

# for set_startup_deco; can be or'd
STARTUP_DECO_NONE = const(0)
STARTUP_DECO_MLOGO = const(1)
STARTUP_DECO_INFO = const(2)

_uart_baud_table = {
    2400: 0,
    4800: 1,
    9600: 2,
    19200: 3,
    38400: 4,
    57600: 5,
    115200: 6,
    230400: 7,
    460800: 8,
}
开发者ID:fabaff,项目名称:micropython,代码行数:30,代码来源:lcd160cr.py


示例6: const

    import struct
except ImportError:
    import ustruct as struct

from micropython import const

import adafruit_bus_device.i2c_device as i2c_device


__version__ = "1.2.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MMA8451.git"


#pylint: disable=bad-whitespace
# Internal constants:
_MMA8451_DEFAULT_ADDRESS   = const(0x1D)
_MMA8451_REG_OUT_X_MSB     = const(0x01)
_MMA8451_REG_SYSMOD        = const(0x0B)
_MMA8451_REG_WHOAMI        = const(0x0D)
_MMA8451_REG_XYZ_DATA_CFG  = const(0x0E)
_MMA8451_REG_PL_STATUS     = const(0x10)
_MMA8451_REG_PL_CFG        = const(0x11)
_MMA8451_REG_CTRL_REG1     = const(0x2A)
_MMA8451_REG_CTRL_REG2     = const(0x2B)
_MMA8451_REG_CTRL_REG4     = const(0x2D)
_MMA8451_REG_CTRL_REG5     = const(0x2E)
_MMA8451_DATARATE_MASK     = const(0b111)
_SENSORS_GRAVITY_EARTH     = 9.80665

# External user-facing constants:
PL_PUF           = 0      # Portrait, up, front
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:adafruit_mma8451.py


示例7: const

This is a CircuitPython driver for the Bosch BNO055 nine degree of freedom
inertial measurement unit module with sensor fusion.

* Author(s): Radomir Dopieralski
"""
import time

from micropython import const
from adafruit_bus_device.i2c_device import I2CDevice
from adafruit_register.i2c_struct import Struct, UnaryStruct

__version__ = "3.0.4"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BNO055.git"

_CHIP_ID = const(0xa0)

CONFIG_MODE = const(0x00)
ACCONLY_MODE = const(0x01)
MAGONLY_MODE = const(0x02)
GYRONLY_MODE = const(0x03)
ACCMAG_MODE = const(0x04)
ACCGYRO_MODE = const(0x05)
MAGGYRO_MODE = const(0x06)
AMG_MODE = const(0x07)
IMUPLUS_MODE = const(0x08)
COMPASS_MODE = const(0x09)
M4G_MODE = const(0x0a)
NDOF_FMC_OFF_MODE = const(0x0b)
NDOF_MODE = const(0x0c)
开发者ID:eiselekd,项目名称:hw,代码行数:29,代码来源:adafruit_bno055.py


示例8: const

See:
    STM32Cube_FW_F4_V1.1.0/Drivers/BSP/Components/lis302dl/lis302dl.h
    STM32Cube_FW_F4_V1.1.0/Drivers/BSP/Components/lis302dl/lis302dl.c
    STM32Cube_FW_F4_V1.1.0/Drivers/BSP/STM32F4-Discovery/stm32f4_discovery.c
    STM32Cube_FW_F4_V1.1.0/Drivers/BSP/STM32F4-Discovery/stm32f4_discovery.h
    STM32Cube_FW_F4_V1.1.0/Drivers/BSP/STM32F4-Discovery/stm32f4_discovery_accelerometer.c
    STM32Cube_FW_F4_V1.1.0/Drivers/BSP/STM32F4-Discovery/stm32f4_discovery_accelerometer.h
    STM32Cube_FW_F4_V1.1.0/Projects/STM32F4-Discovery/Demonstrations/Src/main.c
"""

from micropython import const
from pyb import Pin
from pyb import SPI

READWRITE_CMD = const(0x80) 
MULTIPLEBYTE_CMD = const(0x40)
WHO_AM_I_ADDR = const(0x0f)
OUT_X_ADDR = const(0x29)
OUT_Y_ADDR = const(0x2b)
OUT_Z_ADDR = const(0x2d)
OUT_T_ADDR = const(0x0c)

LIS302DL_WHO_AM_I_VAL = const(0x3b)
LIS302DL_CTRL_REG1_ADDR = const(0x20)
# Configuration for 100Hz sampling rate, +-2g range
LIS302DL_CONF = const(0b01000111)

LIS3DSH_WHO_AM_I_VAL = const(0x3f)
LIS3DSH_CTRL_REG4_ADDR = const(0x20)
LIS3DSH_CTRL_REG5_ADDR = const(0x24)
开发者ID:Achimh3011,项目名称:micropython,代码行数:30,代码来源:staccel.py


示例9: const

"""
import time
import digitalio
from adafruit_register.i2c_bits import RWBits
from adafruit_register.i2c_bit import RWBit
from adafruit_bus_device.i2c_device import I2CDevice
from micropython import const


# ADDRESS_DEF = const(0x39)
# INTEGRATION_TIME_DEF = const(0x01)
# GAIN_DEF = const(0x01)

#pylint: disable-msg=bad-whitespace
#APDS9960_RAM        = const(0x00)
APDS9960_ENABLE     = const(0x80)
APDS9960_ATIME      = const(0x81)
#APDS9960_WTIME      = const(0x83)
#APDS9960_AILTIL     = const(0x84)
# APDS9960_AILTH      = const(0x85)
# APDS9960_AIHTL      = const(0x86)
# APDS9960_AIHTH      = const(0x87)
APDS9960_PILT       = const(0x89)
APDS9960_PIHT       = const(0x8B)
APDS9960_PERS       = const(0x8C)
# APDS9960_CONFIG1    = const(0x8D)
# APDS9960_PPULSE     = const(0x8E)
APDS9960_CONTROL    = const(0x8F)
# APDS9960_CONFIG2    = const(0x90)
APDS9960_ID         = const(0x92)
APDS9960_STATUS     = const(0x93)
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:apds9960.py


示例10: const

__version__ = "2.0.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_l3gd20.git"


from micropython import const
from adafruit_register.i2c_struct import Struct
try:
    from struct import unpack
except ImportError:
    from ustruct import unpack

__version__ = "2.0.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_L3GD20.git"

L3DS20_RANGE_250DPS = const(0)
L3DS20_RANGE_500DPS = const(1)
L3DS20_RANGE_2000DPS = const(2)

_L3GD20_REGISTER_CTRL_REG1 = const(0x20)
_L3GD20_REGISTER_CTRL_REG4 = const(0x23)

# _L3GD20_REGISTER_OUT_X_L = const(0x28)
_L3GD20_REGISTER_OUT_X_L_X80 = const(0xA8)
_L3GD20_REGISTER_OUT_X_L_X40 = const(0x68)

_ID_REGISTER = const(0x0F)

_L3GD20_CHIP_ID = const(0xD4)
_L3GD20H_CHIP_ID = const(0xD7)
开发者ID:eiselekd,项目名称:hw,代码行数:29,代码来源:adafruit_l3gd20.py


示例11: const

* Adafruit CircuitPython firmware (2.2.0+) for the ESP8622 and M0-based boards:
  https://github.com/adafruit/circuitpython/releases

* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
"""
try:
    import ustruct as struct
except ImportError:
    import struct

import adafruit_bus_device.i2c_device as i2c_dev
from micropython import const

# Register addresses and other constants:
# pylint: disable=bad-whitespace
_FXOS8700_ADDRESS               = const(0x1F)   # 0011111
_FXOS8700_ID                    = const(0xC7)   # 1100 0111
_FXOS8700_REGISTER_STATUS       = const(0x00)
_FXOS8700_REGISTER_OUT_X_MSB    = const(0x01)
_FXOS8700_REGISTER_OUT_X_LSB    = const(0x02)
_FXOS8700_REGISTER_OUT_Y_MSB    = const(0x03)
_FXOS8700_REGISTER_OUT_Y_LSB    = const(0x04)
_FXOS8700_REGISTER_OUT_Z_MSB    = const(0x05)
_FXOS8700_REGISTER_OUT_Z_LSB    = const(0x06)
_FXOS8700_REGISTER_WHO_AM_I     = const(0x0D)   # 11000111   r
_FXOS8700_REGISTER_XYZ_DATA_CFG = const(0x0E)
_FXOS8700_REGISTER_CTRL_REG1    = const(0x2A)   # 00000000   r/w
_FXOS8700_REGISTER_CTRL_REG2    = const(0x2B)   # 00000000   r/w
_FXOS8700_REGISTER_CTRL_REG3    = const(0x2C)   # 00000000   r/w
_FXOS8700_REGISTER_CTRL_REG4    = const(0x2D)   # 00000000   r/w
_FXOS8700_REGISTER_CTRL_REG5    = const(0x2E)   # 00000000   r/w
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:adafruit_fxos8700.py


示例12: const

# check that consts are not replaced in anything except standalone identifiers

from micropython import const

X = const(1)
Y = const(2)
Z = const(3)

# import that uses a constant
import micropython as X
print(globals()['X'])

# function name that matches a constant
def X():
    print('function X', X)
globals()['X']()

# arguments that match a constant
def f(X, *Y, **Z):
    pass
f(1)

# class name that matches a constant
class X:
    def f(self):
        print('class X', X)
globals()['X']().f()

# constant within a class
class A:
    C1 = const(4)
开发者ID:Achimh3011,项目名称:micropython,代码行数:31,代码来源:const2.py


示例13: const

"""
`adafruit_rgb_display.s6d02a1`
====================================================

A simple driver for the S6D02A1-based displays.

* Author(s): Radomir Dopieralski, Michael McWethy
"""

from micropython import const
from adafruit_rgb_display.rgb import DisplaySPI

__version__ = "3.1.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display.git"

_SWRESET = const(0x01)
_DISPON = const(0x29)
_SLEEPOUT = const(0x11)
_CASET = const(0x2a)
_PASET = const(0x2b)
_RAMWR = const(0x2c)
_RAMRD = const(0x2e)
_COLMOD = const(0x3a)
_MADCTL = const(0x36)

class S6D02A1(DisplaySPI):
    """
    A simple driver for the S6D02A1-based displays.

    >>> import busio
    >>> import digitalio
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:s6d02a1.py


示例14: const

**Software and Dependencies:**

* Adafruit CircuitPython firmware for the supported boards:
  https://github.com/adafruit/circuitpython/releases

* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
"""

from micropython import const

__version__ = "1.1.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_CAP1188.git"

# pylint: disable=bad-whitespace
_CAP1188_MID                = const(0x5D)
_CAP1188_PID                = const(0x50)
_CAP1188_MAIN_CONTROL       = const(0x00)
_CAP1188_GENERAL_STATUS     = const(0x02)
_CAP1188_INPUT_STATUS       = const(0x03)
_CAP1188_LED_STATUS         = const(0x04)
_CAP1188_NOISE_FLAGS        = const(0x0A)
_CAP1188_DELTA_COUNT        =(const(0x10),
                              const(0x11),
                              const(0x12),
                              const(0x13),
                              const(0x14),
                              const(0x15),
                              const(0x16),
                              const(0x17))
_CAP1188_SENSITIVTY         = const(0x1F)
开发者ID:eiselekd,项目名称:hw,代码行数:30,代码来源:cap1188.py


示例15: const

A simple driver for the ST7735-based displays.

* Author(s): Radomir Dopieralski, Michael McWethy
"""

try:
    import struct
except ImportError:
    import ustruct as struct
from micropython import const
from adafruit_rgb_display.rgb import DisplaySPI

__version__ = "3.1.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display.git"

_NOP = const(0x00)
_SWRESET = const(0x01)
_RDDID = const(0x04)
_RDDST = const(0x09)

_SLPIN = const(0x10)
_SLPOUT = const(0x11)
_PTLON = const(0x12)
_NORON = const(0x13)

_INVOFF = const(0x20)
_INVON = const(0x21)
_DISPOFF = const(0x28)
_DISPON = const(0x29)
_CASET = const(0x2A)
_RASET = const(0x2B)
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:st7735.py


示例16: const

* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
"""
import time
try:
    import ustruct as struct
except ImportError:
    import struct

import adafruit_bus_device.i2c_device as i2c_dev
from micropython import const


# Internal constants and register values:
# pylint: disable=bad-whitespace
_FXAS21002C_ADDRESS       = const(0x21)  # 0100001
_FXAS21002C_ID            = const(0xD7)       # 1101 0111
_GYRO_REGISTER_STATUS     = const(0x00)
_GYRO_REGISTER_OUT_X_MSB  = const(0x01)
_GYRO_REGISTER_OUT_X_LSB  = const(0x02)
_GYRO_REGISTER_OUT_Y_MSB  = const(0x03)
_GYRO_REGISTER_OUT_Y_LSB  = const(0x04)
_GYRO_REGISTER_OUT_Z_MSB  = const(0x05)
_GYRO_REGISTER_OUT_Z_LSB  = const(0x06)
_GYRO_REGISTER_WHO_AM_I   = const(0x0C)   # 11010111   r
_GYRO_REGISTER_CTRL_REG0  = const(0x0D)  # 00000000   r/w
_GYRO_REGISTER_CTRL_REG1  = const(0x13)  # 00000000   r/w
_GYRO_REGISTER_CTRL_REG2  = const(0x14)  # 00000000   r/w
_GYRO_SENSITIVITY_250DPS  = 0.0078125    # Table 35 of datasheet
_GYRO_SENSITIVITY_500DPS  = 0.015625     # ..
_GYRO_SENSITIVITY_1000DPS = 0.03125     # ..
开发者ID:eiselekd,项目名称:hw,代码行数:30,代码来源:adafruit_fxas21002c.py


示例17: const

* Adafruit CircuitPython firmware for the supported boards:
  https://github.com/adafruit/circuitpython/releases
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
"""

import time
import struct
import adafruit_bus_device.i2c_device as i2c_device
from micropython import const

__version__ = "1.0.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MPL115A2.git"

# pylint: disable=bad-whitespace
_MPL115A2_ADDRESS                   = const(0x60)
_MPL115A2_REGISTER_PRESSURE_MSB     = const(0x00)
_MPL115A2_REGISTER_A0_COEFF_MSB     = const(0x04)
_MPL115A2_REGISTER_STARTCONVERSION  = const(0x12)
# pylint: enable=bad-whitespace

class MPL115A2:
    """Driver for MPL115A2 I2C barometric pressure / temperature sensor."""
    def __init__(self, i2c, address=_MPL115A2_ADDRESS):
        self._i2c = i2c_device.I2CDevice(i2c, address)
        self._buf = bytearray(4)
        self._read_coefficients()

    @property
    def pressure(self):
        """The pressure in hPa."""
开发者ID:eiselekd,项目名称:hw,代码行数:30,代码来源:adafruit_mpl115a2.py


示例18: const

* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
  https://github.com/adafruit/circuitpython/releases
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
"""

import time

import adafruit_bus_device.i2c_device as i2c_device
from micropython import const

__version__ = "2.0.0"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_VL53L0X.git"

# Register addresses.  Unused registers commented out to save memory.
# pylint: disable=bad-whitespace
MPR121_I2CADDR_DEFAULT = const(0x5A)
MPR121_TOUCHSTATUS_L   = const(0x00)
#MPR121_TOUCHSTATUS_H   = const(0x01)
MPR121_FILTDATA_0L     = const(0x04)
#MPR121_FILTDATA_0H     = const(0x05)
MPR121_BASELINE_0      = const(0x1E)
MPR121_MHDR            = const(0x2B)
MPR121_NHDR            = const(0x2C)
MPR121_NCLR            = const(0x2D)
MPR121_FDLR            = const(0x2E)
MPR121_MHDF            = const(0x2F)
MPR121_NHDF            = const(0x30)
MPR121_NCLF            = const(0x31)
MPR121_FDLF            = const(0x32)
MPR121_NHDT            = const(0x33)
MPR121_NCLT            = const(0x34)
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:adafruit_mpr121.py


示例19: const

Example usage on ESP8266:

    import machine, sdcard, os
    sd = sdcard.SDCard(machine.SPI(0), machine.Pin(15))
    os.umount()
    os.VfsFat(sd, "")
    os.listdir()

"""

from micropython import const
import time


_CMD_TIMEOUT = const(100)

_R1_IDLE_STATE = const(1 << 0)
#R1_ERASE_RESET = const(1 << 1)
_R1_ILLEGAL_COMMAND = const(1 << 2)
#R1_COM_CRC_ERROR = const(1 << 3)
#R1_ERASE_SEQUENCE_ERROR = const(1 << 4)
#R1_ADDRESS_ERROR = const(1 << 5)
#R1_PARAMETER_ERROR = const(1 << 6)
_TOKEN_CMD25 = const(0xfc)
_TOKEN_STOP_TRAN = const(0xfd)
_TOKEN_DATA = const(0xfe)


class SDCard:
    def __init__(self, spi, cs):
开发者ID:Achimh3011,项目名称:micropython,代码行数:30,代码来源:sdcard.py


示例20: const

"""
import math
import time
from micropython import const
try:
    import struct
except ImportError:
    import ustruct as struct


__version__ = "2.2.1"
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BME280.git"

#    I2C ADDRESS/BITS/SETTINGS
#    -----------------------------------------------------------------------
_BME280_ADDRESS = const(0x77)
_BME280_CHIPID = const(0x60)

_BME280_REGISTER_CHIPID = const(0xD0)
_BME280_REGISTER_DIG_T1 = const(0x88)
_BME280_REGISTER_DIG_H1 = const(0xA1)
_BME280_REGISTER_DIG_H2 = const(0xE1)
_BME280_REGISTER_DIG_H3 = const(0xE3)
_BME280_REGISTER_DIG_H4 = const(0xE4)
_BME280_REGISTER_DIG_H5 = const(0xE5)
_BME280_REGISTER_DIG_H6 = const(0xE7)

_BME280_REGISTER_SOFTRESET = const(0xE0)
_BME280_REGISTER_CTRL_HUM = const(0xF2)
_BME280_REGISTER_STATUS = const(0xF3)
_BME280_REGISTER_CTRL_MEAS = const(0xF4)
开发者ID:eiselekd,项目名称:hw,代码行数:31,代码来源:adafruit_bme280.py



注:本文中的micropython.const函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python rng.rng函数代码示例发布时间:2022-05-27
下一篇:
Python micropython.alloc_emergency_exception_buf函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap