Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-bluefruitconnect
IntroductionThis module helps you to communicate with the Adafruit Bluefruit Connect app or use its protocols.DependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bluefruitconnectTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bluefruitconnectTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bluefruitconnectUsage ExampleNormally this library is used with theAdafruit_CircuitPython_BluefruitConnectlibrary
(adafruit_bluefruit_connect). The included examples use that library.
Below is a simple standalone example.fromadafruit_bluefruit_connect.color_packetimportColorPacketfromadafruit_bluefruit_connect.gyro_packetimportGyroPacket# [uart setup omitted]color_packet=ColorPacket((70,75,80))gyro_packet=GyroPacket.from_bytes(packet_buf)uart.write(gyro_packet.to_bytes())DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bluefruitspi
IntroductionHelper class to work with the Adafruit Bluefruit LE SPI Friend.DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bluefruitspiTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bluefruitspiTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bluefruitspiUsage Example# A simple echo test for the Feather M0 Bluefruit# Sets the name, then echo's all RX'd data with a reversed packetimporttimeimportbusioimportboardfromdigitalioimportDigitalInOutfromadafruit_bluefruitspiimportBluefruitSPIspi_bus=busio.SPI(board.SCK,MOSI=board.MOSI,MISO=board.MISO)cs=DigitalInOut(board.D8)irq=DigitalInOut(board.D7)rst=DigitalInOut(board.D4)bluefruit=BluefruitSPI(spi_bus,cs,irq,rst,debug=False)# Initialize the device and perform a factory resetprint("Initializing the Bluefruit LE SPI Friend module")bluefruit.init()bluefruit.command_check_OK(b'AT+FACTORYRESET',delay=1)# Print the response to 'ATI' (info request) as a stringprint(str(bluefruit.command_check_OK(b'ATI'),'utf-8'))# Change advertised namebluefruit.command_check_OK(b'AT+GAPDEVNAME=BlinkaBLE')whileTrue:print("Waiting for a connection to Bluefruit LE Connect ...")# Wait for a connection ...dotcount=0whilenotbluefruit.connected:print(".",end="")dotcount=(dotcount+1)%80ifdotcount==79:print("")time.sleep(0.5)# Once connected, check for incoming BLE UART dataprint("\n*Connected!*")connection_timestamp=time.monotonic()whileTrue:# Check our connection status every 3 secondsiftime.monotonic()-connection_timestamp>3:connection_timestamp=time.monotonic()ifnotbluefruit.connected:break# OK we're still connected, see if we have any data waitingresp=bluefruit.uart_rx()ifnotresp:continue# nothin'print("Read%dbytes:%s"%(len(resp),resp))# Now write it!print("Writing reverse...")send=[]foriinrange(len(resp),0,-1):send.append(resp[i-1])print(bytes(send))bluefruit.uart_tx(bytes(send))print("Connection lost.")DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bme280
IntroductionI2C and SPI driver for the Bosch BME280 Temperature, Humidity, and Barometric Pressure sensorInstallation and DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure that the driver and all dependencies are available on the
CircuitPython filesystem.  This can be most easily achieved by downloading and
installing the latestAdafruit library and driver bundleon your device.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bme280To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bme280To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bme280Installing to a connected CircuitPython DeviceSome devices, eg. the QT-PY, are very limited in memory. The BME280 library contains
two variants - basic and advanced - which give different levels of functionality.Installing the BME280 library could have the following outcomes:It installs successfully and your code runs successfully. Woo-hoo! Continue with
your amazing project.It installs successfully and your code fails to run with a memory allocation
error. Try one of the following:If yourcode.pyis large, especially if it has lots of comments, you
can shrink it into a.mpyfile instead. See the AdafruitLearn Guideon shrinking your code.Only use the basic BME280 implementation, and remove the following file:<CIRCUITPY>/lib/adafruit_bme280/advanced.mpywhere <CIRCUITPY> is the
mounted location of your device. Make sure that your code only uses the basic
implementation.Usage Exampleimportboardimporttimefromadafruit_bme280importbasicasadafruit_bme280# Create sensor object, using the board's default I2C bus.i2c=board.I2C()# uses board.SCL and board.SDAbme280=adafruit_bme280.Adafruit_BME280_I2C(i2c)# change this to match the location's pressure (hPa) at sea levelbme280.sea_level_pressure=1013.25whileTrue:print("\nTemperature:%0.1fC"%bme280.temperature)print("Humidity:%0.1f%%"%bme280.relative_humidity)print("Pressure:%0.1fhPa"%bme280.pressure)print("Altitude =%0.2fmeters"%bme280.altitude)time.sleep(2)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bme680
IntroductionCircuitPython driver for BME680 sensor over I2CDependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bme680To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bme680To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bme680Usage Exampleimportadafruit_bme680importtimeimportboard# Create sensor object, communicating over the board's default I2C busi2c=board.I2C()# uses board.SCL and board.SDAbme680=adafruit_bme680.Adafruit_BME680_I2C(i2c)# change this to match the location's pressure (hPa) at sea levelbme680.sea_level_pressure=1013.25whileTrue:print("\nTemperature:%0.1fC"%bme680.temperature)print("Gas:%dohm"%bme680.gas)print("Humidity:%0.1f%%"%bme680.relative_humidity)print("Pressure:%0.3fhPa"%bme680.pressure)print("Altitude =%0.2fmeters"%bme680.altitude)time.sleep(2)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bmp280
IntroductionCircuitPython driver from BMP280 Temperature and Barometic Pressure sensorInstallation and DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driverfrom PyPI. To install
for the current user:pip3installadafruit-circuitpython-bmp280To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bmp280To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bmp280Usage Exampleimporttimeimportboard# import digitalio # For use with SPIimportadafruit_bmp280# Create sensor object, communicating over the board's default I2C busi2c=board.I2C()# uses board.SCL and board.SDAbmp280=adafruit_bmp280.Adafruit_BMP280_I2C(i2c)# OR Create sensor object, communicating over the board's default SPI bus# spi = board.SPI()# bmp_cs = digitalio.DigitalInOut(board.D10)# bmp280 = adafruit_bmp280.Adafruit_BMP280_SPI(spi, bmp_cs)# change this to match the location's pressure (hPa) at sea levelbmp280.sea_level_pressure=1013.25whileTrue:print("\nTemperature:%0.1fC"%bmp280.temperature)print("Pressure:%0.1fhPa"%bmp280.pressure)print("Altitude =%0.2fmeters"%bmp280.altitude)time.sleep(2)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bmp3xx
IntroductionCircuitPython driver from BMP3XX Temperature and Barometric Pressure sensor.DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bmp3xxTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bmp3xxTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bmp3xxUsage ExampleSee usage examples in the examples folder.DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bno055
IntroductionDependenciesThis driver depends on theRegisterandBus Devicelibraries.
Please ensure they are also available on the CircuitPython filesystem.  This is
easily achieved by downloadinga library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bno055To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bno055To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bno055Usage NotesOf course, you must import the library to use it:importadafruit_bno055This driver takes an instantiated and active I2C object as an argument to its
constructor.  The way to create an I2C object depends on the board you are
using. For boards with labeled SCL and SDA pins, you can:importboardi2c=board.I2C()Once you have the I2C object, you can create the sensor object:sensor=adafruit_bno055.BNO055_I2C(i2c)And then you can start reading the measurements:print(sensor.temperature)print(sensor.euler)print(sensor.gravity)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bno08x
IntroductionHelper library for the Hillcrest Laboratories BNO08x IMUsDependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bno08xTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bno08xTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bno08xUsage Exampleimportboardimportbusiofromadafruit_bno08x.i2cimportBNO08X_I2Cfromadafruit_bno08ximportBNO_REPORT_ACCELEROMETERi2c=busio.I2C(board.SCL,board.SDA)bno=BNO08X_I2C(i2c)bno.enable_feature(BNO_REPORT_ACCELEROMETER)whileTrue:accel_x,accel_y,accel_z=bno.acceleration# pylint:disable=no-memberprint("X:%0.6fY:%0.6fZ:%0.6fm/s^2"%(accel_x,accel_y,accel_z))DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-bno08x-rvc
IntroductionA simple helper library for using the UART-RVC mode of the BNO08x IMUsDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-bno08x-rvcTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-bno08x-rvcTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-bno08x-rvcUsage Exampleimporttimeimportboardimportbusiofromadafruit_bno08x_rvcimportBNO08x_RVCuart=busio.UART(board.TX,board.RX,baudrate=115200,receiver_buffer_size=2048)rvc=BNO08x_RVC(uart)whileTrue:roll,pitch,yaw,x_accel,y_accel,z_accel=rvc.headingprint("Roll:%2.2fPitch:%2.2fYaw:%2.2fDegrees"%(roll,pitch,yaw))print("Acceleration X:%2.2fY:%2.2fZ:%2.2fm/s^2"%(x_accel,y_accel,z_accel))print("")time.sleep(0.1)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-boardtest
IntroductionBoard test suite for CircuitPython. Run these tests to ensure that a CircuitPython port was created correctly, individual pin mappings are correct, and buses (e.g. SPI) work.Tests can be run individually. Copy code found in eachboardtest_<name>.pymodule to your CIRCUITPYTHON device drive, and rename the filecode.py.Alternatively, tests can be imported as modules. Copy the desired test file to CIRCUITPYTHON device drive and import the test in your own code. Each test can be run with therun_test(pins)function.Theboardtest_simpletest.py(inexamples/) shows how to call tests from within a script.boardtest_simpletest.pyruns the following tests:LED TestGPIO TestVoltage Monitor TestUART TestSPI TestI2C TestDependenciesThis test suite depends on:Adafruit CircuitPythonBus DeviceSD CardPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Usage ExampleYou will need the following components:Multimeter1xLED1x 330 Ohm resistor or220 Ohm resistor2x4.7k Ohm resistorMicrochip 25AA040A SPI EEPROMMicrochip AT24HC04B I2C EEPROMBreadboardWiresConnect the components as shown to your board. Note that you can use a 220 Ohm or 330 Ohm resistor for the LED.To use each test, copy the individual .py or .mpy test(s) into a folder named adafruit_boardtest in the CIRCUITPY drive, import the library, find the pins available on your board, and callboardtest_<testname>.run_test(pins). To run the GPIO test, for example:importboardfromadafruit_boardtestimportboardtest_gpio# List out all the pins available to uspins=[pforpindir(board)]print()print("All pins found:",end=' ')# Print pinsforpinpins:print(p,end=' ')print('\n')# Run testresult=run_test(pins)print()print(result[0])print("Pins tested: "+str(result[1]))DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-busdevice
Adafruit CircuitPython BusDeviceTheI2CDeviceandSPIDevicehelper classes make managing transaction state
on a bus easy. For example, they manage locking the bus to prevent other
concurrent access. For SPI devices, it manages the chip select and protocol
changes such as mode. For I2C, it manages the device address.NoteOn microcontroller boards using CircuitPython v6.3.0 or newer, the firmware
may already have theadafruit_bus_devicepackage builtin, thus there may be no
need to add this package to your CIRCUITPY drive’s “lib” directory. If both the
builtin and add-onadafruit_bus_devicepackages are present, then some
libraries that require this packagemighthave problems importing it.Please check theCircuitPython documentation’s “module support matrix”to make sure that your board’s firmware does include the builtinadafruit_bus_devicepackage.On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-busdeviceTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-busdeviceTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-busdeviceUsage ExampleSee examples/read_register_i2c.py and examples/read_register_spi.py for examples of the module’s usage.DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-cap1188
IntroductionCircuitPython driver for the CAP1188 8-Key Capacitive Touch Sensor Breakout.DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-cap1188To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-cap1188To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-cap1188Usage ExampleSee usage examples in the examples folder.DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ccs811
Adafruit CircuitPython CCS811 LibraryCircuitPython driver for theCCS811 air quality sensor.DependenciesThis driver depends on:Adafruit CircuitPythonBus DeviceRegisterPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ccs811To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ccs811To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ccs811Usage NotesSeethe guidefor wiring and installation instructions.Of course, you must import the library to use it:importbusioimportadafruit_ccs811Next, initialize the I2C bus object.fromboardimport*i2c=board.I2C()# uses board.SCL and board.SDAOnce you have created the I2C interface object, you can use it to instantiate
the CCS811 objectccs=adafruit_ccs811.CCS811(i2c)Reading SensorTo read the gas sensor simply read the attributes:print("CO2: ",ccs.eco2," TVOC:",ccs.tvoc)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.