Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-pcf8523
Introduction to Adafruit’s PCF8523 Real Time Clock (RTC) LibraryThis 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. Equipped with PCF8523 RTC - it can
run from 3.3V or 5V power & logic!The PCF8523 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 need a DS1307 for compatibility reasons, check out ourDS1307 RTC breakout.DependenciesThis 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-pcf8523To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pcf8523To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pcf8523Usage NotesBasicsOf course, you must import the library to use it:importtimefromadafruit_pcf8523.pcf8523importPCF8523All 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=PCF8523(i2c)Date and timeTo set the time, you need to set datetime` to 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)AlarmTo set the time, you need to setalarmto a tuple with atime.struct_timeobject and string representing the frequency such as “hourly”:rtc.alarm=(time.struct_time((2017,1,9,15,6,0,0,9,-1)),"daily")After the RTC is set, you retrieve the alarm status by reading thealarm_statusattribute. Once True, set it back to False to reset.ifrtc.alarm_status:print("wake up!")rtc.alarm_status=FalseDocumentationAPI 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-pcf8563
Introduction to Adafruit’s PCF8563 Real Time Clock (RTC) LibraryThis 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 PCF8563 is simple and inexpensive but not a high precision device.
It may lose or gain multiple seconds a day. For a high-precision,
temperature compensated alternative, please check out theDS3231 precision RTC.If you need a DS1307 for compatibility reasons, check out ourDS1307 RTC breakout.DependenciesThis 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-pcf8563To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pcf8563To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pcf8563Usage NotesBasicsOf course, you must import the library to use it:importbusiofromadafruit_pcf8563.pcf8563importPCF8563importtimeAll the Adafruit RTC libraries take an instantiated and active I2C object
(from thebusiolibrary) 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:fromboardimport*Now, to initialize the I2C bus:i2c_bus=board.I2C()Once you have created the I2C interface object, you can use it to instantiate
the RTC object:rtc=PCF8563(i2c_bus)Date and timeTo 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)AlarmTo set the time, you need to setalarmto a tuple with atime.struct_timeobject and string representing the frequency such as “hourly”:rtc.alarm=(time.struct_time((2017,1,9,15,6,0,0,9,-1)),"daily")After the RTC is set, you retrieve the alarm status by reading thealarm_statusattribute. Once True, set it back to False to reset.ifrtc.alarm_status:print("wake up!")rtc.alarm_status=FalseDocumentationAPI 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-pcf8574
IntroductionPython library for PCF8574 GPIO expanderDependenciesThis 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 bundleor individual libraries can be installed usingcircup.Designed for use with the Adafruit PCF8574 GPIO expander breakout board.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-pcf8574To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pcf8574To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pcf8574Installing 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_pcf8574Or the following command to update an existing version:circupupdateUsage ExampleExample usage of the library 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-pcf8575
IntroductionCircuitPython library for Adafruit PCF8575 GPIO expanderDependenciesThis 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 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-pcf8575To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pcf8575To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-circuitpython-pcf8575Installing 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_pcf8575Or the following command to update an existing version:circupupdateUsage ExampleSee theexamples/folder for usage examples.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-pcf8591
IntroductionADC+DAC ComboDependenciesThis 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-pcf8591To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pcf8591To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pcf8591Usage Exampleimporttimeimportboardimportadafruit_pcf8591.pcf8591asPCFfromadafruit_pcf8591.analog_inimportAnalogInfromadafruit_pcf8591.analog_outimportAnalogOut############# AnalogOut & AnalogIn Example ############################ This example shows how to use the included AnalogIn and AnalogOut# classes to set the internal DAC to output a voltage and then measure# it with the first ADC channel.## Wiring:# Connect the DAC output to the first ADC channel, in addition to the# normal power and I2C connections######################################################################i2c=board.I2C()pcf=PCF.PCF8591(i2c)pcf_in_0=AnalogIn(pcf,PCF.A0)pcf_out=AnalogOut(pcf,PCF.OUT)whileTrue:print("Setting out to ",65535)pcf_out.value=65535raw_value=pcf_in_0.valuescaled_value=(raw_value/65535)*pcf_in_0.reference_voltageprint("Pin 0:%0.2fV"%(scaled_value))print("")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-pct2075
IntroductionCircuitPython library for theNXP PCT2075Digital Temperature SensorAlso supports the MicrochipTC74DependenciesThis 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-pct2075To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pct2075To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pct2075Usage Exampleimporttimeimportboardimportadafruit_pct2075i2c=board.I2C()# uses board.SCL and board.SDApct=adafruit_pct2075.PCT2075(i2c)whileTrue:print("Temperature:%.2fC"%pct.temperature)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-pioasm
IntroductionSimple assembler to convert pioasm to bytesDependenciesThis 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-pioasmTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pioasmTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pioasmUsage Exampleimporttimeimportrp2pioimportboardimportadafruit_pioasmsquarewave="""
.program squarewave
    set pins 1 [1]  ; Drive pin high and then delay for one cycle
    set pins 0      ; Drive pin low
"""assembled=adafruit_pioasm.assemble(squarewave)sm=rp2pio.StateMachine(assembled,frequency=2000,init=adafruit_pioasm.assemble("set pindirs 1"),first_set_pin=board.LED,)print("real frequency",sm.frequency)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-pixelbuf
IntroductionA pure Python implementation of adafruit_pixelbuf for smaller boards.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 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-pixelbufTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pixelbufTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pixelbufInstalling 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_pixelbufOr the following command to update an existing version:circupupdateUsage ExampleThis example tests that pixelbuf works.classTestBuf(adafruit_pixelbuf.PixelBuf):called=Falsedefshow(self):self.called=Truebuffer=TestBuf(20,bytearray(20*3),"RGB",1.0,auto_write=True)buffer[0]=(1,2,3)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-pixel-framebuf
IntroductionNeopixel and Dotstar Framebuffer HelperDependenciesThis driver depends on:Adafruit CircuitPythonAdafruit LED AnimationAdafruit framebufPlease 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-pixel-framebufTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pixel-framebufTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pixel-framebufUsage Example"""
This example runs on an Adafruit NeoPixel Feather
"""importboardimportneopixelfromadafruit_pixel_framebufimportPixelFramebufferpixel_pin=board.D6pixel_width=8pixel_height=4pixels=neopixel.NeoPixel(pixel_pin,pixel_width*pixel_height,brightness=0.1,auto_write=False,)pixel_framebuf=PixelFramebuffer(pixels,pixel_width,pixel_height,alternating=False,)pixel_framebuf.fill(0x000088)pixel_framebuf.pixel(5,1,0xFFFF00)pixel_framebuf.line(0,0,pixel_width-1,pixel_height-1,0x00FF00)pixel_framebuf.display()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-pixelmap
IntroductionCircuitPython library for mapping multiple neopixels to behave as one for the purposes of setting colors or showing animations.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 bundleor individual libraries can be installed usingcircup.NeoPixel ProductsInstalling from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI.
To install for current user:pip3installadafruit-circuitpython-pixelmapTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pixelmapTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.env/bin/activatepip3installadafruit-circuitpython-pixelmapInstalling 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_pixelmapOr the following command to update an existing version:circupupdateUsage Exampleimportboardimportneopixelimporttimefromadafruit_pixelmapimportPixelMap,horizontal_strip_gridmap,vertical_strip_gridmap# Update to match the pin connected to your NeoPixelspixel_pin=board.NEOPIXEL# Update to match the number of NeoPixels you have connectedpixel_num=32pixels=neopixel.NeoPixel(pixel_pin,pixel_num,brightness=0.1,auto_write=True)pixel_wing_vertical=PixelMap.vertical_lines(pixels,8,4,horizontal_strip_gridmap(8,alternating=False))pixel_wing_horizontal=PixelMap.horizontal_lines(pixels,8,4,horizontal_strip_gridmap(8,alternating=False))forrowinrange(len(pixel_wing_horizontal)):pixels.fill(0x00000)pixel_wing_horizontal[row]=0x00ff00time.sleep(0.3)forrowinrange(len(pixel_wing_vertical)):pixels.fill(0x00000)pixel_wing_vertical[row]=0xff00fftime.sleep(0.3)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-pixie
IntroductionDependenciesThis 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-pixieTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pixieTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pixieUsage Exampleimporttimeimportboardfromrainbowioimportcolorwheelimportadafruit_pixieimportbusiouart=busio.UART(board.TX,rx=None,baudrate=115200)num_pixies=2# Change this to the number of Pixies LEDs you have.pixies=adafruit_pixie.Pixie(uart,num_pixies,brightness=0.2,auto_write=False)whileTrue:foriinrange(255):forpixieinrange(num_pixies):pixies[pixie]=colorwheel(i)pixies.show()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-pm25
IntroductionCircuitPython library for PM2.5 Air Quality SensorsDependenciesThis 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 PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-pm25To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pm25To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pm25Usage ExampleFor example usage, see examples/pm25_simpletest.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-pn532
IntroductionCircuitPython driver for thePN532 NFC/RFID BreakoutandPN532 NFC/RFID ShieldDependenciesThis 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-pn532To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-pn532To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-pn532Usage ExampleCheck examples/pn532_simpletest.py for usage 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.