hello, may anyone one help me, i;m stuck with my project.
I need to develop a solar tracking system which using LDR sensor and the light is by using touch light and exposed to the sensor so that the stepper motor can move.
I don't know how to write the source code that related with LDR sensor n stepper motor. I use PIC 16F877A microcontroller.
The ADC converts these analog signals to digital form. The digitally converted signals are then compared by the L293D motor driver and the stepper motor is rotated accordingly.
When LDR1 has higher light intensity than LDR2 then the resistance of LDR1 was smaller than that of LDR2 and the stepper motor rotates the solar panel in the counter clockwise direction.
When LDR2 has higher light intensity than LDR1 then the resistance of LDR1 was larger than that of LDR2 and the stepper motor will rotates the solar panel in the clockwise direction.
Please help me about the coding...I'm using MPLAB software with Hi-Tech compiler.
I need to develop a solar tracking system which using LDR sensor and the light is by using touch light and exposed to the sensor so that the stepper motor can move.
I don't know how to write the source code that related with LDR sensor n stepper motor. I use PIC 16F877A microcontroller.
The ADC converts these analog signals to digital form. The digitally converted signals are then compared by the L293D motor driver and the stepper motor is rotated accordingly.
When LDR1 has higher light intensity than LDR2 then the resistance of LDR1 was smaller than that of LDR2 and the stepper motor rotates the solar panel in the counter clockwise direction.
When LDR2 has higher light intensity than LDR1 then the resistance of LDR1 was larger than that of LDR2 and the stepper motor will rotates the solar panel in the clockwise direction.
Please help me about the coding...I'm using MPLAB software with Hi-Tech compiler.