Automation: Difference between revisions
Appearance
	
	
| imported>Merlyn  have fun added | imported>Merlyn m format | ||
| Line 18: | Line 18: | ||
| == Have fun == | == Have fun == | ||
| <syntaxhighlight lang="bash"> | |||
| while true; do echo 'd0' | nc svetlana.local 8008; sleep 0.1; echo 'e0' | nc svetlana.local 8008; echo 'd1' | nc svetlana.local 8008; sleep 0.1; echo 'e1' | nc svetlana.local 8008; done | while true; do echo 'd0' | nc svetlana.local 8008; sleep 0.1; echo 'e0' | nc svetlana.local 8008; echo 'd1' | nc svetlana.local 8008; sleep 0.1; echo 'e1' | nc svetlana.local 8008; done | ||
| </syntaxhighlight> | |||
Revision as of 16:23, 11 February 2015
Lights
Desk lights are now connected to rPi hanging from the shelf.
To turn on the lights: <syntaxhighlight lang="bash"> echo 'e0' | nc svetlana.local 8008 echo 'e1' | nc svetlana.local 8008 </syntaxhighlight>
To turn them off <syntaxhighlight lang="bash"> echo 'd0' | nc svetlana.local 8008 echo 'd1' | nc svetlana.local 8008 </syntaxhighlight>
There will probably be a physical control interface added in the future.
Have fun
<syntaxhighlight lang="bash"> while true; do echo 'd0' | nc svetlana.local 8008; sleep 0.1; echo 'e0' | nc svetlana.local 8008; echo 'd1' | nc svetlana.local 8008; sleep 0.1; echo 'e1' | nc svetlana.local 8008; done </syntaxhighlight>
