]> Repositories - hackapet/Adafruit_Blinka.git/blobdiff - src/adafruit_blinka/microcontroller/generic_agnostic_board/pin.py
add output test
[hackapet/Adafruit_Blinka.git] / src / adafruit_blinka / microcontroller / generic_agnostic_board / pin.py
index 1f6818e64c750c1a9e85984cbe718cad42a2daae..dee340e82592ce0294df843dc6cf34aa4132d904 100644 (file)
@@ -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