I can't find the code sitting around, but its basically two parts, the arduino code that checks in the loop() function if the + pin of the magnetic door lock is high or low and turns the led on or off accordingly (its on a delay), it also plays a frequency through a piezo speaker (google arduino piezo). Then it sends a string to the pc that its connected to. The second part is a python script that is in infinite loop on PC looking for those strings on the serial port.
What kind of resistor did you use?? and to what pin did you connect the input line to?? was it analog or digital??
sguzman55 3 months ago
did you ever get the python script working??
rknjr2008 4 months ago
hello there, i m a student working on something thats similar, if you dont mind could you please share with me how did u do this?
the connections from the arduino to the magnetics switch. and the code for this.
thank you very much. aslam
aslamfajar 1 year ago
@aslamfajar
I can't find the code sitting around, but its basically two parts, the arduino code that checks in the loop() function if the + pin of the magnetic door lock is high or low and turns the led on or off accordingly (its on a delay), it also plays a frequency through a piezo speaker (google arduino piezo). Then it sends a string to the pc that its connected to. The second part is a python script that is in infinite loop on PC looking for those strings on the serial port.
mcraze123 1 year ago