Go Down

Topic: temperature sensor and stepper motor (Read 37 times) previous topic - next topic


Hy, I am Robert Conti a Italian new fan of Arduino. Unfortunately, I have only a Cinese clone (R3) of Arduinos but soon I stop burning Arduinos for stupid reason (free cables around) I promise to buy an original one. I live in  Grosseto in Toscana a wild place located in Maremma where I suggest to live and work cause it is beautiful. In the countryside I have a greenhouse called tunnel where I grow tomatoes (a special kind called Camone 5Euros/kg at supermarket) and melons and watermelons (The veg and fruit that I like most!!!) Under the sun the tunnel may arrive at 50-60 celsius and I am pissed of opening the windows at morning and closing at night.So, I decided Arduino and a stepper motor could do that for me. BUT I have some problem. In my skecth when temperature reaches 30 celsius a stepper motor open a window in order to vent the tunnel. The sketch is working but for an unknown reason (for me) the stepper makes only 5 revolutions (to open the window) instead of 15. and only five to retun in the original position. My sensor is the 18ds....while my stepper is the 18Byj.... the economic one). I will be very greatful if some of you fix this simple but important sketch
Thanks all!!


I have only looked at the last bit of your code that controls the motor. It seems very straightforward. If it is not moving sufficient steps I suspect it is because you are not telling it to move far enough. Try increasing the number of steps in the moveTo() command.


Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131