Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-husb238
IntroductionCircuitPython helper library for the HUSB238 Type C Power Delivery Dummy BreakoutDependenciesThis 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 bundleor individual libraries can be installed usingcircup.The HUSB238 USB PD sink chip is neat in that you can either use jumpers (really, resistor selection) to set the desired power delivery voltage and current or you can use I2C for dynamic querying and setting.We’ve built a nice Adafruit USB Type C Power Delivery Dummy Breakout board around the HUSB238 to make it very easy to configure and integrate without having to solder any tiny resistors.Purchase one from the Adafruit shopInstalling from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI.
To install for current user:pip3installadafruit-circuitpython-husb238To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-husb238To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.env/bin/activatepip3installadafruit-circuitpython-husb238Installing to a Connected CircuitPython Device with CircupMake sure that you havecircupinstalled in your Python environment.
Install it with the following command if necessary:pip3installcircupWithcircupinstalled and your CircuitPython device connected use the
following command to install:circupinstalladafruit_husb238Or the following command to update an existing version:circupupdateUsage Exampleimporttimeimportboardimportadafruit_husb238i2c=board.I2C()# Initialize HUSB238pd=adafruit_husb238.Adafruit_HUSB238(i2c)voltages=pd.available_voltages()v=0whileTrue:ifpd.is_attached():print(f"Setting to{voltages[v]}V!")pd.value=voltages[v]pd.set_value()current=pd.read_current()volts=pd.read_voltage()response=pd.get_response()print(f"The PD chip returned a response of:{response}")print(f"It is set to{volts}V/{current}")print()v=(v+1)%len(voltages)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-hx8357
Introductiondisplayio Driver for HX8357 Displays such as the 3.5-inch TFT FeatherWing and BreakoutDependenciesThis 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.Usage Exampleimportboardimportdisplayiofromadafruit_hx8357importHX8357spi=board.SPI()tft_cs=board.D9tft_dc=board.D10displayio.release_displays()display_bus=displayio.FourWire(spi,command=tft_dc,chip_select=tft_cs)display=HX8357(display_bus,width=480,height=320)# Make the display contextsplash=displayio.Group()display.show(splash)color_bitmap=displayio.Bitmap(480,320,1)color_palette=displayio.Palette(1)color_palette[0]=0xFF0000bg_sprite=displayio.TileGrid(color_bitmap,pixel_shader=color_palette,x=0,y=0)splash.append(bg_sprite)whileTrue:passDocumentationAPI 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-icm20649
IntroductionLibrary for the ST ICM-20649 Wide-Range 6-DoF Accelerometer and GyroDependenciesThis 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-icm20649To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-icm20649To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-circuitpython-icm20649Usage ExampleContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.DocumentationFor information on building library documentation, please check outthis guide.
Package: adafruit-circuitpython-icm20x
IntroductionLibrary for the ST ICM-20X Wide-Range 6-DoF Accelerometer and Gyro FamilyDependenciesThis 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-icm20xTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-icm20xTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-icm20xUsage ExampleFor use with the ICM20649:importtimeimportboardimportadafruit_icm20xi2c=board.I2C()# uses board.SCL and board.SDAicm=adafruit_icm20x.ICM20649(i2c)whileTrue:print("Acceleration: X:%.2f, Y:%.2f, Z:%.2fm/s^2"%(icm.acceleration))print("Gyro X:%.2f, Y:%.2f, Z:%.2frads/s"%(icm.gyro))print("")time.sleep(0.5)For use with the ICM20948:importtimeimportboardimportadafruit_icm20xi2c=board.I2C()# uses board.SCL and board.SDAicm=adafruit_icm20x.ICM20948(i2c)whileTrue:print("Acceleration: X:%.2f, Y:%.2f, Z:%.2fm/s^2"%(icm.acceleration))print("Gyro X:%.2f, Y:%.2f, Z:%.2frads/s"%(icm.gyro))print("Magnetometer X:%.2f, Y:%.2f, Z:%.2fuT"%(icm.magnetic))print("")time.sleep(0.5)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-il0373
IntroductionCircuitPythondisplayiodriver for IL0373-based ePaper displaysDependenciesThis 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-il0373To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-il0373To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-il0373Usage ExampleDocumentationAPI 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-il0398
IntroductionCircuitPython displayio drivers for IL0398 driven e-paper displaysDependenciesThis 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-il0398To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-il0398To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-il0398Usage Example"""Simple test script for 4.2" 400x300 black and white displays.

Supported products:
  * WaveShare 4.2" Black and White
    * https://www.waveshare.com/product/modules/oleds-lcds/e-paper/4.2inch-e-paper.htm
    * https://www.waveshare.com/product/modules/oleds-lcds/e-paper/4.2inch-e-paper-module.htm
  """importtimeimportboardimportdisplayioimportfourwireimportadafruit_il0398displayio.release_displays()# This pinout works on a Feather M4 and may need to be altered for other boards.spi=board.SPI()# Uses SCK and MOSIepd_cs=board.D9epd_dc=board.D10epd_reset=board.D5epd_busy=board.D6display_bus=fourwire.FourWire(spi,command=epd_dc,chip_select=epd_cs,reset=epd_reset,baudrate=1000000)time.sleep(1)display=adafruit_il0398.IL0398(display_bus,width=400,height=300,seconds_per_frame=20,busy_pin=epd_busy)g=displayio.Group()f=open("/display-ruler.bmp","rb")pic=displayio.OnDiskBitmap(f)# CircuitPython 6 & 7 compatiblet=displayio.TileGrid(pic,pixel_shader=getattr(pic,"pixel_shader",displayio.ColorConverter()))# CircuitPython 7 compatible only# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)g.append(t)display.root_group=gdisplay.refresh()time.sleep(120)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-il91874
IntroductionCircuitPythondisplayiodriver for IL91874-based ePaper displaysDependenciesThis 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-il91874To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-il91874To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-il91874Usage Example"""Simple test script for 2.7" 264x176 Tri-Color display shield

Supported products:
  * Adafruit 2.7" Tri-Color ePaper Display Shield
    * https://www.adafruit.com/product/4229
  """importtimeimportboardimportbusioimportdisplayioimportadafruit_il91874displayio.release_displays()spi=board.SPI()epd_cs=board.D10epd_dc=board.D9display_bus=displayio.FourWire(spi,command=epd_dc,chip_select=epd_cs,baudrate=1000000)time.sleep(1)display=adafruit_il91874.IL91874(display_bus,width=264,height=176,highlight_color=0xff0000,rotation=90)g=displayio.Group()f=open("/display-ruler.bmp","rb")pic=displayio.OnDiskBitmap(f)# CircuitPython 6 & 7 compatiblet=displayio.TileGrid(pic,pixel_shader=getattr(pic,"pixel_shader",displayio.ColorConverter()))# CircuitPython 7 compatible only# t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader)g.append(t)display.root_group=gdisplay.refresh()print("refreshed")time.sleep(120)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-ili9341
Introductiondisplayio driver for ILI9341 and ILI9340 TFT-LCD displays.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.Usage Exampleimportboardimportdisplayioimportfourwireimportadafruit_ili9341spi=board.SPI()tft_cs=board.D9tft_dc=board.D10displayio.release_displays()display_bus=fourwire.FourWire(spi,command=tft_dc,chip_select=tft_cs)display=adafruit_ili9341.ILI9341(display_bus,width=320,height=240)# Make the display contextsplash=displayio.Group()display.root_group=splashcolor_bitmap=displayio.Bitmap(320,240,1)color_palette=displayio.Palette(1)color_palette[0]=0xFF0000bg_sprite=displayio.TileGrid(color_bitmap,pixel_shader=color_palette,x=0,y=0)splash.append(bg_sprite)whileTrue:passDocumentationAPI 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-imageload
IntroductionThis library decodes an image file into new bitmap and palette objects of the provided type. It’s
designed to load code needed during decoding as needed. This is meant to minimize the memory
overhead of the decoding code.Only certain types of bitmaps work with this library, and they often have to be exported in specific ways. To find out what types are supported and how to make them, seethis learn guide page.Usage Exampleimportboardimportdisplayioimportadafruit_imageloadimage,palette=adafruit_imageload.load("images/4bit.bmp",bitmap=displayio.Bitmap,palette=displayio.Palette)tile_grid=displayio.TileGrid(image,pixel_shader=palette)group=displayio.Group()group.append(tile_grid)board.DISPLAY.root_group=groupwhileTrue:passDocumentationAPI 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-ina219
IntroductionCircuitPython driver for theINA219 current 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-ina219To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ina219To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ina219Usage ExampleseeexampleDocumentationAPI 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-ina260
IntroductionCircuitPython driver for the TI INA260 current and power sensorDependenciesThis 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 PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!
If the library is not planned for PyPI, remove the entire ‘Installing from PyPI’ section.
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ina260To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ina260To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ina260Usage Exampleimport time
import board
import adafruit_ina260

i2c = board.I2C()
ina260 = adafruit_ina260.INA260(i2c)
while True:
    print("Current: %.2f Voltage: %.2f Power:%.2f"
        %(ina260.current, ina260.voltage, ina260.power))
    time.sleep(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-irremote
IntroductionCircuitPython driver for use with IR Receivers.Examples of products to use this library with:Circuit Playground ExpressIR Receiver SensorDependenciesThis 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-irremoteTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-irremoteTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-irremoteUsage Example# Circuit Playground Express Demo Code# Adjust the pulseio 'board.PIN' if using something elseimportpulseioimportboardimportadafruit_irremotepulsein=pulseio.PulseIn(board.REMOTEIN,maxlen=120,idle_state=True)decoder=adafruit_irremote.GenericDecode()whileTrue:pulses=decoder.read_pulses(pulsein)print("Heard",len(pulses),"Pulses:",pulses)try:code=decoder.decode_bits(pulses)print("Decoded:",code)exceptadafruit_irremote.IRNECRepeatException:# unusual short code!print("NEC repeat!")exceptadafruit_irremote.IRDecodeExceptionase:# failed to decodeprint("Failed to decode: ",e.args)print("----------------------------")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-is31fl3731
IntroductionCircuitPython driver for the IS31FL3731 charlieplex IC.This driver supports the following hardware:Adafruit 16x9 Charlieplexed PWM LED Matrix Driver - IS31FL3731Adafruit 15x7 CharliePlex LED Matrix Display FeatherWingsAdafruit 16x8 CharliePlex LED Matrix BonnetsPimoroni 17x7 Scroll pHAT HDPimoroni 28x3 (r,g,b) Led ShimPimoroni Keybow 2040 with 4x4 matrix of RGB LEDsPimoroni 5x5 RGB Matrix BreakoutDependenciesThis 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-is31fl3731To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-is31fl3731To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-is31fl3731Usage ExampleMatrix:fromadafruit_is31fl3731.matriximportMatriximportboardimportbusiowithbusio.I2C(board.SCL,board.SDA)asi2c:display=Matrix(i2c)display.fill(127)Charlie Wing:fromadafruit_is31fl3731.charlie_wingimportCharlieWingimportboardimportbusiowithbusio.I2C(board.SCL,board.SDA)asi2c:display=CharlieWing(i2c)display.fill(127)# Turn off pixel 4,4, change its brightness and turn it back ondisplay.pixel(4,4,0)# Turn off.display.pixel(4,4,50)# Low brightness (50)display.pixel(4,4,192)# Higher brightness (192)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-is31fl3741
IntroductionCircuitPython driver for the IS31FL3741 RGB Matrix IC.This driver supports the following hardware: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-is31fl3741To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-is31fl3741To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-is31fl3741Usage ExampleMatrix:fromadafruit_is31fl3741.matriximportMatriximportboardimportbusiowithbusio.I2C(board.SCL,board.SDA)asi2c:display=Matrix(i2c)display.fill(127)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-itertools
IntroductionPython’s itertools for CircuitPythonDependenciesThis 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.Usage Exampleimporttimeimportboardimportbusioimportadafruit_si7021fromadafruit_itertools.adafruit_itertoolsimportcountfromadafruit_itertools.adafruit_itertools_extrasimportrepeatfunci2c=busio.I2C(board.SCL,board.SDA)sensor=adafruit_si7021.SI7021(i2c)defread_temperature():returnsensor.temperaturedefnow():returntime.monotonic()datapoints=zip(count(1),repeatfunc(now),map(int,repeatfunc(read_temperature)))whileTrue:print(next(datapoints))time.sleep(20.0)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.