Projects:Spacestate: verschil tussen versies

Naar navigatie springen Naar zoeken springen
geen bewerkingssamenvatting
Geen bewerkingssamenvatting
Geen bewerkingssamenvatting
Regel 8: Regel 8:


=Spacestate Switch=
=Spacestate Switch=
[[Bestand:Spacestate-measure.jpg|miniatuur|267x267px|State measurement wires. Green = GND, connected to the bottom of the state switch. Yellow is where the Arduino measures, connected to the top of the state switch and with an internal pull-up resistor.]]


The Spacestate Switch was never documented, so this is an attempt to reverse engineer it. The physical device above was donated by SA007 (I think), and the controller was developed by Themba. I don't know whether there are still any copies of the source code.
The Spacestate Switch was never documented, so this is an attempt to reverse engineer it. The physical device above was donated by SA007 (I think), and the controller was developed by Themba. I don't know whether there are still any copies of the source code.
Regel 16: Regel 18:


The state of the switch is measured by pulling the bottom to ground (green wire in the image to the right), and then measuring the voltage at the top using the D5 pin with an internal pull-up (yellow wire). This will be ground when the space is OPEN (the two sides connect), and internal pull-up when the space is CLOSED.
The state of the switch is measured by pulling the bottom to ground (green wire in the image to the right), and then measuring the voltage at the top using the D5 pin with an internal pull-up (yellow wire). This will be ground when the space is OPEN (the two sides connect), and internal pull-up when the space is CLOSED.
[[Bestand:Spacestate-measure.jpg|miniatuur|267x267px|State measurement wires. Green = GND, connected to the bottom of the state switch. Yellow is where the Arduino measures, connected to the top of the state switch and with an internal pull-up resistor.]]
 
Then, the D2/D4/D5 control the LEDs in such a way that they switch colors using some nice animation when the state changes.
Then, the D2/D4/D5 control the LEDs in such a way that they switch colors using some nice animation when the state changes.


Navigatiemenu