hello,
I need to know if the door is open or not.
Easy with a button.
But at the same time, I need to control the door lock system.
It requires 12v and it only need a little current.
I only need to send 12v for 200ms, and the door lock opens itself.
This part work manually but I need to control it from an arduino via Max5
A guy told me to use a relay to supply the door lock with my
I thought I could use "only" a transistor BD135-like.
So here are my questions:
- I read http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads & other schemas, but I cannot find the right wiring for me.
could someone make it for me ? - Do I really need a relay? or does this transistor could be enough?
- I would like to send a particular bytes ("o" for open..) from Max5 patch to Arduino and I'd like the arduino to compare the bytes received to a value constantly.
here is my sketch:
// send data only when you receive data:
if (Serial.available() > 0) {
digitalWrite(doorlockPin, HIGH) ;
delay(1000);
digitalWrite(doorlockPin, LOW) ;
Serial.flush();
}
else digitalWrite(doorlockPin, LOW) ;
The Serial.flush() is here because without it, the Serial.available is everytime >0 after the first byte sent.
I did that because Serial.read() results in a pointer and I cannot compare it...
Could someone help me with that ?
I'm finishing this last system for the museum I'm working with.
It would be so sweet to have some answers.
best,