Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-lsm303
IntroductionAdafruit CircuitPython module for the LSM303 6-DoF with 3-axis accelerometer and magnetometerDependenciesThis 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.Usage Exampleimporttimeimportboardimportbusioimportadafruit_lsm303i2c=busio.I2C(board.SCL,board.SDA)sensor=adafruit_lsm303.LSM303(i2c)whileTrue:raw_accel_x,raw_accel_y,raw_accel_z=sensor.raw_accelerationaccel_x,accel_y,accel_z=sensor.accelerationraw_mag_x,raw_mag_y,raw_mag_z=sensor.raw_magneticmag_x,mag_y,mag_z=sensor.magneticprint('Acceleration raw: ({0:6d},{1:6d},{2:6d}), (m/s^2): ({3:10.3f},{4:10.3f},{5:10.3f})'.format(raw_accel_x,raw_accel_y,raw_accel_z,accel_x,accel_y,accel_z))print('Magnetometer raw: ({0:6d},{1:6d},{2:6d}), (gauss): ({3:10.3f},{4:10.3f},{5:10.3f})'.format(raw_mag_x,raw_mag_y,raw_mag_z,mag_x,mag_y,mag_z))print('')time.sleep(1.0)ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.Building locallyTo build this library locally you’ll need to install thecircuitpython-build-toolspackage.python3-mvenv.envsource.env/bin/activatepipinstallcircuitpython-build-toolsOnce installed, make sure you are in the virtual environment:source.env/bin/activateThen run the build:circuitpython-build-bundles--filename_prefixadafruit-circuitpython-lsm303--library_location.Sphinx documentationSphinx is used to build the documentation based on rST files and comments in the code. First,
install dependencies (feel free to reuse the virtual environment from above):python3-mvenv.envsource.env/bin/activatepipinstallSphinxsphinx-rtd-themeNow, once you have the virtual environment activated:cddocssphinx-build-E-W-bhtml._build/htmlThis will output the documentation todocs/_build/html. Open the index.html in your browser to
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
locally verify it will pass.
Package: adafruit-circuitpython-lsm303-accel
IntroductionAdafruit CircuitPython module for the LSM303’s accelerometerDependenciesThis 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-lsm303_accelTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lsm303_accelTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lsm303_accelUsage Exampleimporttimeimportboardimportadafruit_lsm303_acceli2c=board.I2C()# uses board.SCL and board.SDAsensor=adafruit_lsm303_accel.LSM303_Accel(i2c)whileTrue:acc_x,acc_y,acc_z=sensor.accelerationprint('Acceleration (m/s^2): ({0:10.3f},{1:10.3f},{2:10.3f})'.format(acc_x,acc_y,acc_z))print('')time.sleep(1.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.
Package: adafruit-circuitpython-lsm303agr-mag
IntroductionAdafruit CircuitPython module for the LSM303AGR’s 3-axis magnetometerDependenciesThis 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.Usage Exampleimporttimeimportboardimportbusioimportadafruit_lsm303agr_magi2c=busio.I2C(board.SCL,board.SDA)sensor=adafruit_lsm303agr_mag.LSM303AGR_Mag(i2c)whileTrue:mag_x,mag_y,mag_z=sensor.magneticprint('Magnetometer (gauss): ({0:10.3f},{1:10.3f},{2:10.3f})'.format(mag_x,mag_y,mag_z))print('')time.sleep(1.0)ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.Building locallyTo build this library locally you’ll need to install thecircuitpython-build-toolspackage.python3-mvenv.envsource.env/bin/activatepipinstallcircuitpython-build-toolsOnce installed, make sure you are in the virtual environment:source.env/bin/activateThen run the build:circuitpython-build-bundles--filename_prefixadafruit-circuitpython-lsm303agr-mag--library_location.Sphinx documentationSphinx is used to build the documentation based on rST files and comments in the code. First,
install dependencies (feel free to reuse the virtual environment from above):python3-mvenv.envsource.env/bin/activatepipinstallSphinxsphinx-rtd-themeNow, once you have the virtual environment activated:cddocssphinx-build-E-W-bhtml._build/htmlThis will output the documentation todocs/_build/html. Open the index.html in your browser to
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
locally verify it will pass.
Package: adafruit-circuitpython-lsm303dlh-mag
IntroductionAdafruit CircuitPython module for the LSM303DLH’s 3-axis magnetometerNote that this is specifically intended for the LSM303DLHC, as opposed to the
LSM303DLH proper, which has the magnetic Y and Z orientations swapped.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-lsm303dlh_magTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lsm303dlh_magTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lsm303dlh_magUsage Exampleimporttimeimportboardimportadafruit_lsm303dlh_magi2c=board.I2C()# uses board.SCL and board.SDAsensor=adafruit_lsm303dlh_mag.LSM303DLH_Mag(i2c)whileTrue:mag_x,mag_y,mag_z=sensor.magneticprint('Magnetometer (gauss): ({0:10.3f},{1:10.3f},{2:10.3f})'.format(mag_x,mag_y,mag_z))print('')time.sleep(1.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.
Package: adafruit-circuitpython-lsm6ds
IntroductionCircuitPython helper library for the LSM6DS family of motion sensors from STDependenciesThis 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-lsm6dsTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lsm6dsTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lsm6dsUsage Exampleimporttimeimportboardfromadafruit_lsm6ds.lsm6dsoximportLSM6DSOXi2c=board.I2C()# uses board.SCL and board.SDAsox=LSM6DSOX(i2c)whileTrue:print("Acceleration: X:%.2f, Y:%.2f, Z:%.2fm/s^2"%(sox.acceleration))print("Gyro X:%.2f, Y:%.2f, Z:%.2fradians/s"%(sox.gyro))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-lsm6dsox
IntroductionCircuitPython library for the ST LSM6DSOX, LSM6DS33, and ISM330DHCT 6-dof Accelerometer and GyrosDependenciesThis 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-lsm6dsTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lsm6dsTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-circuitpython-lsm6dsUsage Exampleimporttimeimportboardimportbusioimportadafruit_lsm6dsi2c=busio.I2C(board.SCL,board.SDA)sox=adafruit_lsm6ds.LSM6DSOX(i2c)whileTrue:print("Acceleration: X:%.2f, Y:%.2f, Z:%.2fm/s^2"%(sox.acceleration))print("Gyro X:%.2f, Y:%.2f, Z:%.2fdegrees/s"%(sox.gyro))print("")time.sleep(0.5)ContributingContributions 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-lsm9ds0
IntroductionCircuitPython module for the LSM9DS0 accelerometer, magnetometer, gyroscope.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-lsm9ds0To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lsm9ds0To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lsm9ds0Usage Exampleimporttimeimportboardimportbusioimportadafruit_lsm9ds0i2c=busio.I2C(board.SCL,board.SDA)sensor=adafruit_lsm9ds0.LSM9DS0_I2C(i2c)whileTrue:accel_x,accel_y,accel_z=sensor.accelerationmag_x,mag_y,mag_z=sensor.magneticgyro_x,gyro_y,gyro_z=sensor.gyrotemp=sensor.temperatureprint('Acceleration (m/s^2): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(accel_x,accel_y,accel_z))print('Magnetometer (gauss): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(mag_x,mag_y,mag_z))print('Gyroscope (degrees/sec): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(gyro_x,gyro_y,gyro_z))print('Temperature:{0:0.3f}C'.format(temp))time.sleep(1.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.
Package: adafruit-circuitpython-lsm9ds1
IntroductionCircuitPython module for the LSM9DS1 accelerometer, magnetometer, gyroscope.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-lsm9ds1To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lsm9ds1To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lsm9ds1Usage ExampleSee examples/lsm9ds1_simpletest.py for a demo of the 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-ltr329-ltr303
IntroductionPython & CircuitPython driver for LTR-329 or LTR-303 light sensorsDependenciesThis 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.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-ltr329-ltr303To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ltr329-ltr303To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-circuitpython-ltr329-ltr303Installing 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:circupinstallltr329-ltr303Or the following command to update an existing version:circupupdateUsage ExampleUsage examples can be found in theexamples/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-ltr390
IntroductionAdafruit CircuitPython library for the LTR390DependenciesThis 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-ltr390To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ltr390To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ltr390Usage Exampleimporttimeimportboardimportadafruit_ltr390i2c=board.I2C()ltr=adafruit_ltr390.LTR390(i2c)whileTrue:print("UV:",ltr.uvs,"\t\tAmbient Light:",ltr.light)time.sleep(1.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.
Package: adafruit-circuitpython-macropad
IntroductionA helper library for the Adafruit MacroPad RP2040.DependenciesThis driver depends on:Adafruit CircuitPythonAdafruit’s CircuitPython NeoPixel libraryAdafruit’s CircuitPython HID libraryAdafruit’s CircuitPython MIDI libraryAdafruit’s CircuitPython Display Text libraryAdafruit’s CircuitPython Simple Text Display libraryAdafruit’s CircuitPython Debouncer libraryAdafruit’s CircuitPython Ticks libraryPlease 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.This library is designed to work withe the Adafruit MacroPad RP2040. Consider
purchasing one from the Adafruit shop:Adafruit MacroPad RP2040 Bare BonesAdafruit MacroPad RP2040 Starter KitInstalling 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_macropadOr the following command to update an existing version:circupupdateUsage ExampleThis example prints out the key pressed, the relative position of the rotary encoder and the
state of the rotary encoder switch.fromadafruit_macropadimportMacroPadimporttimemacropad=MacroPad()whileTrue:key_event=macropad.keys.events.get()ifkey_eventandkey_event.pressed:print("Key pressed:{}".format(key_event.key_number))print("Encoder:{}".format(macropad.encoder))print("Encoder switch:{}".format(macropad.encoder_switch))time.sleep(0.4)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-magtag
IntroductionHelper library for the Adafruit MagTag.DependenciesThis driver depends on:Adafruit CircuitPythonAdafruit PortalBasePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Usage Example# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries## SPDX-License-Identifier: Unlicenseimporttimeimportterminaliofromadafruit_magtag.magtagimportMagTagmagtag=MagTag()magtag.add_text(text_font=terminalio.FONT,text_position=(50,(magtag.graphics.display.height//2)-1,),text_scale=3,)magtag.set_text("Hello World")buttons=magtag.peripherals.buttonsbutton_colors=((255,0,0),(255,150,0),(0,255,255),(180,0,255))button_tones=(1047,1318,1568,2093)timestamp=time.monotonic()whileTrue:fori,binenumerate(buttons):ifnotb.value:print("Button%cpressed"%chr((ord("A")+i)))magtag.peripherals.neopixel_disable=Falsemagtag.peripherals.neopixels.fill(button_colors[i])magtag.peripherals.play_tone(button_tones[i],0.25)breakelse:magtag.peripherals.neopixel_disable=Truetime.sleep(0.01)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-matrixkeypad
IntroductionThis simple helper library lets you create objects that will scan and detect keypresses on passive matrix keypadsDependenciesThis 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-matrixkeypadTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-matrixkeypadTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-matrixkeypadUsage Exampleimportadafruit_matrixkeypadfromdigitalioimportDigitalInOutimportboard# Classic 3x4 matrix keypadcols=[DigitalInOut(x)forxin(board.D2,board.D0,board.D4)]rows=[DigitalInOut(x)forxin(board.D1,board.D6,board.D5,board.D3)]keys=((1,2,3),(4,5,6),(7,8,9),('*',0,'#'))keypad=adafruit_matrixkeypad.Matrix_Keypad(rows,cols,keys)whileTrue:keys=keypad.pressed_keysifkeys:print("Pressed: ",keys)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-matrixportal
IntroductionCircuitPython helper for Adafruit MatrixPortal M4, Adafruit RGB Matrix Shield + Metro M4 Airlift Lite,
and Adafruit RGB Matrix FeatherWingsDependenciesThis 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 Exampleimporttimeimportboardimportterminaliofromadafruit_matrixportal.matrixportalimportMatrixPortal# --- Display setup ---matrixportal=MatrixPortal(status_neopixel=board.NEOPIXEL,debug=True)# Create a new label with the color and text selectedmatrixportal.add_text(text_font=terminalio.FONT,text_position=(0,(matrixportal.graphics.display.height//2)-1),scrolling=True,)SCROLL_DELAY=0.03contents=[{'text':'THIS IS RED','color':'#cf2727'},{'text':'THIS IS BLUE','color':'#0846e4'},]whileTrue:forcontentincontents:matrixportal.set_text(content['text'])# Set the text colormatrixportal.set_text_color(content['color'])# Scroll itmatrixportal.scroll_text(SCROLL_DELAY)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-max1704x
IntroductionMAX17048 or MAX17049 battery fuel gauge libraryDependenciesThis 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.This library is intended to work with the MAX17048 or MAX17049 battery fuel gauge
Python/CircuitPython library.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-max1704xTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-max1704xTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-max1704xInstalling 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_max1704xOr the following command to update an existing version:circupupdateUsage ExampleSee usage examples of this library in theexamples/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.