Skip to content

Commit

Permalink
Updated Yukon pin constant, for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
ZodiusInfuser committed Sep 25, 2023
1 parent 123c81d commit 2e43acd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,8 @@ FAST4 = Pin.board.SLOT1_FAST4
SLOW1 = Pin.board.SLOT1_SLOW1
SLOW2 = Pin.board.SLOT1_SLOW2
SLOW3 = Pin.board.SLOT1_SLOW3
ADC1_ADDR = 0 # 0b0000
ADC2_TEMP_ADDR = 3 # 0b0011
ADC1_ADDR = 0 # 0b0000
ADC2_THERM_ADDR = 3 # 0b0011
```

**`SLOT2`**
Expand All @@ -704,8 +704,8 @@ FAST4 = Pin.board.SLOT2_FAST4
SLOW1 = Pin.board.SLOT2_SLOW1
SLOW2 = Pin.board.SLOT2_SLOW2
SLOW3 = Pin.board.SLOT2_SLOW3
ADC1_ADDR = 1 # 0b0001
ADC2_TEMP_ADDR = 6 # 0b0110
ADC1_ADDR = 1 # 0b0001
ADC2_THERM_ADDR = 6 # 0b0110
```

**`SLOT3`**
Expand All @@ -718,8 +718,8 @@ FAST4 = Pin.board.SLOT3_FAST4
SLOW1 = Pin.board.SLOT3_SLOW1
SLOW2 = Pin.board.SLOT3_SLOW2
SLOW3 = Pin.board.SLOT3_SLOW3
ADC1_ADDR = 4 # 0b0100
ADC2_TEMP_ADDR = 2 # 0b0010
ADC1_ADDR = 4 # 0b0100
ADC2_THERM_ADDR = 2 # 0b0010
```

**`SLOT4`**
Expand All @@ -732,8 +732,8 @@ FAST4 = Pin.board.SLOT4_FAST4
SLOW1 = Pin.board.SLOT4_SLOW1
SLOW2 = Pin.board.SLOT4_SLOW2
SLOW3 = Pin.board.SLOT4_SLOW3
ADC1_ADDR = 5 # 0b0101
ADC2_TEMP_ADDR = 7 # 0b0111
ADC1_ADDR = 5 # 0b0101
ADC2_THERM_ADDR = 7 # 0b0111
```

**`SLOT5`**
Expand All @@ -746,8 +746,8 @@ FAST4 = Pin.board.SLOT5_FAST4
SLOW1 = Pin.board.SLOT5_SLOW1
SLOW2 = Pin.board.SLOT5_SLOW2
SLOW3 = Pin.board.SLOT5_SLOW3
ADC1_ADDR = 8 # 0b1000
ADC2_TEMP_ADDR = 11 # 0b1011
ADC1_ADDR = 8 # 0b1000
ADC2_THERM_ADDR = 11 # 0b1011
```

**`SLOT6`**
Expand All @@ -760,16 +760,16 @@ FAST4 = Pin.board.SLOT6_FAST4
SLOW1 = Pin.board.SLOT6_SLOW1
SLOW2 = Pin.board.SLOT6_SLOW2
SLOW3 = Pin.board.SLOT6_SLOW3
ADC1_ADDR = 9 # 0b1001
ADC2_TEMP_ADDR = 10 # 0b1010
ADC1_ADDR = 9 # 0b1001
ADC2_THERM_ADDR = 10 # 0b1010
```


### Sensor Addresses

```python
CURRENT_SENSE_ADDR = 12 # 0b1100
TEMP_SENSE_ADDR = 13 # 0b1101
VOLTAGE_SENSE_ADDR = 14 # 0b1110
EX_ADC_ADDR = 15 # 0b1111
CURRENT_SENSE_ADDR = 12 # 0b1100
TEMP_SENSE_ADDR = 13 # 0b1101
VOLTAGE_OUT_SENSE_ADDR = 14 # 0b1110
VOLTAGE_IN_SENSE_ADDR = 15 # 0b1111
```
4 changes: 2 additions & 2 deletions lib/pimoroni_yukon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"SLOW2",
"SLOW3",
"ADC1_ADDR",
"ADC2_TEMP_ADDR"))
"ADC2_THERM_ADDR"))

SLOT1 = Slot(1,
Pin.board.SLOT1_FAST1,
Expand Down Expand Up @@ -570,7 +570,7 @@ def read_slot_adc1(self, slot):
return self.__shared_adc_voltage()

def read_slot_adc2(self, slot):
self.__select_address(slot.ADC2_TEMP_ADDR)
self.__select_address(slot.ADC2_THERM_ADDR)
return self.__shared_adc_voltage()

def assign_monitor_action(self, callback_function):
Expand Down

0 comments on commit 2e43acd

Please sign in to comment.