File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Expand file tree Collapse file tree 4 files changed +11
-7
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 2
2
#
3
3
# SPDX-License-Identifier: MIT
4
4
"""
5
- `adafruit_emc2101_lut `
5
+ `adafruit_emc2101.emc2101_lut `
6
6
================================================================================
7
7
8
- Brushless fan controller
8
+ Brushless fan controller: extended functionality
9
9
10
10
11
11
* Author(s): Bryan Siepert
24
24
25
25
# * Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
26
26
# * Adafruit's Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
27
+
28
+ The class defined here may be used instead of adafruit_emc2101.EMC2101,
29
+ if your device has enough RAM to support it. This class adds LUT control
30
+ and PWM frequency control to the base feature set.
27
31
"""
28
32
29
33
from micropython import const
30
34
from adafruit_register .i2c_struct import UnaryStruct
31
35
from adafruit_register .i2c_bit import RWBit
32
36
from adafruit_register .i2c_bits import RWBits
33
- from adafruit_emc2101 import EMC2101
37
+ from . import EMC2101
34
38
35
39
__version__ = "0.0.0-auto.0"
36
40
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_EMC2101.git"
Original file line number Diff line number Diff line change 4
4
import time
5
5
import board
6
6
import busio
7
- from adafruit_emc2101 import EMC2101
7
+ from adafruit_emc2101 . emc2101_lut import EMC2101_LUT
8
8
9
9
i2c = busio .I2C (board .SCL , board .SDA )
10
10
11
11
FAN_MAX_RPM = 1700
12
- emc = EMC2101 (i2c )
12
+ emc = EMC2101_LUT (i2c )
13
13
emc .manual_fan_speed = 50
14
14
time .sleep (1 )
15
15
emc .lut [27 ] = 25
Original file line number Diff line number Diff line change 4
4
import time
5
5
import board
6
6
import busio
7
- from adafruit_emc2101 import EMC2101
7
+ from adafruit_emc2101 . emc2101_lut import EMC2101_LUT
8
8
9
9
i2c = busio .I2C (board .SCL , board .SDA )
10
10
11
- emc = EMC2101 (i2c )
11
+ emc = EMC2101_LUT (i2c )
12
12
emc .set_pwm_clock (use_preset = False )
13
13
# Datasheet recommends using the maximum value of 31 (0x1F)
14
14
# to provide the highest effective resolution
You can’t perform that action at this time.
0 commit comments