Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-max31855
IntroductionCircuitPython driver for theMAX31855 Thermocouple Amplifier BreakoutDependenciesThis 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-max31855To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-max31855To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-max31855Usage ExampleOf course, you must import the library to use it:importadafruit_max31855You also need to create an SPI interface object, and a pin object for the
chip select pin. You can use any pin for the CS, but we use D5 here:fromdigitalioimportDigitalInOutimportboardspi=board.SPI()cs=DigitalInOut(board.D5)Next, just create the sensor object:sensor=adafruit_max31855.MAX31855(spi,cs)And you can start making measurements:print(sensor.temperature)The temperature is read in degrees Celsius (°C). You have to convert it to
other units yourself, if you need it.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-max31856
IntroductionA CircuitPython driver for the MAX31856 Universal Thermocouple AmplifierDependenciesThis 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-max31856To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-max31856To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-max31856Usage Exampleimportboardimportdigitalioimportadafruit_max31856# Create sensor object, communicating over the board's default SPI busspi=board.SPI()# allocate a CS pin and set the directioncs=digitalio.DigitalInOut(board.D5)cs.direction=digitalio.Direction.OUTPUT# create a thermocouple object with the abovethermocouple=adafruit_max31856.MAX31856(spi,cs)# measure the temperature! (takes approx 160ms)print(thermocouple.temperature)# alternative (non-blocking) way to get temperaturethermocouple.initiate_one_shot_measurement()# <perform other tasks># now wait for measurement to completewhilethermocouple.oneshot_pending:passprint(thermocouple.unpack_temperature())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-max31865
IntroductionCircuitPython module for the MAX31865 thermocouple amplifier.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-max31865To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-max31865To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-max31865Usage ExampleSee examples/max31865_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-max7219
IntroductionCircuitPython driver for the MAX7219 LED matrix driver chip.Seeherefor the equivalent MicroPython driver.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-max7219To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-max7219To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-max7219Usage ExampleSee theexamples/folder example uses of this library.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-max9744
IntroductionCircuitPython module for the MAX9744 20W class D amplifier.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-max9744To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-max9744To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-max9744Usage ExampleSee examples/max9744_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-mcp230xx
IntroductionCircuitPython module for the MCP23017/08 I2C and MCP23S17/08 SPI I/O extenders.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-mcp230xxTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp230xxTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-mcp230xxUsage ExampleSee examples/mcp230xx_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.WarningSome people have reported an undocumented bug that can potentially corrupt the I2C bus.
It occurs if an MCP230XX input pin state changes during I2C readout.This should be very rare.For more information, see thisforum postand thisknowledge base article.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-mcp2515
IntroductionA CircuitPython library for working with the MCP2515 CAN bus controllerDependenciesThis 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-mcp2515To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp2515To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-mcp2515Usage Exampleimportboardimportbusioimportdigitalioimportadafruit_mcp2515CS_PIN=5cs=digitalio.DigitalInOut(board.D5)cs.direction=digitalio.Direction.OUTPUTspi=busio.SPI(board.SCK,board.MOSI,board.MISO)mcp=adafruit_mcp2515.MCP2515(spi,cs)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-mcp3421
IntroductionCircuitPython driver for the MCP3421 analog to digital converterDependenciesThis 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-mcp3421To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp3421To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.env/bin/activatepip3installadafruit-circuitpython-mcp3421Installing 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_mcp3421Or the following command to update an existing version:circupupdateUsage Exampleimporttimeimportboardimportadafruit_mcp3421.mcp3421asADCfromadafruit_mcp3421.analog_inimportAnalogIni2c=board.I2C()adc=ADC.MCP3421(i2c)adc_channel=AnalogIn(adc)whileTrue:print((adc_channel.value,))time.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-mcp3xxx
IntroductionCircuitPython library for the MCP3xxx series of analog-to-digital converters.Currently supports:MCP3008: 8-Channel 10-Bit ADC With SPI InterfaceDependenciesThis 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-mcp3xxxTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp3xxxTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-mcp3xxxUsage ExampleMCP3008 Single Endedimportbusioimportdigitalioimportboardimportadafruit_mcp3xxx.mcp3008asMCPfromadafruit_mcp3xxx.analog_inimportAnalogIn# create the spi busspi=busio.SPI(clock=board.SCK,MISO=board.MISO,MOSI=board.MOSI)# create the cs (chip select)cs=digitalio.DigitalInOut(board.D5)# create the mcp objectmcp=MCP.MCP3008(spi,cs)# create an analog input channel on pin 0chan=AnalogIn(mcp,MCP.P0)print('Raw ADC Value: ',chan.value)print('ADC Voltage: '+str(chan.voltage)+'V')MCP3008 Differentialimportbusioimportdigitalioimportboardimportadafruit_mcp3xxx.mcp3008asMCPfromadafruit_mcp3xxx.analog_inimportAnalogIn# create the spi busspi=busio.SPI(clock=board.SCK,MISO=board.MISO,MOSI=board.MOSI)# create the cs (chip select)cs=digitalio.DigitalInOut(board.D5)# create the mcp objectmcp=MCP.MCP3008(spi,cs)# create a differential ADC channel between Pin 0 and Pin 1chan=AnalogIn(mcp,MCP.P0,MCP.P1)print('Differential ADC Value: ',chan.value)print('Differential ADC Voltage: '+str(chan.voltage)+'V')MCP3004 Single-Endedimportbusioimportdigitalioimportboardimportadafruit_mcp3xxx.mcp3004asMCPfromadafruit_mcp3xxx.analog_inimportAnalogIn# create the spi busspi=busio.SPI(clock=board.SCK,MISO=board.MISO,MOSI=board.MOSI)# create the cs (chip select)cs=digitalio.DigitalInOut(board.D5)# create the mcp objectmcp=MCP.MCP3004(spi,cs)# create an analog input channel on pin 0chan=AnalogIn(mcp,MCP.P0)print('Raw ADC Value: ',chan.value)print('ADC Voltage: '+str(chan.voltage)+'V')MCP3004 Differentialimportbusioimportdigitalioimportboardimportadafruit_mcp3xxx.mcp3004asMCPfromadafruit_mcp3xxx.analog_inimportAnalogIn# create the spi busspi=busio.SPI(clock=board.SCK,MISO=board.MISO,MOSI=board.MOSI)# create the cs (chip select)cs=digitalio.DigitalInOut(board.D5)# create the mcp objectmcp=MCP.MCP3004(spi,cs)# create a differential ADC channel between Pin 0 and Pin 1chan=AnalogIn(mcp,MCP.P0,MCP.P1)print('Differential ADC Value: ',chan.value)print('Differential ADC Voltage: '+str(chan.voltage)+'V')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-mcp4725
IntroductionCircuitPython module for the MCP4725 digital to analog converter.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-mcp4725To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp4725To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-mcp4725Usage ExampleSee examples/max4725_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-mcp4728
IntroductionHelper library for the MCP4728 I2C 12-bit Quad DACDependenciesThis 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-mcp4728To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp4728To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-mcp4728Usage Exampleimportboardimportadafruit_mcp4728i2c=board.I2C()# uses board.SCL and board.SDAmcp4728=adafruit_mcp4728.MCP4728(i2c)mcp4728.channel_a.value=65535# Voltage = VDDmcp4728.channel_b.value=int(65535/2)# VDD/2mcp4728.channel_c.value=int(65535/4)# VDD/4mcp4728.channel_d.value=0# 0Vmcp4728.save_settings()# save the current values to the eeprom,making them the default on power upDocumentationAPI 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-mcp9600
IntroductionThis is a CircuitPython driver for the MCP9600 thermocouple I2C amplifier.
In addition to the MCP9600 breakout, you will also need a thermocouple, which
can be found in the Adafruit store.
The MCP9600 supports several thermocouple types for different temperature
ranges. The “K” type is the default, with a range of -200C to +1372C.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-mcp9600To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp9600To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-mcp9600Usage ExampleThis is a simple example showing the hot junction temperature (the
temperature at the tip of the thermocouple). You may need to adjust the
I2C frequency if you receive input/output errors.importboardimportbusiofromadafruit_bus_device.i2c_deviceimportI2CDevicefromadafruit_mcp9600importMCP9600i2c=busio.I2C(board.SCL,board.SDA,frequency=200000)try:# using default I2C register and "K" thermocoupledevice=MCP9600(i2c)print("temperature(C):",device.temperature)exceptValueError:print("MCP9600 sensor not detected")This example displays the ambient/room and hot junction temperatures at
1 second intervals. Turn on the Mu editor’s plotter option to view the
temperatures in a real-time graph.importboardimportbusioimporttimefromadafruit_bus_device.i2c_deviceimportI2CDevicefromadafruit_mcp9600importMCP9600i2c=busio.I2C(board.SCL,board.SDA,frequency=200000)try:device=MCP9600(i2c)print("version:",device.version)whileTrue:print((device.ambient_temperature,device.temperature))time.sleep(1)exceptValueError:print("MCP9600 sensor not detected")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-mcp9808
IntroductionThe MCP9808 is an awesome, high accuracy temperature sensor that communicates
over I2C. Its available onAdafruit as a breakout.DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-mcp9808To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-mcp9808To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-mcp9808Usage NotesGetting the temperature in Celsius is easy! First, import all of the pins from
the board, board.I2C() for native I2C communication and the thermometer library
itself.importboardimportadafruit_mcp9808Next, initialize the I2C bus in a with statement so it always gets shut down ok.
Then, construct the thermometer class:# Do one readingwithboard.I2C()asi2c:t=adafruit_mcp9808.MCP9808(i2c)# Finally, read the temperature property and print it outprint(t.temperature)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-midi
IntroductionA CircuitPython helper for encoding/decoding MIDI packets over a MIDI or UART connection.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-midiTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-midiTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-midiUsage Exampleimporttimeimportrandomimportusb_midiimportadafruit_midifromadafruit_midi.note_onimportNoteOnfromadafruit_midi.note_offimportNoteOfffromadafruit_midi.pitch_bendimportPitchBendfromadafruit_midi.control_changeimportControlChangemidi=adafruit_midi.MIDI(midi_out=usb_midi.ports[1],out_channel=0)print("Midi test")print("Default output MIDI channel:",midi.out_channel+1)whileTrue:midi.send(NoteOn(44,120))# G sharp 2nd octavetime.sleep(0.25)a_pitch_bend=PitchBend(random.randint(0,16383))midi.send(a_pitch_bend)time.sleep(0.25)midi.send([NoteOff("G#2",120),ControlChange(3,44)])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.