Hello everyone my code is working now through several comments. But I don't get any meassurements now. I work with Lopy, micropython.
I use the following materials:
This is my Micropython code:
import pycom
import machine
import time
from machine import Pin
adc = machine.ADC() # create an ADC object
apin = adc.channel(pin='P19') # create an analog pin on P16
val = apin() # read an analog value
def main():
while True:
print(val)
time.sleep(5)
if __name__ == "__main__":
main()
The documentation I use is the following link: https://bildr.org/2012/11/flexiforce-arduino/
I converted it to Micropython.
This is my circuit now:
My circuit
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…