Hello,
I bought my first microcontroller a few months ago, for a project of mine.
I'm using Thonny to program it.
I've managed to work out some simple functions, but I just can't get my head around how to combine functions. I believe this should be possible?
Can someone please help me with the programming?
I have one load that should be controlled by one vibrationsensor and one photoresistor.
The Vibrationsensor is 1/0
When the vibrationsensor gets triggered it should hold for (x)seconds and if it gets triggered again under the (x)seconds it should restart the counting.
the photoresistor is an resistance based sensor.
an photoresistor should use the ADC port. Ive made it work fine to power the load when the photoresistor are in my disired value.
but how do i put this function in "series" with the vibrationsensor?
basically
When both of these functions are TRUE the load shuld be powered
Sorry for an messy explanation.
Thanks
// Nisse
I bought my first microcontroller a few months ago, for a project of mine.
I'm using Thonny to program it.
I've managed to work out some simple functions, but I just can't get my head around how to combine functions. I believe this should be possible?
Can someone please help me with the programming?
I have one load that should be controlled by one vibrationsensor and one photoresistor.
The Vibrationsensor is 1/0
When the vibrationsensor gets triggered it should hold for (x)seconds and if it gets triggered again under the (x)seconds it should restart the counting.
the photoresistor is an resistance based sensor.
an photoresistor should use the ADC port. Ive made it work fine to power the load when the photoresistor are in my disired value.
but how do i put this function in "series" with the vibrationsensor?
basically
When both of these functions are TRUE the load shuld be powered
Sorry for an messy explanation.
Thanks
// Nisse