X-Git-Url: https://git.ayoreis.com/hackapet/Adafruit_Blinka.git/blobdiff_plain/b4e4beda872b5b932ddcea501e740fe3b252e16c..68f8fa38eec3b7486387a4c963a39cdac8f076b0:/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py diff --git a/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py b/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py index 1f6818e..dee340e 100644 --- a/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py +++ b/src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py @@ -55,8 +55,7 @@ class Pin: 1: self.return_false, # Dx_INPUT_FALSE 2: self.return_true, # Dx_INPUT_TRUE_PULL_UP 3: self.return_true, # Dx_INPUT_TRUE_PULL_DOWN - 4: self.return_true, # Dx_OUTPUT_TRUE - 5: self.return_false, # Dx_OUTPUT_FALSE + 4: self.return_true, # Dx_OUTPUT 6: self.return_true, # NEOPIXEL 7: self.return_random_int, # Ax_INPUT_RAND_INT 8: self.return_fixed_int_pi, # Ax_INPUT_FIXED_INT_PI @@ -80,7 +79,6 @@ class Pin: self.current_value = new_value def read(self): - print("\nread mode: ", self._mode) """Returns the pin's expected value.""" self.previous_value = self.current_value # perform a lookup on the pin_behavior dict to get the value @@ -88,10 +86,9 @@ class Pin: # is pin a pull up and pin is LOW? if self._pull == Pin.PULL_UP and self.current_value == False: - self.current_value = True + self.current_value = False # is pin a pull down and pin is HIGH? if self._pull == Pin.PULL_DOWN and self.current_value == True: - print("switching PDR to False") self.current_value = False return self.current_value @@ -132,7 +129,6 @@ D1 = Pin(1) D2 = Pin(2) D3 = Pin(3) D4 = Pin(4) -D5 = Pin(5) # Special "digital" pins D6 = Pin(6) # Analog pins