I have this Arduino code to open and close some blinds using a stepper motor. I thought I solved it when I came upon description of common errors with switches,
I put a resister between positive and pin D2. I even tried one in the negative position and I still get “random switching of the blinds”
I have not created the code myself I have pieced it together from different locations. I am trying to learn as I go.
Just without notice the blinds move open or closed randomly throughout the day.
Some basic trouble shooting I have done is…
Completely remove the Remotec ZFM-80 from the scenario. - Still get random movement
But in different size resistors. 22 1/2 volt 10 1 volt. - Still get random movement
Replace the ULN2002 - still get random movement
Currently power from usb. I tried putting power directly to motor and keep usb power. = still get random movement
When I say random movement I mean it does the whole stepper.move(-8192) or stepper.move(8192) taking place but just when it wants to move and if I signal it to move.
When connected everything works when I hit the button. (blinds turn) Hit button again blinds turn other way. It is just the random turning that has me baffled. I have attach wiring layout and code using
Looking for some other suggestions.
allies_room_blind.ino (1.34 KB)
sketch.pdf (132 KB)