Production counter using NodeMCUs as binary sensor

Thread Starter

makinitright

Joined Mar 7, 2018
1
Hey guys,

I am currently working on a project in our company where I would like to use NodeMCU to count produced parts and send the data via MQTT. The NodeMCU is attached to one of the pulse generators (e.g. a cutter or welder) and the NodeMCU receives that signal but it seems like it is counting too many signals (like doubling the real value) and I cannot figure out why.

You can find my simple binary sketch here: https://pastebin.com/raw/y0RuD24h

I appreciate any hint or comment.
 
Top