Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-dotstar
Adafruit CircuitPython DotStarHigher level DotStar driver that presents the strip as a sequence. It is the
same api as theNeoPixel library.Colors are stored as tuples by default. However, you can also use int hex syntax
to set values similar to colors on the web. For example,0x100000(#100000on the web) is equivalent to(0x10, 0, 0).If you send a tuple with 4 values, you can control the brightness value, which appears in DotStar but not NeoPixels.
It should be a float. For example, (0xFF,0,0, 1.0) is the brightest red possible, (1,0,0,0.01) is the dimmest red possible.NoteThe int hex API represents the brightness of the white pixel when
present by setting the RGB channels to identical values. For example, full
white is 0xffffff but is actually (0xff, 0xff, 0xff) in the tuple syntax.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-dotstarTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-dotstarTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-dotstarUsage ExampleThis example demonstrates the library with the single built-in DotStar on theTrinket M0andGemma M0.importboardimportadafruit_dotstarpixels=adafruit_dotstar.DotStar(board.APA102_SCK,board.APA102_MOSI,1)pixels[0]=(10,0,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-dps310
IntroductionLibrary for the DPS310 Precision Barometric Pressure 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 PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-dps310To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-dps310To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-dps310Installing to a connected CircuitPython DeviceSome devices, eg. the QT-PY, are very limited in memory. The DPS310 library contains
two variants - basic and advanced - which give different levels of functionality.Installing the DPS310 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 DPS310 implementation, and remove the following file:<CIRCUITPY>/lib/adafruit_dps310/advanced.mpywhere <CIRCUITPY> is the
mounted location of your device. Make sure that your code only uses the basic
implementation.Usage Exampleimporttimeimportboardfromadafruit_dps310.basicimportDPS310i2c=board.I2C()# uses board.SCL and board.SDAdps310=DPS310(i2c)whileTrue:print("Temperature =%.2f*C"%dps310.temperature)print("Pressure =%.2fhPa"%dps310.pressure)print("")time.sleep(1.0)Known IssuesLibrary extensive features might not be compatible with memory limited boards. For these kind of
boards you need to use theadafruit_dps310/basic.mpy, the file needs to be in thempyformat in order to fit in memory.
For boards with more memory available you could use the code present
inadafruit_dps310/advanced.py. For usage refer todps310_simpletest_advanced.pyDocumentationAPI 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-drv2605
IntroductionCircuitPython module for the DRV2605 haptic feedback motor driver.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-drv2605To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-drv2605To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-drv2605Usage ExampleSee examples/drv2605_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-ds1307
IntroductionThis is a great battery-backed real time clock (RTC) that allows your
microcontroller project to keep track of time even if it is reprogrammed,
or if the power is lost. Perfect for datalogging, clock-building,
time stamping, timers and alarms, etc. The DS1307 is the most popular
RTC - but it requires 5V power to work.The DS1307 is simple and inexpensive but not a high precision device. It may
lose or gain up to two seconds a day. For a high-precision, temperature
compensated alternative, please check out theDS3231 precision RTC.
If you do not need a DS1307, or you need a 3.3V-power/logic capable RTC
please check out our affordablePCF8523 RTC breakout.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-ds1307To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ds1307To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ds1307Usage NotesOf course, you must import the library to use it:importboardimportadafruit_ds1307importtimeAll the Adafruit RTC libraries take an instantiated and active I2C object
(from theboardlibrary) as an argument to their 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:importboardNow, to initialize the I2C bus:i2c=board.I2C()Once you have created the I2C interface object, you can use it to instantiate
the RTC object:rtc=adafruit_ds1307.DS1307(i2c)To set the time, you need to setdatetimeto atime.struct_timeobject:rtc.datetime=time.struct_time((2017,1,9,15,6,0,0,9,-1))After the RTC is set, you retrieve the time by reading thedatetimeattribute and access the standard attributes of a struct_time such astm_year,tm_hourandtm_min.t=rtc.datetimeprint(t)print(t.tm_hour,t.tm_min)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-ds1841
IntroductionCircuitPython library for the Maxim DS1841 I2C Logarithmic ResistorDependenciesThis 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-ds1841To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ds1841To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ds1841Usage Examplefromtimeimportsleepimportboardimportbusioimportadafruit_ds1841fromanalogioimportAnalogIn####### NOTE ################# this example will not work with Blinka/rasberry Pi due to the lack of analog pins.# Blinka and Raspberry Pi users should run the "ds1841_blinka_simpletest.py" example# WIRING:# 1 Wire connecting  VCC to RH to make a voltage divider using the#   internal resistor between RH and RW# 2 Wire connecting RW to A0i2c=busio.I2C(board.SCL,board.SDA)ds1841=adafruit_ds1841.DS1841(i2c)wiper_output=AnalogIn(board.A0)whileTrue:ds1841.wiper=127print("Wiper set to%d"%ds1841.wiper)voltage=wiper_output.valuevoltage*=3.3voltage/=65535print("Wiper voltage:%.2f"%voltage)print("")sleep(1.0)ds1841.wiper=0print("Wiper set to%d"%ds1841.wiper)voltage=wiper_output.valuevoltage*=3.3voltage/=65535print("Wiper voltage:%.2f"%voltage)print("")sleep(1.0)ds1841.wiper=63print("Wiper set to%d"%ds1841.wiper)voltage=wiper_output.valuevoltage*=3.3voltage/=65535print("Wiper voltage:%.2f"%voltage)print("")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-ds18x20
IntroductionCircuitPython driver for Dallas 1-Wire temperature sensor.DependenciesThis driver depends on:Adafruit CircuitPythonAdafruit OneWirePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Usage Exampleimportboardfromadafruit_onewire.busimportOneWireBusfromadafruit_ds18x20importDS18X20ow_bus=OneWireBus(board.D2)ds18=DS18X20(ow_bus,ow_bus.scan()[0])ds18.temperatureDocumentationAPI 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-ds2413
IntroductionCircuitPython driver for the DS2413 one wire 2 channel GPIO breakout.DependenciesThis driver depends on:Adafruit CircuitPythonAdafruit OneWireNote:This library depends on the OneWire library and willnotwork on the Raspberry PiPlease 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-ds2413To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ds2413To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ds2413Usage Exampleimporttimeimportboardfromadafruit_onewire.busimportOneWireBusimportadafruit_ds2413ow_bus=OneWireBus(board.D2)ds=adafruit_ds2413.DS2413(ow_bus,ow_bus.scan()[0])led=ds.IOAbutton=ds.IOBbutton.direction=adafruit_ds2413.INPUTwhilenotbutton.value:led.value=Truetime.sleep(0.5)led.value=Falsetime.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-ds3502
IntroductionCircuitPython library for the Maxim DS3502 I2C PotentiometerDependenciesThis 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-ds3502To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ds3502To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ds3502Usage Examplefromtimeimportsleepimportboardimportadafruit_ds3502fromanalogioimportAnalogIn####### NOTE ################# this example will not work with Blinka/rasberry Pi due to the lack of analog pins.# Blinka and Raspberry Pi users should run the "ds3502_blinka_simpletest.py" examplei2c=board.I2C()ds3502=adafruit_ds3502.DS3502(i2c)wiper_output=AnalogIn(board.A0)whileTrue:ds3502.wiper=127print("Wiper set to%d"%ds3502.wiper)voltage=wiper_output.valuevoltage*=3.3voltage/=65535print("Wiper voltage:%.2f"%voltage)print("")sleep(1.0)ds3502.wiper=0print("Wiper set to%d"%ds3502.wiper)voltage=wiper_output.valuevoltage*=3.3voltage/=65535print("Wiper voltage:%.2f"%voltage)print("")sleep(1.0)ds3502.wiper=63print("Wiper set to%d"%ds3502.wiper)voltage=wiper_output.valuevoltage*=3.3voltage/=65535print("Wiper voltage:%.2f"%voltage)print("")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-ducky
IntroductionCircuitPython library for running DuckyScriptDuckyScriptYou can find the DuckyScript DocumentationhereDependenciesThis driver depends on:Adafruit CircuitPythonPlease 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.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-duckyTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-duckyTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-duckyInstalling 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_duckyOr the following command to update an existing version:circupupdateUsage ExampleHere is an example of using the Ducky library.
First you will need to import the librariesimporttimeimportusb_hidfromadafruit_hid.keyboardimportKeyboardfromadafruit_hid.keyboard_layout_usimportKeyboardLayoutUSimportduckyOnce this is done, define the keyboard layout and initialize theDuckyobject.time.sleep(1)# Sleep for a bit to avoid a race condition on some systemskeyboard=Keyboard(usb_hid.devices)keyboard_layout=KeyboardLayoutUS(keyboard)# We're in the US :)duck=ducky.Ducky('duckyscript.txt',keyboard,keyboard_layout)Now, set up a loop which will run a line of the script every timeloopis called.result=TruewhileresultisnotFalse:result=duck.loop()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-dymoscale
IntroductionCircuitPython interface forDYMOpostage scales.NOTE: This library will not work on embedded linux, only on microcontrollers.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-dymoscaleTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-dymoscaleTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-dymoscaleUsage ExampleInitialize the scale by passing it a data pin and a pin to toggle the units button:# initialize the dymo scaleunits_pin=digitalio.DigitalInOut(board.D3)units_pin.switch_to_output()dymo=adafruit_dymoscale.DYMOScale(board.D4,units_pin)Get the item’s weight from the scale:reading=dymo.weightprint(reading.weight)Get the item’s units from the scale:print(reading.units)To toggle between units (simulate a button press):dymo.toggle_unit_button(switch_unit=True)To toggle the unit button, but preserve the unit displayed:dymo.toggle_unit_button()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-ek79686
IntroductionCircuitPythondisplayiodriver for EK79686-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 bundleor individual libraries can be installed usingcircup.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-ek79686To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ek79686To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.env/bin/activatepip3installadafruit-circuitpython-ek79686Installing 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_ek79686Or the following command to update an existing version:circupupdateUsage Exampleimporttimeimportboardimportdisplayioimportadafruit_ek79686# Used to ensure the display is free in CircuitPythondisplayio.release_displays()# Define the pins needed for display use on the Metrospi=board.SPI()epd_cs=board.D10epd_dc=board.D9epd_reset=board.D5epd_busy=board.D6# Create the displayio connection to the display pinsdisplay_bus=displayio.FourWire(spi,command=epd_dc,chip_select=epd_cs,reset=epd_reset,baudrate=1000000)time.sleep(1)# Wait a bit# Create the display object - the third color is red (0xff0000)display=adafruit_ek79686.EK79686(display_bus,width=264,height=176,busy_pin=epd_busy,highlight_color=0xFF0000,rotation=90,)# Create a display group for our screen objectsg=displayio.Group()# Display a ruler graphic from the root directory of the CIRCUITPY drivewithopen("/display-ruler.bmp","rb")asf:pic=displayio.OnDiskBitmap(f)# Create a Tilegrid with the bitmap and put in the displayio group# 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)# Place the display group on the screen (does not refresh)display.show(g)# Show the image on the displaydisplay.refresh()print("refreshed")# Do Not refresh the screen more often than every 180 seconds#   for eInk displays! Rapid refreshes will damage the panel.time.sleep(180)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-emc2101
IntroductionCircuitPython driver for EMC2101 brushless fan controllerDependenciesThis 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-emc2101To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-emc2101To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-emc2101Usage Exampleimporttimeimportboardfromadafruit_emc2101importEMC2101i2c=board.I2C()# uses board.SCL and board.SDAemc=EMC2101(i2c)print("Setting fan speed to 25%")emc.manual_fan_speed=25time.sleep(2)# longer sleep to let it spin down from 100%print("Fan speed",emc.fan_speed)Additional examples, including the use of the temperature look up table
(LUT) can be found in the examples/ folder:emc2101_lut_example.pyemc2101_set_pwm_freq.pyemc2101_simpletest.pyFor access to some additional properties, but without configuring the LUT,
use the intermediate class EMC2101_EXT:importtimeimportboardfromadafruit_emc2101importEMC2101_EXTi2c=board.I2C()# uses board.SCL and board.SDAemc=EMC2101_EXT(i2c)print("External limit temp is",emc.external_temp_high_limit)print("Setting external limit temp to 50C")emc.external_temp_high_limit=50When the temperature limits are exceeded the device sets the alert bit
in the status register and (if configured to do so) will raise the ALERT
output pin as an interrupt.EMC2101_EXT defines properties for internal and external temperature
limits, and has register definitions for all registers except the LUT
itself. The EMC2101_LUT class includes this as well.The EMC2101_Regs class is intended for internal use, and defines register
addresses.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.