Skip to content

Commit d74e0be

Browse files
committed
Rename to vibro
1 parent fe80826 commit d74e0be

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"""
2-
This example demonstrates how to use the ModulinoVibra class to control a vibration motor.
2+
This example demonstrates how to use the ModulinoVibro class to control a vibration motor.
33
It cycles through different vibration patterns with varying power levels and durations.
44
55
Initial author: Sebastian Romero (s.romero@arduino.cc)
66
"""
77

8-
from modulino import ModulinoVibra, PowerLevel
8+
from modulino import ModulinoVibro, PowerLevel
99
from time import sleep
1010

11-
vibra = ModulinoVibra()
11+
vibro = ModulinoVibro()
1212

1313
pattern = [
1414
(500, PowerLevel.GENTLE),
@@ -20,5 +20,5 @@
2020
]
2121

2222
for duration, power in pattern:
23-
vibra.on(duration, power, blocking=True)
23+
vibro.on(duration, power, blocking=True)
2424
sleep(0.5) # Pause between vibrations

src/modulino/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
from .distance import ModulinoDistance
1616
from .joystick import ModulinoJoystick
1717
from .latch_relay import ModulinoLatchRelay
18-
from .vibra import ModulinoVibra, PowerLevel
18+
from .vibro import ModulinoVibro, PowerLevel
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@ class PowerLevel:
1010
POWERFUL = 65
1111
MAXIMUM = 75
1212

13-
class ModulinoVibra(Modulino):
13+
class ModulinoVibro(Modulino):
1414
"""
15-
Class to operate the vibration motor of the Modulino Vibra.
15+
Class to operate the vibration motor of the Modulino Vibro.
1616
"""
1717

1818
default_addresses = [0x70]
1919

2020
def __init__(self, i2c_bus=None, address=None):
2121
"""
22-
Initializes the Modulino Vibra.
22+
Initializes the Modulino Vibro.
2323
2424
Parameters:
2525
i2c_bus (I2C): The I2C bus to use. If not provided, the default I2C bus will be used.
2626
address (int): The I2C address of the module. If not provided, the default address will be used.
2727
"""
28-
super().__init__(i2c_bus, address, "Vibra")
28+
super().__init__(i2c_bus, address, "Vibro")
2929
self.data = bytearray(12)
3030
self.frequency = 1000 # Default frequency in Hz
3131
self.off()

0 commit comments

Comments
 (0)