Skip to content

Commit 02f2d37

Browse files
committed
Add readme file to docs
1 parent 043d005 commit 02f2d37

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

docs/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# 📖 Documentation
2+
3+
## 💻 Usage
4+
5+
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:
6+
7+
```python
8+
from modulino import ModulinoPixels
9+
10+
pixels = ModulinoPixels()
11+
12+
if not pixels.connected:
13+
print("🤷 No pixel modulino found")
14+
exit()
15+
```
16+
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)`.
17+
18+
## ℹ️ Using 3rd Party Boards
19+
20+
When using this library on a non-Arduino board, the I2C bus must be initialized manually.
21+
Usually the available I2C buses are predefined and can be accessed by their number, e.g. I2C(0).
22+
If not, the pins for SDA and SCL must be specified. An example on how to do this can be found [here](../examples/third_party_board.py).
23+
24+
## 👀 Examples
25+
26+
The following scripts are examples of how to use the Modulinos with Python:
27+
28+
- [buttons.py](../examples/buttons.py): This example shows how to use the ModulinoButtons class to interact with the buttons of the Modulino.
29+
- [buzzer.py](../examples/buzzer.py): This example shows how to use the ModulinoBuzzer class to play a melody using the buzzer of the Modulino.
30+
- [distance.py](../examples/distance.py): This example shows how to use the ModulinoDistance class to read the distance from the Time of Flight sensor of the Modulino.
31+
- [knob.py](../examples/knob.py): This example shows how to use the ModulinoKnob class to read the value of a rotary encoder knob.
32+
- [knob_buzzer.py](../examples/knob_buzzer.py): This example demonstrates how to use the ModulinoKnob and ModulinoBuzzer classes to play different notes using a buzzer.
33+
- [knob_pixels.py](../examples/knob_pixels.py): This example shows how to use the ModulinoKnob and ModulinoPixels classes to control a set of pixels with a knob.
34+
- [movement.py](../examples/movement.py): This example shows how to use the ModulinoMovement class to read the accelerometer
35+
and gyroscope values from the Modulino.
36+
- [pixels.py](../examples/pixels.py): This example shows how to use the ModulinoPixels class to control a set of pixels.
37+
- [pixels_thermo.py](../examples/pixels_thermo.py): This example shows how to use the ModulinoPixels and ModulinoThermo classes to display the temperature on a pixel strip.
38+
- [pressure.py](../examples/pressure.py): This example shows how to use the ModulinoPressure class to read the pressure,
39+
temperature and altitude from the Modulino.
40+
- [thermo.py](../examples/thermo.py): This example shows how to use the ModulinoThermo class to read the temperature and humidity from the Modulino.

0 commit comments

Comments
 (0)