File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 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.
33It cycles through different vibration patterns with varying power levels and durations.
44
55Initial author: Sebastian Romero (s.romero@arduino.cc)
66"""
77
8- from modulino import ModulinoVibra , PowerLevel
8+ from modulino import ModulinoVibro , PowerLevel
99from time import sleep
1010
11- vibra = ModulinoVibra ()
11+ vibro = ModulinoVibro ()
1212
1313pattern = [
1414 (500 , PowerLevel .GENTLE ),
2020]
2121
2222for 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
Original file line number Diff line number Diff line change 1515from .distance import ModulinoDistance
1616from .joystick import ModulinoJoystick
1717from .latch_relay import ModulinoLatchRelay
18- from .vibra import ModulinoVibra , PowerLevel
18+ from .vibro import ModulinoVibro , PowerLevel
Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments