General GPIO input values visible in the object model? Analog?
-
Pins have names in RRF3, nice.
Can the values from input pins be seen/read in the object mode for use in conditional GCODE?
I can see that you can define input pins with M950 but there is no mention of analog pins. Of course it has to be an analog input pin for this to work.
What I want to do is to hook up a potentiometer, or some other analog sensor, to get an absolute, but poor resolution, position of where the arms are on my five bar scara. Homing can be a bit tricky. The arms needs to be untangled to reach a proper endstop while at the same time avoiding mechanically unreachable positions.
I'm sure there are other useful scenarios for reading a pin.
-
Analog inputs are not yet included in the object model.
-
This post is deleted! -
Hi @dc42 , I have similar requirement, where I want to read an analog value from Duet 3 board GPIO (e.g io3). Are the GPIO pins capable to read analog data?
To give a background, I have a Raspberry pi, which is connected to multiple temperature sensors. The python code collects multiple sensors values and averages the value. The average temperature value needs to be fed into Duet 3 board using GPIO (e.g io3 input).
When I use gcode M308 and M950, I am getting garbage values in DWC.
Any thoughts?
-
@vijays analog pins for IO on the 6HC are shown here:
https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6HC_Hardware_Overview#inputoutputyou also have the temperature sensors inputs. If you it up as analog sensor it should show up in sensors.analog key in the object model.
what is displays will depend on the analog voltage that you are supplying.
-
@vijays I also see this post:
https://forum.duet3d.com/topic/31649/duet-3-board-gpio-input-heater-control/3I assume they are related?