Trying to programmatically disconnect microbit Pin
I am trying to set up a lab for students to investigate capacitance via measuring voltage drop over a capacitor using a microbit. I have a microbit hooked up to a breadboard with a capacitor hooked up in parallel with an LED/resistor. The idea is to kill power on the pin powering the circuit and have students watch the LED slowly dim, while the microbit records the capacitor voltage every half second. I am having trouble programmatically disconnecting pin 1 on the microbit. I have connected the same circuit to an arduino and successfully done this, but have been unable to translate the code to microbit. If I just use digitalWrite to set the voltage to 0, that instantly drains my capacitor, while if I use setPull, the light never dims and power is never killed. I have an image of my circuit setup and all of my code in python (which is where the issue lies).
Trying to programmatically disconnect microbit Pin
I am trying to set up a lab for students to investigate capacitance via measuring voltage drop over a capacitor using a microbit. I have a microbit hooked up to a breadboard with a capacitor hooked up in parallel with an LED/resistor. The idea is to kill power on the pin powering the circuit and have students watch the LED slowly dim, while the microbit records the capacitor voltage every half second. I am having trouble programmatically disconnecting pin 1 on the microbit. I have connected the same circuit to an arduino and successfully done this, but have been unable to translate the code to microbit. If I just use digitalWrite to set the voltage to 0, that instantly drains my capacitor, while if I use setPull, the light never dims and power is never killed. I have an image of my circuit setup and all of my code in python (which is where the issue lies).