Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Configure and read GPIO

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    2
    3
    173
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • fmeleardundefined
      fmeleard
      last edited by

      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
      cell.png

      dc42undefined 1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators @fmeleard
        last edited by

        @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.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        fmeleardundefined 1 Reply Last reply Reply Quote 0
        • fmeleardundefined
          fmeleard @dc42
          last edited by

          @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 B4725

          I 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

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA