Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Actuators/DS3234/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# How to install

---

After [**installing the mpremote package**](https://docs.micropython.org/en/latest/reference/mpremote.html), flash a module to the board using the following command:

```sh
mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Actuators/DS3234
```
Or, if you're running a Windows OS:

```sh
python -m mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Actuators/DS3234
```
14 changes: 14 additions & 0 deletions Actuators/MCP23017/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# How to install

---

After [**installing the mpremote package**](https://docs.micropython.org/en/latest/reference/mpremote.html), flash a module to the board using the following command:

```sh
mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Actuators/MCP23017
```
Or, if you're running a Windows OS:

```sh
python -m mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Actuators/MCP23017
```
14 changes: 14 additions & 0 deletions Communication/RFID/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# How to install

---

After [**installing the mpremote package**](https://docs.micropython.org/en/latest/reference/mpremote.html), flash a module to the board using the following command:

```sh
mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Communication/RFID
```
Or, if you're running a Windows OS:

```sh
python -m mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Communication/RFID
```
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,42 @@ Each module in the library is designed to be lightweight, readable, and compatib

---

## Currently available MicroPython modules

### Sensors
- [AD8495](Sensors/AD8495/)
- [APDS9960](Sensors/APDS9960/)
- [BME280](Sensors/BME280/)
- [BME680](Sensors/BME680/)
- [BME688](Sensors/BME688/)
- [BMP180](Sensors/BMP180/)
- [BMP280](Sensors/BMP280/)
- [BMP388](Sensors/BMP388/)
- [HallEffect](Sensors/HallEffect/)
- [LaserDistanceSensor](Sensors/LaserDistanceSensor/)
- [LTR507](Sensors/LTR507/)
- [ObstacleSensor](Sensors/ObstacleSensor/)
- [PirSensor](Sensors/PirSensor/)
- [RotaryEncoder](Sensors/RotaryEncoder/)
- [SHTC3](Sensors/SHTC3/)
- [TMP117](Sensors/TMP117/)
- [UltrasonicSensor](Sensors/UltrasonicSensor/)

### Actuators
- [DRV8825](Actuators/DRV8825/)
- [DS3234](Actuators/DS3234/)
- [MCP23017](Actuators/MCP23017/)
- [WS2812](Actuators/WS2812/)

### Communication
- [RFID](Communication/RFID/)

### Displays
- [LCD-I2C](Displays/LCD-I2C/)
- [SSD1306](Displays/SSD1306/)

---

## Installation
You can install a specific module using mpremote or manually downloading specific files onto the board using an IDE such as [Thonny](https://thonny.org/)

Expand Down
14 changes: 14 additions & 0 deletions Sensors/AD8495/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# How to install

---

After [**installing the mpremote package**](https://docs.micropython.org/en/latest/reference/mpremote.html), flash a module to the board using the following command:

```sh
mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Sensors/AD8495
```
Or, if you're running a Windows OS:

```sh
python -m mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Sensors/AD8495
```
14 changes: 14 additions & 0 deletions Sensors/BME688/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# How to install

---

After [**installing the mpremote package**](https://docs.micropython.org/en/latest/reference/mpremote.html), flash a module to the board using the following command:

```sh
mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Sensors/BME688
```
Or, if you're running a Windows OS:

```sh
python -m mpremote mip install github:SolderedElectronics/Soldered-Micropython-modules/Sensors/BME688
```
35 changes: 35 additions & 0 deletions Sensors/BMP280/BMP280/Examples/bmp280-forcedMode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# FILE: bmp280-forcedMode.py
# AUTHOR: Josip Šimun Kuči @ Soldered
# BRIEF: One-shot measurements in forced mode with custom sampling
# WORKS WITH: Pressure & Temperature sensor BMP280 Breakout
# LAST UPDATED: 2025-01-15

from machine import Pin, I2C
from bmp280 import BMP280

# Import constants from separate file to keep examples stable if defaults change.
from bmp280_constants import (
FORCED_MODE,
OVERSAMPLING_X8,
OVERSAMPLING_X2,
IIR_FILTER_2,
)
import time

# If you aren't using the Qwiic connector, manually enter your I2C pins
# i2c = I2C(0, scl=Pin(22), sda=Pin(21))
# bmp280 = BMP280(i2c)

# Initialize sensor over Qwiic
bmp280 = BMP280()

# Configure sampling rates and filter
bmp280.setOversampling(
presOversampling=OVERSAMPLING_X8, tempOversampling=OVERSAMPLING_X2
)
bmp280.setIIRFilter(IIR_FILTER_2)
bmp280.setMode(FORCED_MODE)
while True:
temperature, pressure, altitude = bmp280.getMeasurements()
print("{:.2f}*C {:.2f}hPa {:.2f}m".format(temperature, pressure, altitude))
time.sleep(1)
38 changes: 38 additions & 0 deletions Sensors/BMP280/BMP280/Examples/bmp280-normalMode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# FILE: bmp280-normalMode.py
# AUTHOR: Josip Šimun Kuči @ Soldered
# BRIEF: Continuous measurements in normal mode with custom sampling
# WORKS WITH: Pressure & Temperature sensor BMP280 Breakout
# LAST UPDATED: 2025-01-15

from machine import Pin, I2C
from bmp280 import BMP280

# Import constants from separate file to keep examples stable if defaults change.
from bmp280_constants import (
NORMAL_MODE,
OVERSAMPLING_X4,
OVERSAMPLING_X2,
IIR_FILTER_4,
STANDBY_1000MS,
)
import time

# If you aren't using the Qwiic connector, manually enter your I2C pins
# i2c = I2C(0, scl=Pin(22), sda=Pin(21))
# bmp280 = BMP280(i2c)

# Initialize sensor over Qwiic
bmp280 = BMP280()

# Configure sampling rates and filter
bmp280.setOversampling(
presOversampling=OVERSAMPLING_X4, tempOversampling=OVERSAMPLING_X2
)
bmp280.setIIRFilter(IIR_FILTER_4)
bmp280.setStandbyTime(STANDBY_1000MS)
bmp280.setMode(NORMAL_MODE)

while True:
temperature, pressure, altitude = bmp280.getMeasurements()
print("{:.2f}*C {:.2f}hPa {:.2f}m".format(temperature, pressure, altitude))
time.sleep(1)
43 changes: 43 additions & 0 deletions Sensors/BMP280/BMP280/Examples/bmp280-sleepMode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# FILE: bmp280-sleepMode.py
# AUTHOR: Josip Šimun Kuči @ Soldered
# BRIEF: Sleep mode example with manual wake for a single measurement
# WORKS WITH: Pressure & Temperature sensor BMP280 Breakout
# LAST UPDATED: 2025-01-15

from machine import Pin, I2C
from bmp280 import BMP280

# Import constants from separate file to keep examples stable if defaults change.
from bmp280_constants import (
SLEEP_MODE,
FORCED_MODE,
OVERSAMPLING_X1,
IIR_FILTER_OFF,
)
import time

# If you aren't using the Qwiic connector, manually enter your I2C pins
# i2c = I2C(0, scl=Pin(22), sda=Pin(21))
# bmp280 = BMP280(i2c)

# Initialize sensor over Qwiic
bmp280 = BMP280()

# Configure low-power sampling
bmp280.setOversampling(
presOversampling=OVERSAMPLING_X1, tempOversampling=OVERSAMPLING_X1
)
bmp280.setIIRFilter(IIR_FILTER_OFF)
bmp280.setMode(SLEEP_MODE)

while True:
# Wake up for a single measurement
bmp280.setMode(FORCED_MODE)
time.sleep(0.05)

temperature, pressure, altitude = bmp280.getMeasurements()
print("{:.2f}*C {:.2f}hPa {:.2f}m".format(temperature, pressure, altitude))

# Back to sleep between samples
bmp280.setMode(SLEEP_MODE)
time.sleep(2)
Loading