Configure and read GPIO
-
Hello,
I'm trying to add a photocell to capture a laser.I used (m308 s0 y "linear-analog" p"^io6.in") but when I do (M308 S0) the returns are random... the Y type must not be good, I think, but I don't understand what to take...
between ("thermistor", "pt1000", "rtd-max31865", "thermocouple-max31855", "thermocouple-max31856", "linear-analog", "dht21", "dht22", "dhthumidity", "current-loop-pyro", "drivers", "mcu-temp" ) unless I have understood absolutely nothing...Thanks in advance for your help.
Below is a picture of my cell just in case
-
@fmeleard I presume you have connected the light dependent resistor between the IN and GND pins. The io6.in port has a built-in 27K pullup resistor so you don't need to enable the one n the MCU.
What sort of readings are you getting? You may need to add an external pullup resistor with a lower value.
-
@dc42 @dc42 Hello,
yes the connections are well on IN and GND and I have good feedback but not very precise.I tested with the following options:
m308 s0 y "thermistor" p"^io6.in"
m308 s0 y "linear-analog" p"^io6.in"
m308 s0 y "linear-analog" p"!io6.in"
m308 s0 y "pt1000" p"!io6.in"
m308 s0 y "pt1000" p"^io6.in" T100000 B4725I have some reactions but they seem strange, because for example I go from "Sensor 0 type PT1000 using pin !io6.in, reading 58.6 , last error : success, R:2200.0 L:0 H:0" to Sensor 0 type PT1000 using pin !io6.in, reading 2000.00 , last error : success, R:2200.0 L:0 H:0.
Which type should be used?
Is there any way to calibrate more or less the reading?Thank you very much