Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

📖 Documentation

💻 Usage

To use this library you can import the modulino module along with the desired classes which give you access to the different modulinos. For example:

from modulino import ModulinoPixels

pixels = ModulinoPixels()

Once the desired object is obtained you can call functions and query properties on these objects such as pixels.set_all_rgb(255, 0, 0).

ℹ️ Using 3rd Party Boards

When using this library on a non-Arduino board, the I2C bus must be initialized manually. Usually the available I2C buses are predefined and can be accessed by their number, e.g. I2C(0). If not, the pins for SDA and SCL must be specified. An example on how to do this can be found here.

👀 Examples

The following scripts are examples of how to use the Modulinos with Python:

  • buttons.py: This example shows how to use the ModulinoButtons class to interact with the buttons of the Modulino.
  • buzzer.py: This example shows how to use the ModulinoBuzzer class to play a melody using the buzzer of the Modulino.
  • distance.py: This example shows how to use the ModulinoDistance class to read the distance from the Time of Flight sensor of the Modulino.
  • knob.py: This example shows how to use the ModulinoKnob class to read the value of a rotary encoder knob.
  • knob_buzzer.py: This example demonstrates how to use the ModulinoKnob and ModulinoBuzzer classes to play different notes using a buzzer.
  • knob_pixels.py: This example shows how to use the ModulinoKnob and ModulinoPixels classes to control a set of pixels with a knob.
  • movement.py: This example shows how to use the ModulinoMovement class to read the accelerometer and gyroscope values from the Modulino.
  • pixels.py: This example shows how to use the ModulinoPixels class to control a set of pixels.
  • pixels_thermo.py: This example shows how to use the ModulinoPixels and ModulinoThermo classes to display the temperature on a pixel strip. temperature and altitude from the Modulino.
  • thermo.py: This example shows how to use the ModulinoThermo class to read the temperature and humidity from the Modulino.