Octoprint-Filament-Reloaded icon indicating copy to clipboard operation
Octoprint-Filament-Reloaded copied to clipboard

normally closed support

Open frantisekbrabec opened this issue 5 years ago • 2 comments

My specific sensor (seems to be the same used by TH3D - https://www.th3dstudio.com/product/ezout-v2-filament-sensor-only-replacement-spare/) goes HIGH when filament is present and LOW when absent.

I wired it the most straightforward way (Vcc-Vcc, GND-GND, signal-GPIO; no resistors, etc).

The only way I can read correct GPIO values is when I set up the IO with pull_up_down=GPIO.PUD_DOWN option. However, the plugin code has pull_up_down=GPIO.PUD_UP hardwired. It probably should be parameter driven, perhaps derived from the existing 'switch' parameter?

frantisekbrabec avatar Mar 05 '19 20:03 frantisekbrabec

It looks like this exists now. should this issue be closed?

guysoft avatar Sep 24 '19 10:09 guysoft

Not really, it still has PUD_UP hardwired:

GPIO.setup(self.pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

do you see something else somewhere?

frantisekbrabec avatar Sep 24 '19 21:09 frantisekbrabec