# HG changeset patch # User drewp # Date 1555839935 25200 # Node ID fa74a9c9f7533dec6b9e087a0968d89971bd5e75 # Parent 1edf7f8d1995201f4bc20b4c04f89218d00ff4e6 rm old golang server that made an rdf graph from inputs on rpi (goraptor & hwio) Ignore-this: 9631ad748dccd16277c74ee602846add darcs-hash:223083e3a057713de9856ce548eddd285c8f48fa diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/index.html --- a/service/laundry/index.html Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ - - - - laundry pi - - - - -

laundry room pi

-
-
- current /status - (as an rdf graph) -
-
-

Inputs

-
motion: {{status.motion}}
-
switch1: {{status.switch1}}
-
switch2: {{status.switch2}}
-
switch3: {{status.switch3}}
-
doorClosed: {{status.doorClosed}}
-

Outputs

-
- orange led: {{status.led}} - - -
-
strike: {{status.strike}}
-
speaker: {{speakerStatus}}
-
-

Raw status

-
{{status | json}}
- - diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/laundrydoor-eagle.sch --- a/service/laundry/laundrydoor-eagle.sch Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,877 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/laundrydoor-opto2.sch --- a/service/laundry/laundrydoor-opto2.sch Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,427 +0,0 @@ -v 20110115 2 -C 51800 44700 1 0 0 connector9-2.sym -{ -T 53000 48800 5 10 1 1 0 6 1 -refdes=DB9 from outside -T 52100 48750 5 10 0 0 0 0 1 -device=CONNECTOR_9 -T 52100 48950 5 10 0 0 0 0 1 -footprint=SIP9N -} -T 53200 48300 9 10 1 0 0 6 1 -grn sw3 -T 53500 47900 9 10 1 0 0 6 1 -red motion -T 53300 47500 9 10 1 0 0 6 1 -orn sw1 -T 53500 47100 9 10 1 0 0 6 1 -yel led_out -T 53300 46700 9 10 1 0 0 6 1 -grn sw2 -T 53300 46300 9 10 1 0 0 6 1 -blu spkr -T 53300 45900 9 10 1 0 0 6 1 -pur Vcc -T 52900 45500 9 10 1 0 0 6 1 -NC -T 53200 45100 9 10 1 0 0 6 1 -blk gnd -C 55300 46700 1 90 1 led-1.sym -{ -T 54700 45900 5 10 0 0 270 2 1 -device=LED -T 54900 45900 5 10 1 1 270 2 1 -refdes=orange -T 54500 45900 5 10 0 0 270 2 1 -symversion=0.1 -} -C 55300 44400 1 0 1 ground.sym -C 54900 47200 1 0 1 resistor-1.sym -{ -T 54600 47600 5 10 0 0 0 6 1 -device=RESISTOR -T 54700 47500 5 10 1 1 0 6 1 -refdes=1K -} -N 55100 44700 55100 46200 4 -N 54900 47300 55100 47300 4 -N 55100 47300 55100 46700 4 -N 54000 47300 51800 47300 4 -N 51800 47300 51800 47100 4 -N 51800 44600 51800 45300 4 -N 51800 45300 55100 45300 4 -C 48400 48700 1 0 1 resistor-1.sym -{ -T 48100 49100 5 10 0 0 0 6 1 -device=RESISTOR -T 48200 49000 5 10 1 1 0 6 1 -refdes=200 -} -N 48400 48800 51400 48800 4 -N 51400 48800 51400 47900 4 -N 51400 47900 51800 47900 4 -N 47400 47900 51100 47900 4 -C 48700 47100 1 0 1 vcc-1.sym -C 48500 46700 1 0 1 resistor-1.sym -{ -T 48200 47100 5 10 0 0 0 6 1 -device=RESISTOR -T 48300 47000 5 10 1 1 0 6 1 -refdes=200 -} -C 48500 46500 1 0 1 resistor-1.sym -{ -T 48200 46900 5 10 0 0 0 6 1 -device=RESISTOR -T 48300 46800 5 10 1 1 0 6 1 -refdes=200 -} -C 48500 44500 1 0 1 resistor-1.sym -{ -T 48200 44900 5 10 0 0 0 6 1 -device=RESISTOR -T 48300 44800 5 10 1 1 0 6 1 -refdes=200 -} -N 48500 40600 48500 47100 4 -N 47600 46800 47400 46800 4 -N 47600 46600 47400 46600 4 -N 47600 44600 47400 44600 4 -N 51800 48300 47700 48300 4 -N 47700 48300 47700 47700 4 -N 47700 47700 47400 47700 4 -N 51800 47500 49600 47500 4 -N 49600 47500 49600 45700 4 -N 49600 45700 47400 45700 4 -N 51800 46700 49800 46700 4 -N 49800 46700 49800 45500 4 -N 49800 45500 47400 45500 4 -N 51800 45900 48900 45900 4 -N 48900 45900 48900 46800 4 -N 48900 46800 48500 46800 4 -N 48500 42800 47400 42800 4 -N 51800 47100 50000 47100 4 -N 50000 47100 50000 43200 4 -N 48500 42100 47400 42100 4 -N 49800 41700 50200 41700 4 -N 50200 41700 50200 46300 4 -N 50200 46300 51800 46300 4 -C 45000 48100 1 0 1 resistor-1.sym -{ -T 44700 48500 5 10 0 0 0 6 1 -device=RESISTOR -T 44800 48400 5 10 1 1 0 6 1 -refdes=1K -} -C 45000 47400 1 0 1 resistor-1.sym -{ -T 44700 47800 5 10 0 0 0 6 1 -device=RESISTOR -T 44800 47700 5 10 1 1 0 6 1 -refdes=1K -} -C 45000 45900 1 0 1 resistor-1.sym -{ -T 44700 46300 5 10 0 0 0 6 1 -device=RESISTOR -T 44800 46200 5 10 1 1 0 6 1 -refdes=1K -} -C 45000 45200 1 0 1 resistor-1.sym -{ -T 44700 45600 5 10 0 0 0 6 1 -device=RESISTOR -T 44800 45500 5 10 1 1 0 6 1 -refdes=1K -} -T 45200 49600 9 10 1 0 0 6 3 -1K to protect Pi -in case a pin is -set to output mode -N 45400 48200 45000 48200 4 -N 45400 47500 45000 47500 4 -N 45400 46000 45000 46000 4 -N 45400 45300 45000 45300 4 -C 39500 41700 1 0 0 header26-2.sym -{ -T 39600 49500 5 10 1 1 0 0 1 -refdes=r-pi gpio -T 39900 49600 5 10 0 0 0 0 1 -footprint=header26 -T 39900 50000 5 10 0 0 0 0 1 -device=header26 -} -N 40800 47900 45200 47900 4 -N 40800 48800 44000 48800 4 -N 40800 48200 43800 48200 4 -N 43800 48200 43800 47500 4 -N 40800 47600 43600 47600 4 -N 43600 46000 43600 47600 4 -N 43600 46000 44100 46000 4 -N 40800 46400 43400 46400 4 -N 43400 46400 43400 45300 4 -N 43400 45300 44100 45300 4 -N 40800 45800 43100 45800 4 -N 43100 45800 43100 43400 4 -C 43600 43300 1 0 0 resistor-1.sym -{ -T 43900 43700 5 10 0 0 0 0 1 -device=RESISTOR -T 43800 43600 5 10 1 1 0 0 1 -refdes=200 -} -C 43600 41300 1 0 0 resistor-1.sym -{ -T 43900 41700 5 10 0 0 0 0 1 -device=RESISTOR -T 43800 41600 5 10 1 1 0 0 1 -refdes=200 -} -N 43100 43400 43600 43400 4 -N 44500 43400 45400 43400 4 -N 40800 45200 42800 45200 4 -N 42800 45200 42800 41400 4 -N 42800 41400 43600 41400 4 -N 44500 41400 45400 41400 4 -L 46400 52200 46500 38500 7 0 0 0 -1 -1 -N 50000 43200 47400 43200 4 -T 45100 51900 9 10 1 0 0 0 1 -Pi side (3.3V) -T 46600 51900 9 10 1 0 0 0 1 -outdoor isolation (5V) -C 51700 44300 1 0 0 gnd-1.sym -C 48700 49900 1 0 0 led-1.sym -{ -T 49500 50500 5 10 0 0 0 0 1 -device=LED -T 49500 50300 5 10 1 1 0 0 1 -refdes=power -T 49500 50700 5 10 0 0 0 0 1 -symversion=0.1 -} -C 54700 48700 1 0 0 header3-1.sym -{ -T 55700 49350 5 10 0 0 0 0 1 -device=HEADER3 -T 55100 50000 5 10 1 1 0 0 1 -refdes=PX-555-28027 -} -T 55100 49700 9 10 1 0 0 0 1 -GND -T 55100 49300 9 10 1 0 0 0 1 -VCC -T 55100 48900 9 10 1 0 0 0 1 -OUT -N 51800 47900 51800 48100 4 -N 51800 48100 54000 48100 4 -N 51800 45900 51800 46100 4 -N 51800 46100 53600 46100 4 -N 53600 46100 53600 49400 4 -N 53600 49300 54700 49300 4 -N 54700 49700 53800 49700 4 -N 53800 49700 53800 45300 4 -C 53600 50100 1 0 0 led-1.sym -{ -T 54400 50700 5 10 0 0 0 0 1 -device=LED -T 54400 50500 5 10 1 1 0 0 1 -refdes=blue -T 54400 50900 5 10 0 0 0 0 1 -symversion=0.1 -} -C 53700 50300 1 90 1 resistor-1.sym -{ -T 53300 50000 5 10 0 0 90 6 1 -device=RESISTOR -T 53400 50100 5 10 1 1 90 6 1 -refdes=1K -} -N 54500 50300 54500 49700 4 -C 55500 47700 1 0 0 switch-spst-1.sym -{ -T 55900 48400 5 10 0 0 0 0 1 -device=SPST -T 55800 48000 5 10 1 1 0 0 1 -refdes=S? -} -C 55500 46900 1 0 0 switch-spst-1.sym -{ -T 55900 47600 5 10 0 0 0 0 1 -device=SPST -T 55800 47200 5 10 1 1 0 0 1 -refdes=S? -} -C 55500 48500 1 0 0 switch-spst-1.sym -{ -T 55900 49200 5 10 0 0 0 0 1 -device=SPST -T 55800 48800 5 10 1 1 0 0 1 -refdes=S? -} -N 54000 48100 54000 48900 4 -N 54000 48900 54700 48900 4 -N 55500 48500 51800 48500 4 -N 51800 48500 51800 48300 4 -N 55500 47700 51800 47700 4 -N 51800 47700 51800 47500 4 -N 55500 46900 51800 46900 4 -N 51800 46900 51800 46700 4 -N 56300 45300 56300 48500 4 -N 56300 45300 55100 45300 4 -C 54500 42000 1 0 0 speaker-1.sym -{ -T 56500 44500 5 10 0 0 0 0 1 -device=SPEAKER -T 55100 44000 5 10 1 1 0 0 1 -refdes=SPK? -} -N 54500 43900 54500 45300 4 -N 54100 42700 54500 42700 4 -N 54100 42700 54100 46500 4 -N 54100 46500 51800 46500 4 -N 51800 46500 51800 46300 4 -T 52600 51600 9 10 1 0 0 0 1 -above door -C 49800 49800 1 0 1 ground.sym -C 48700 50000 1 0 1 resistor-1.sym -{ -T 48400 50400 5 10 0 0 0 6 1 -device=RESISTOR -T 48500 50300 5 10 1 1 0 6 1 -refdes=1K -} -C 48000 50100 1 0 1 vcc-1.sym -C 47400 44400 1 0 1 ILQ74.sym -{ -T 47100 49400 5 10 1 1 0 6 1 -device=ILQ74 -T 47100 49200 5 10 1 1 0 6 1 -refdes=X? -} -C 45400 39000 1 0 0 ILQ74.sym -{ -T 45700 44000 5 10 1 1 0 0 1 -device=ILQ74 -T 45700 43800 5 10 1 1 0 0 1 -refdes=X? -} -N 47400 48800 47500 48800 4 -N 45400 48600 45200 48600 4 -N 45200 40300 45200 48600 4 -N 45200 47100 45400 47100 4 -N 45200 46400 45400 46400 4 -N 45200 44900 45400 44900 4 -N 44100 48200 44000 48200 4 -N 44000 48200 44000 48800 4 -N 43800 47500 44100 47500 4 -N 45200 42500 45400 42500 4 -N 45200 42300 45400 42300 4 -C 55000 37300 1 0 0 switch-spst-1.sym -{ -T 55400 38000 5 10 0 0 0 0 1 -device=SPST -T 55300 37600 5 10 1 1 0 0 1 -refdes=DOOR_CLOSE -} -C 53900 35800 1 90 0 coil-2.sym -{ -T 53400 36000 5 10 0 0 90 0 1 -device=COIL -T 53600 36000 5 10 1 1 90 0 1 -refdes=STRIKE -T 53200 36000 5 10 0 0 90 0 1 -symversion=0.1 -} -B 52500 35500 4300 2500 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 -T 52600 37800 9 10 1 0 0 0 1 -inside door -N 40800 44000 42200 44000 4 -N 42200 44000 42200 32800 4 -N 40800 43400 41900 43400 4 -N 41900 43400 41900 41200 4 -N 40800 44600 42500 44600 4 -N 42500 33200 42500 44600 4 -N 42500 33200 55000 33200 4 -N 55800 37300 55900 37300 4 -N 55900 37300 55900 32800 4 -N 55900 32800 43900 32800 4 -C 43900 32700 1 0 1 resistor-1.sym -{ -T 43600 33100 5 10 0 0 0 6 1 -device=RESISTOR -T 43600 33000 5 10 1 1 0 6 1 -refdes=1K -} -N 43000 32800 42200 32800 4 -C 49100 34700 1 0 0 npn-2.sym -{ -T 49700 35200 5 10 0 0 0 0 1 -device=NPN_TRANSISTOR -T 49700 35200 5 10 1 1 0 0 1 -refdes=Q? -} -C 48700 35100 1 0 1 resistor-1.sym -{ -T 48400 35500 5 10 0 0 0 6 1 -device=RESISTOR -T 48500 35400 5 10 1 1 0 6 1 -refdes=10K -} -C 48900 34800 1 90 1 resistor-1.sym -{ -T 48500 34500 5 10 0 0 90 6 1 -device=RESISTOR -T 48600 34600 5 10 1 1 90 6 1 -refdes=100K -} -N 48800 33600 50400 33600 4 -N 49600 33600 49600 34700 4 -N 48800 33900 48800 33600 4 -N 48800 34800 48800 35200 4 -N 48700 35200 49100 35200 4 -N 43600 41200 41900 41200 4 -N 49600 35700 53800 35700 4 -C 50900 37500 1 0 0 generic-power.sym -{ -T 51100 37750 5 10 1 1 0 3 1 -net=12V -} -N 51100 36800 53800 36800 4 -C 51300 35800 1 90 0 diode-1.sym -{ -T 50700 36200 5 10 0 0 90 0 1 -device=DIODE -T 50800 36100 5 10 1 1 90 0 1 -refdes=D? -} -N 51100 35800 51100 35700 4 -N 51100 36700 51100 37500 4 -N 51100 38300 51100 47900 4 -N 51100 45100 51800 45100 4 -T 48700 47300 9 10 1 0 0 0 1 -5V -B 52500 41700 4300 10100 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 -C 43600 41100 1 0 0 resistor-1.sym -{ -T 43900 41500 5 10 0 0 0 0 1 -device=RESISTOR -T 43800 40900 5 10 1 1 0 0 1 -refdes=200 -} -N 44500 41200 45400 41200 4 -N 48500 40600 47400 40600 4 -N 51100 38300 50400 38300 4 -N 50400 38300 50400 33600 4 -N 45200 40300 45400 40300 4 -N 47400 41000 47800 41000 4 -N 47800 41000 47800 35200 4 -N 55000 33200 55000 37300 4 -N 53800 35700 53800 35800 4 -C 49800 41600 1 0 1 resistor-1.sym -{ -T 49500 42000 5 10 0 0 0 6 1 -device=RESISTOR -T 49600 41900 5 10 1 1 0 6 1 -refdes=100 -} -N 48900 41700 47400 41700 4 diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/laundrydoor.sch --- a/service/laundry/laundrydoor.sch Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,352 +0,0 @@ -v 20110115 2 -C 40000 40000 0 0 0 title-B.sym -C 47500 47900 1 0 1 4N25-1.sym -{ -T 46600 49900 5 10 0 0 0 6 1 -device=4N25 -T 45700 49700 5 10 1 1 0 0 1 -refdes=U? -} -C 51800 44700 1 0 0 connector9-2.sym -{ -T 53000 48800 5 10 1 1 0 6 1 -refdes=DB9 from outside -T 52100 48750 5 10 0 0 0 0 1 -device=CONNECTOR_9 -T 52100 48950 5 10 0 0 0 0 1 -footprint=SIP9N -} -T 53200 48300 9 10 1 0 0 6 1 -grn sw3 -T 53500 47900 9 10 1 0 0 6 1 -red motion -T 53300 47500 9 10 1 0 0 6 1 -orn sw1 -T 53500 47100 9 10 1 0 0 6 1 -yel led_out -T 53300 46700 9 10 1 0 0 6 1 -grn sw2 -T 53300 46300 9 10 1 0 0 6 1 -blu spkr -T 53300 45900 9 10 1 0 0 6 1 -pur Vcc -T 52900 45500 9 10 1 0 0 6 1 -NC -T 53200 45100 9 10 1 0 0 6 1 -blk gnd -C 55300 46700 1 90 1 led-1.sym -{ -T 54700 45900 5 10 0 0 270 2 1 -device=LED -T 54900 45900 5 10 1 1 270 2 1 -refdes=orange -T 54500 45900 5 10 0 0 270 2 1 -symversion=0.1 -} -C 55300 44400 1 0 1 ground.sym -C 54900 47200 1 0 1 resistor-1.sym -{ -T 54600 47600 5 10 0 0 0 6 1 -device=RESISTOR -T 54700 47500 5 10 1 1 0 6 1 -refdes=1K -} -N 55100 44700 55100 46200 4 -N 54900 47300 55100 47300 4 -N 55100 47300 55100 46700 4 -N 54000 47300 51800 47300 4 -N 51800 47300 51800 47100 4 -N 51800 44600 51800 45300 4 -N 51800 45300 55100 45300 4 -C 48400 49000 1 0 1 resistor-1.sym -{ -T 48100 49400 5 10 0 0 0 6 1 -device=RESISTOR -T 48200 49300 5 10 1 1 0 6 1 -refdes=R? -} -N 48400 49100 49100 49100 4 -N 49100 49100 49100 47900 4 -N 49100 47900 51800 47900 4 -C 47900 47700 1 0 1 ground.sym -N 47500 48200 47700 48200 4 -N 47700 48200 47700 48000 4 -C 47500 45800 1 0 1 4N25-1.sym -{ -T 46600 47800 5 10 0 0 0 6 1 -device=4N25 -T 45700 47600 5 10 1 1 0 0 1 -refdes=U? -} -C 47500 43700 1 0 1 4N25-1.sym -{ -T 46600 45700 5 10 0 0 0 6 1 -device=4N25 -T 45700 45500 5 10 1 1 0 0 1 -refdes=U? -} -C 47500 41600 1 0 1 4N25-1.sym -{ -T 46600 43600 5 10 0 0 0 6 1 -device=4N25 -T 45700 43400 5 10 1 1 0 0 1 -refdes=U? -} -C 48700 47100 1 0 1 vcc-1.sym -C 48500 46900 1 0 1 resistor-1.sym -{ -T 48200 47300 5 10 0 0 0 6 1 -device=RESISTOR -T 48300 47200 5 10 1 1 0 6 1 -refdes=R? -} -C 48500 44800 1 0 1 resistor-1.sym -{ -T 48200 45200 5 10 0 0 0 6 1 -device=RESISTOR -T 48300 45100 5 10 1 1 0 6 1 -refdes=R? -} -C 48500 42700 1 0 1 resistor-1.sym -{ -T 48200 43100 5 10 0 0 0 6 1 -device=RESISTOR -T 48300 43000 5 10 1 1 0 6 1 -refdes=R? -} -N 48500 36300 48500 47100 4 -N 47600 47000 47500 47000 4 -N 47600 44900 47500 44900 4 -N 47600 42800 47500 42800 4 -N 51800 48300 49400 48300 4 -N 49400 48300 49400 46100 4 -N 49400 46100 47500 46100 4 -N 51800 47500 49600 47500 4 -N 49600 47500 49600 44000 4 -N 49600 44000 47500 44000 4 -N 51800 46700 49800 46700 4 -N 49800 46700 49800 41900 4 -N 49800 41900 47500 41900 4 -N 51800 45900 48900 45900 4 -N 48900 45900 48900 47000 4 -N 48900 47000 48500 47000 4 -C 45400 39700 1 180 1 4N25-1.sym -{ -T 46300 37700 5 10 0 0 180 6 1 -device=4N25 -T 47200 37900 5 10 1 1 180 0 1 -refdes=U? -} -C 45400 37500 1 180 1 4N25-1.sym -{ -T 46300 35500 5 10 0 0 180 6 1 -device=4N25 -T 47200 35700 5 10 1 1 180 0 1 -refdes=U? -} -N 48500 38500 47500 38500 4 -N 48700 39400 48700 41100 4 -N 50000 41100 48700 41100 4 -N 51800 47100 50000 47100 4 -N 50000 47100 50000 41100 4 -N 48500 36300 47500 36300 4 -N 47500 37200 50200 37200 4 -N 50200 37200 50200 46300 4 -N 50200 46300 51800 46300 4 -C 45000 41500 1 0 1 gnd-1.sym -N 45400 41900 44900 41900 4 -N 44900 41800 44900 48200 4 -N 44900 44000 45400 44000 4 -N 44900 46100 45400 46100 4 -N 44900 48200 45400 48200 4 -C 44600 49000 1 0 1 resistor-1.sym -{ -T 44300 49400 5 10 0 0 0 6 1 -device=RESISTOR -T 44400 49300 5 10 1 1 0 6 1 -refdes=1K -} -C 44700 46900 1 0 1 resistor-1.sym -{ -T 44400 47300 5 10 0 0 0 6 1 -device=RESISTOR -T 44500 47200 5 10 1 1 0 6 1 -refdes=1K -} -C 44700 44800 1 0 1 resistor-1.sym -{ -T 44400 45200 5 10 0 0 0 6 1 -device=RESISTOR -T 44500 45100 5 10 1 1 0 6 1 -refdes=1K -} -C 44700 42700 1 0 1 resistor-1.sym -{ -T 44400 43100 5 10 0 0 0 6 1 -device=RESISTOR -T 44500 43000 5 10 1 1 0 6 1 -refdes=1K -} -T 45200 49600 9 10 1 0 0 6 3 -1K to protect Pi -in case a pin is -set to output mode -N 45400 49100 44600 49100 4 -N 45400 47000 44700 47000 4 -N 45400 44900 44700 44900 4 -N 45400 42800 44700 42800 4 -C 40600 41700 1 0 0 header26-2.sym -{ -T 40700 49500 5 10 1 1 0 0 1 -refdes=r-pi gpio -T 41000 49600 5 10 0 0 0 0 1 -footprint=header26 -T 41000 50000 5 10 0 0 0 0 1 -device=header26 -} -N 41900 47900 44900 47900 4 -N 41900 48800 43700 48800 4 -N 43700 48800 43700 49100 4 -N 41900 48200 43800 48200 4 -N 43800 48200 43800 47000 4 -N 41900 47600 43600 47600 4 -N 43600 44900 43600 47600 4 -N 43600 44900 43800 44900 4 -N 41900 46400 43400 46400 4 -N 43400 46400 43400 42800 4 -N 43400 42800 43800 42800 4 -N 41900 45800 43100 45800 4 -N 43100 45800 43100 38500 4 -C 44200 38400 1 0 0 resistor-1.sym -{ -T 44500 38800 5 10 0 0 0 0 1 -device=RESISTOR -T 43700 38700 5 10 1 1 0 0 1 -refdes=R? -} -C 44200 36200 1 0 0 resistor-1.sym -{ -T 44500 36600 5 10 0 0 0 0 1 -device=RESISTOR -T 44400 36500 5 10 1 1 0 0 1 -refdes=R? -} -N 43100 38500 44200 38500 4 -N 45100 38500 45400 38500 4 -N 41900 45200 42800 45200 4 -N 42800 45200 42800 36300 4 -N 42800 36300 44200 36300 4 -N 45100 36300 45400 36300 4 -N 44900 41900 43800 41900 4 -N 43800 37200 43800 41900 4 -N 43800 39400 45400 39400 4 -N 43800 37200 45400 37200 4 -L 46400 52200 46400 33400 3 0 0 0 -1 -1 -N 48700 39400 47500 39400 4 -T 43000 51900 9 10 1 0 0 0 1 -Pi side -T 48000 51900 9 10 1 0 0 0 1 -outdoor isolation -C 51700 44300 1 0 0 gnd-1.sym -C 48700 49900 1 0 0 led-1.sym -{ -T 49500 50500 5 10 0 0 0 0 1 -device=LED -T 49500 50300 5 10 1 1 0 0 1 -refdes=power -T 49500 50700 5 10 0 0 0 0 1 -symversion=0.1 -} -C 54700 48700 1 0 0 header3-1.sym -{ -T 55700 49350 5 10 0 0 0 0 1 -device=HEADER3 -T 55100 50000 5 10 1 1 0 0 1 -refdes=PX-555-28027 -} -T 55100 49700 9 10 1 0 0 0 1 -GND -T 55100 49300 9 10 1 0 0 0 1 -VCC -T 55100 48900 9 10 1 0 0 0 1 -OUT -N 51800 47900 51800 48100 4 -N 51800 48100 54000 48100 4 -N 51800 45900 51800 46100 4 -N 51800 46100 53600 46100 4 -N 53600 46100 53600 49400 4 -N 53600 49300 54700 49300 4 -N 54700 49700 53800 49700 4 -N 53800 49700 53800 45300 4 -C 53600 50100 1 0 0 led-1.sym -{ -T 54400 50700 5 10 0 0 0 0 1 -device=LED -T 54400 50500 5 10 1 1 0 0 1 -refdes=blue -T 54400 50900 5 10 0 0 0 0 1 -symversion=0.1 -} -C 53700 50300 1 90 1 resistor-1.sym -{ -T 53300 50000 5 10 0 0 90 6 1 -device=RESISTOR -T 53400 50100 5 10 1 1 90 6 1 -refdes=1K -} -N 54500 50300 54500 49700 4 -C 55500 47700 1 0 0 switch-spst-1.sym -{ -T 55900 48400 5 10 0 0 0 0 1 -device=SPST -T 55800 48000 5 10 1 1 0 0 1 -refdes=S? -} -C 55500 46900 1 0 0 switch-spst-1.sym -{ -T 55900 47600 5 10 0 0 0 0 1 -device=SPST -T 55800 47200 5 10 1 1 0 0 1 -refdes=S? -} -C 55500 48500 1 0 0 switch-spst-1.sym -{ -T 55900 49200 5 10 0 0 0 0 1 -device=SPST -T 55800 48800 5 10 1 1 0 0 1 -refdes=S? -} -N 54000 48100 54000 48900 4 -N 54000 48900 54700 48900 4 -N 55500 48500 51800 48500 4 -N 51800 48500 51800 48300 4 -N 55500 47700 51800 47700 4 -N 51800 47700 51800 47500 4 -N 55500 46900 51800 46900 4 -N 51800 46900 51800 46700 4 -N 56300 45300 56300 48500 4 -N 56300 45300 55100 45300 4 -C 54500 42000 1 0 0 speaker-1.sym -{ -T 56500 44500 5 10 0 0 0 0 1 -device=SPEAKER -T 55100 44000 5 10 1 1 0 0 1 -refdes=SPK? -} -N 54500 43900 54500 45300 4 -N 54100 42700 54500 42700 4 -N 54100 42700 54100 46500 4 -N 54100 46500 51800 46500 4 -N 51800 46500 51800 46300 4 -L 52500 52300 52500 33600 3 0 0 0 -1 -1 -T 53100 51900 9 10 1 0 0 0 1 -above door -C 49800 49800 1 0 1 ground.sym -C 48700 50000 1 0 1 resistor-1.sym -{ -T 48400 50400 5 10 0 0 0 6 1 -device=RESISTOR -T 48500 50300 5 10 1 1 0 6 1 -refdes=1K -} -C 48000 50100 1 0 1 vcc-1.sym diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/makefile --- a/service/laundry/makefile Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - -run: laundry - ./laundry - -laundry: laundry.go - GOPATH=`pwd` /opt/go/bin/go build laundry.go - -deps: - GOPATH=`pwd` /opt/go/bin/go get github.com/mrmorphic/hwio - GOPATH=`pwd` /opt/go/bin/go get github.com/stretchr/goweb - apt-get install libraptor2-dev - GOPATH=`pwd` /opt/go/bin/go get bitbucket.org/ww/goraptor - perl -lpi -e 's,/usr/local/,/usr/,' src/bitbucket.org/ww/goraptor/goraptor.go - GOPATH=`pwd` /opt/go/bin/go build .../goraptor diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/src/bigasterisk/laundry.go --- a/service/laundry/src/bigasterisk/laundry.go Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,366 +0,0 @@ -package main - -import ( - "bitbucket.org/ww/goraptor" - "encoding/json" - "errors" - "github.com/mrmorphic/hwio" - "github.com/stretchr/goweb" - "github.com/stretchr/goweb/context" - "log" - "net" - "net/http" - "runtime" - "time" -) - -type Hardware struct { - InMotion, InSwitch3, InSwitch1, InSwitch2, OutLed, OutSpeaker, InDoorClosed, OutStrike hwio.Pin - LastOutLed, LastOutStrike string -} - -func DigitalRead(p hwio.Pin) int { - v, err := hwio.DigitalRead(p) - if err != nil { - panic(err) - } - return v -} - -func (h *Hardware) GetMotion() string { - if DigitalRead(h.InMotion) == 0 { - return "motion" - } else { - return "noMotion" - } -} - -func (h *Hardware) GetDoor() string { - if DigitalRead(h.InDoorClosed) == 1 { - return "closed" - } else { - return "open" - } -} - -func (h *Hardware) GetSwitch(which string) string { - var level int - switch which { - case "1": - level = DigitalRead(h.InSwitch1) - case "2": - level = DigitalRead(h.InSwitch2) - case "3": - level = DigitalRead(h.InSwitch3) - } - if level == 0 { - return "closed" - } else { - return "open" - } -} - -func (h *Hardware) GetLed() string { - return h.LastOutLed -} - -func (h *Hardware) GetStrike() string { - return h.LastOutStrike -} - -func (h *Hardware) SetLed(state string) { - switch state { - case "on": - hwio.DigitalWrite(h.OutLed, 1) - case "off": - hwio.DigitalWrite(h.OutLed, 0) - default: - panic(errors.New("unknown state")) - } - h.LastOutLed = state -} - -func (h *Hardware) SetStrike(state string) { - switch state { - case "unlocked": - hwio.DigitalWrite(h.OutStrike, 1) - case "locked": - hwio.DigitalWrite(h.OutStrike, 0) - default: - panic(errors.New("unknown state")) - } - h.LastOutStrike = state -} - -// hwio.GetPin with a panic instead of an error return -func GetPin(id string) hwio.Pin { - p, e := hwio.GetPin(id) - if e != nil { - panic(e) - } - return p -} - -/* -hwio.DebugPinMap() wrote this: - -Pin 1: 3.3V, cap: -Pin 2: 5V, cap: -Pin 3: SDA,GPIO0 (rev2 -> GPIO2) cap:output,input,input_pullup,input_pulldown -Pin 5: SCL,GPIO1 (rev2 -> GPIO3) cap:output,input,input_pullup,input_pulldown -Pin 6: GROUND, cap: -Pin 7: GPIO4 cap:output,input,input_pullup,input_pulldown -Pin 8: TXD,GPIO14 cap:output,input,input_pullup,input_pulldown -Pin 10: RXD,GPIO15 cap:output,input,input_pullup,input_pulldown -Pin 11: GPIO17 cap:output,input,input_pullup,input_pulldown -Pin 12: GPIO18 cap:output,input,input_pullup,input_pulldown -Pin 13: GPIO21 (rev2 -> GPIO27) cap:output,input,input_pullup,input_pulldown -Pin 15: GPIO22 cap:output,input,input_pullup,input_pulldown -Pin 16: GPIO23 cap:output,input,input_pullup,input_pulldown -Pin 18: GPIO24 cap:output,input,input_pullup,input_pulldown -Pin 19: MOSI,GPIO10 cap:output,input,input_pullup,input_pulldown -Pin 21: MISO,GPIO9 cap:output,input,input_pullup,input_pulldown -Pin 22: GPIO25 cap:output,input,input_pullup,input_pulldown -Pin 23: SCLK,GPIO11 cap:output,input,input_pullup,input_pulldown -Pin 24: CE0N,GPIO8 cap:output,input,input_pullup,input_pulldown -Pin 26: CE1N,GPIO7 cap:output,input,input_pullup,input_pulldown -*/ - -func SetupIo() Hardware { - //return Hardware{} - pins := Hardware{ - InMotion: GetPin("GPIO2"), // pi rev2 calls it GPIO2 - InSwitch3: GetPin("GPIO3"), // pi rev2 calls it GPIO3 - InSwitch1: GetPin("GPIO4"), - InSwitch2: GetPin("GPIO17"), - OutLed: GetPin("GPIO27"), // pi rev2 calls it GPIO27 - OutSpeaker: GetPin("GPIO22"), - InDoorClosed: GetPin("GPIO10"), - OutStrike: GetPin("GPIO9"), - } - - if err := hwio.PinMode(pins.InMotion, hwio.INPUT_PULLUP); err != nil { - panic(err) - } - if err := hwio.PinMode(pins.InSwitch1, hwio.INPUT_PULLUP); err != nil { - panic(err) - } - if err := hwio.PinMode(pins.InSwitch2, hwio.INPUT_PULLUP); err != nil { - panic(err) - } - if err := hwio.PinMode(pins.InSwitch3, hwio.INPUT_PULLUP); err != nil { - panic(err) - } - if err := hwio.PinMode(pins.InDoorClosed, hwio.INPUT_PULLDOWN); err != nil { - panic(err) - } - if err := hwio.PinMode(pins.OutLed, hwio.OUTPUT); err != nil { - panic(err) - } - if err := hwio.PinMode(pins.OutSpeaker, hwio.OUTPUT); err != nil { - panic(err) - } - if err := hwio.PinMode(pins.OutStrike, hwio.OUTPUT); err != nil { - panic(err) - } - pins.SetLed("off") - pins.SetStrike("locked") - return pins -} - -func serializeGowebResponse( - c context.Context, - syntaxName string, - statements chan *goraptor.Statement) error { - var str string - if syntaxName == "trig" { - // real trig mode is crashing - - serializer := goraptor.NewSerializer("ntriples") - defer serializer.Free() - ntriples, err := serializer.Serialize(statements, "") - if err != nil { - panic(err) - } - log.Printf("got %d bytes of ntriples", len(ntriples)) - str = " { " + ntriples + "}" - log.Printf("str now %d bytes", len(str)) - } else { - serializer := goraptor.NewSerializer(syntaxName) - defer serializer.Free() - - var err error - str, err = serializer.Serialize(statements, "") - if err != nil { - panic(err) - } - } - - c.HttpResponseWriter().Header().Set("Content-Type", - goraptor.SerializerSyntax[syntaxName].MimeType) - return goweb.Respond.With(c, 200, []byte(str)) -} - -func namespace(ns string) func(string) *goraptor.Uri { - return func(path string) *goraptor.Uri { - var u goraptor.Uri = goraptor.Uri(ns + path) - return &u - } -} - -func literal(v string, datatype *goraptor.Uri) (ret *goraptor.Literal) { - ret = new(goraptor.Literal) - ret.Value = v - if datatype != nil { - ret.Datatype = string(*datatype) - } - return -} - -func nowLiteral() *goraptor.Literal { - XS := namespace("http://www.w3.org/2001/XMLSchema#") - rfc3999Time, err := time.Now().MarshalJSON() - if err != nil { - panic(err) - } - return literal(string(rfc3999Time[:]), XS("dateTime")) -} - -func main() { - pins := SetupIo() - - goweb.MapStatic("/static", "static") - - // this one needs to fail if the hardware is broken in - // any way that we can determine, though I'm not sure - // what that will mean on rpi - goweb.MapStaticFile("/", "index.html") - - goweb.Map("GET", "/status", func(c context.Context) error { - jsonEncode := json.NewEncoder(c.HttpResponseWriter()) - jsonEncode.Encode(map[string]interface{}{ - "motion": pins.GetMotion(), - "switch1": pins.GetSwitch("1"), - "switch2": pins.GetSwitch("2"), - "switch3": pins.GetSwitch("3"), - "doorClosed": pins.GetDoor(), - "led": pins.LastOutLed, - "strike": pins.LastOutStrike, - }) - return nil - }) - - goweb.Map("GET", "/trig", func(c context.Context) error { - statements := make(chan *goraptor.Statement, 100) - close(statements) - serializer := goraptor.NewSerializer("trig") - defer serializer.Free() - - str, err := serializer.Serialize(statements, "") - if err != nil { - panic(err) - } - return goweb.Respond.With(c, 200, []byte(str)) - }) - - goweb.Map("GET", "/graph", func(c context.Context) error { - DC := namespace("http://purl.org/dc/terms/") - ROOM := namespace("http://projects.bigasterisk.com/room/") - - statements := make(chan *goraptor.Statement, 100) - - graph := ROOM("laundryDoor") - - _, thisFile, _, _ := runtime.Caller(0) - statements <- &(goraptor.Statement{ - graph, DC("creator"), literal(thisFile, nil), graph}) - statements <- &(goraptor.Statement{ - graph, DC("modified"), nowLiteral(), graph}) - - for subj, state := range map[*goraptor.Uri]*goraptor.Uri{ - ROOM("laundryDoorMotion"): ROOM(pins.GetMotion()), - ROOM("laundryDoorOpen"): ROOM(pins.GetDoor()), - ROOM("laundryDoorSwitch1"): ROOM(pins.GetSwitch("1")), - ROOM("laundryDoorSwitch2"): ROOM(pins.GetSwitch("2")), - ROOM("laundryDoorSwitch3"): ROOM(pins.GetSwitch("3")), - ROOM("laundryDoorLed"): ROOM(pins.GetLed()), - ROOM("laundryDoorStrike"): ROOM(pins.GetStrike()), - } { - statements <- &(goraptor.Statement{subj, ROOM("state"), state, graph}) - } - - close(statements) - return serializeGowebResponse(c, "nquads", statements) - }) - - goweb.Map("PUT", "/led", func(c context.Context) error { - body, err := c.RequestBody() - if err != nil { - panic(err) - } - - pins.SetLed(string(body)) - return goweb.Respond.WithStatusText(c, http.StatusAccepted) - }) - - goweb.Map("PUT", "/strike", func(c context.Context) error { - body, err := c.RequestBody() - if err != nil { - panic(err) - } - - pins.SetStrike(string(body)) - return goweb.Respond.WithStatusText(c, http.StatusAccepted) - }) - - goweb.Map( - "PUT", "/strike/temporaryUnlock", - func(c context.Context) error { - type TemporaryUnlockRequest struct { - Seconds float64 - } - - var req TemporaryUnlockRequest - err := json.NewDecoder(c.HttpRequest().Body). - Decode(&req) - if err != nil { - panic(err) - } - - // This is not correctly reentrant. There should be a - // stack of temporary effects that unpop correctly, - // and status should show you any running effects. - pins.SetStrike("unlocked") - go func() { - time.Sleep(time.Duration(req.Seconds * - float64(time.Second))) - pins.SetStrike("locked") - }() - return goweb.Respond.WithStatusText( - c, http.StatusAccepted) - }) - - goweb.Map("PUT", "/speaker/beep", func(c context.Context) error { - // queue a beep - return goweb.Respond.WithStatusText(c, http.StatusAccepted) - }) - - // start input posting loop. add nquads to reasoning2 - - address := ":8081" - - s := &http.Server{ - Addr: address, - Handler: goweb.DefaultHttpHandler(), - ReadTimeout: 10 * time.Second, - WriteTimeout: 10 * time.Second, - } - - log.Printf("Listening on port %s", address) - log.Printf("%s", goweb.DefaultHttpHandler()) - listener, listenErr := net.Listen("tcp", address) - if listenErr != nil { - panic(listenErr) - } - s.Serve(listener) -} diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/static/gui.js --- a/service/laundry/static/gui.js Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -'use strict'; - - -function Ctrl($scope, $http, $timeout) { - $scope.refresh = function () { - $http.get("status").success(function (data) { - $scope.status = data; - }); - } - $scope.refresh(); - $scope.setLed = function (value) { - $http.put("led", value).success(function () { - $scope.refresh(); - }); - }; - $scope.temporaryUnlock = function () { - var seconds = 3; - $http.put("strike/temporaryUnlock", {seconds: seconds}).success(function () { - $scope.refresh(); - $timeout($scope.refresh, (seconds + .1) * 1000); - }); - }; - $scope.beep = function () { - $http.put("speaker/beep").success(function () { - $scope.speakerStatus = "sent at " + new Date(); - }); - } -} diff -r 1edf7f8d1995 -r fa74a9c9f753 service/laundry/symbols/ILQ74.sym --- a/service/laundry/symbols/ILQ74.sym Sun Apr 21 02:44:08 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -v 20110115 2 -B 300 0 1400 4600 3 0 0 0 -1 -1 0 -1 -1 -1 -1 -1 -T 300 5000 8 10 1 1 0 0 1 -device=ILQ74 -T 300 4800 8 10 1 1 0 0 1 -refdes=X? -C 700 4400 1 270 0 led-2.sym -{ -T 1300 4300 5 10 0 0 270 0 1 -device=LED -} -C 700 2200 1 270 0 led-2.sym -{ -T 1300 2100 5 10 0 0 270 0 1 -device=LED -} -C 900 200 1 90 0 led-2.sym -{ -T 300 300 5 10 0 0 90 0 1 -device=LED -} -C 900 2400 1 90 0 led-2.sym -{ -T 300 2500 5 10 0 0 90 0 1 -device=LED -} -P 0 4400 800 4400 1 0 0 -{ -T 0 4400 5 10 0 0 0 0 1 -pintype=in -T 355 4195 5 10 1 1 0 0 1 -pinlabel=A -T 205 4445 5 10 1 1 0 6 1 -pinnumber=1 -T 0 4400 5 10 0 0 0 0 1 -pinseq=0 -} -P 0 3500 800 3500 1 0 0 -{ -T 0 3500 5 10 0 0 0 0 1 -pintype=unknown -T 355 3595 5 10 1 1 0 0 1 -pinlabel=C -T 205 3545 5 10 1 1 0 6 1 -pinnumber=2 -T 0 3500 5 10 0 0 0 0 1 -pinseq=0 -} -P 0 3300 800 3300 1 0 0 -{ -T 0 3300 5 10 0 0 0 0 1 -pintype=unknown -T 355 3095 5 10 1 1 0 0 1 -pinlabel=C -T 205 3145 5 10 1 1 0 6 1 -pinnumber=3 -T 0 3300 5 10 0 0 0 0 1 -pinseq=0 -} -P 0 2400 800 2400 1 0 0 -{ -T 0 2400 5 10 0 0 0 0 1 -pintype=unknown -T 355 2495 5 10 1 1 0 0 1 -pinlabel=A -T 505 2445 5 10 1 1 0 6 1 -pinnumber=4 -T 0 2400 5 10 0 0 0 0 1 -pinseq=0 -} -P 0 2200 800 2200 1 0 0 -{ -T 0 2200 5 10 0 0 0 0 1 -pintype=unknown -T 355 1995 5 10 1 1 0 0 1 -pinlabel=A -T 205 2045 5 10 1 1 0 6 1 -pinnumber=5 -T 0 2200 5 10 0 0 0 0 1 -pinseq=0 -} -P 0 1300 800 1300 1 0 0 -{ -T 0 1300 5 10 0 0 0 0 1 -pintype=unknown -T 355 1395 5 10 1 1 0 0 1 -pinlabel=C -T 205 1345 5 10 1 1 0 6 1 -pinnumber=6 -T 0 1300 5 10 0 0 0 0 1 -pinseq=0 -} -P 0 1100 800 1100 1 0 0 -{ -T 0 1100 5 10 0 0 0 0 1 -pintype=unknown -T 355 895 5 10 1 1 0 0 1 -pinlabel=C -T 205 945 5 10 1 1 0 6 1 -pinnumber=7 -T 0 1100 5 10 0 0 0 0 1 -pinseq=0 -} -P 0 200 800 200 1 0 0 -{ -T 0 200 5 10 0 0 0 0 1 -pintype=unknown -T 355 295 5 10 1 1 0 0 1 -pinlabel=A -T 205 245 5 10 1 1 0 6 1 -pinnumber=8 -T 0 200 5 10 0 0 0 0 1 -pinseq=0 -} -C 1200 500 1 0 0 photo-transistor-1.sym -{ -T 1000 1000 5 6 0 1 0 0 1 -device=PS2501-1 -T 1160 500 5 10 0 1 0 0 1 -device=photo-transistor -} -C 1200 2700 1 0 0 photo-transistor-1.sym -{ -T 1000 3200 5 6 0 1 0 0 1 -device=PS2501-1 -T 1160 2700 5 10 0 1 0 0 1 -device=photo-transistor -} -C 1200 2000 1 180 1 photo-transistor-1.sym -{ -T 1000 1500 5 6 0 1 0 2 1 -device=PS2501-1 -T 1160 2000 5 10 0 1 0 2 1 -device=photo-transistor -} -C 1200 4200 1 180 1 photo-transistor-1.sym -{ -T 1000 3700 5 6 0 1 0 2 1 -device=PS2501-1 -T 1160 4200 5 10 0 1 0 2 1 -device=photo-transistor -} -P 2000 4200 1400 4200 1 0 0 -{ -T 2000 4200 5 10 0 0 0 0 1 -pintype=unknown -T 1345 4195 5 10 1 1 0 6 1 -pinlabel=E -T 1795 4245 5 10 1 1 0 0 1 -pinnumber=16 -T 2000 4200 5 10 0 0 0 0 1 -pinseq=0 -} -P 2000 3800 1400 3800 1 0 0 -{ -T 2000 3800 5 10 0 0 0 0 1 -pintype=unknown -T 1345 3795 5 10 1 1 0 6 1 -pinlabel=C -T 1795 3845 5 10 1 1 0 0 1 -pinnumber=15 -T 2000 3800 5 10 0 0 0 0 1 -pinseq=0 -} -P 2000 3100 1400 3100 1 0 0 -{ -T 2000 3100 5 10 0 0 0 0 1 -pintype=unknown -T 1345 3095 5 10 1 1 0 6 1 -pinlabel=C -T 1795 3145 5 10 1 1 0 0 1 -pinnumber=14 -T 2000 3100 5 10 0 0 0 0 1 -pinseq=0 -} -P 2000 2700 1400 2700 1 0 0 -{ -T 2000 2700 5 10 0 0 0 0 1 -pintype=unknown -T 1345 2695 5 10 1 1 0 6 1 -pinlabel=E -T 1795 2745 5 10 1 1 0 0 1 -pinnumber=13 -T 2000 2700 5 10 0 0 0 0 1 -pinseq=0 -} -P 2000 2000 1400 2000 1 0 0 -{ -T 2000 2000 5 10 0 0 0 0 1 -pintype=unknown -T 1345 1995 5 10 1 1 0 6 1 -pinlabel=E -T 1795 2045 5 10 1 1 0 0 1 -pinnumber=12 -T 2000 2000 5 10 0 0 0 0 1 -pinseq=0 -} -P 2000 1600 1400 1600 1 0 0 -{ -T 2000 1600 5 10 0 0 0 0 1 -pintype=unknown -T 1345 1595 5 10 1 1 0 6 1 -pinlabel=C -T 1795 1645 5 10 1 1 0 0 1 -pinnumber=11 -T 2000 1600 5 10 0 0 0 0 1 -pinseq=0 -} -P 2000 900 1400 900 1 0 0 -{ -T 2000 900 5 10 0 0 0 0 1 -pintype=unknown -T 1345 895 5 10 1 1 0 6 1 -pinlabel=C -T 1795 945 5 10 1 1 0 0 1 -pinnumber=10 -T 2000 900 5 10 0 0 0 0 1 -pinseq=0 -} -P 2000 500 1400 500 1 0 0 -{ -T 2000 500 5 10 0 0 0 0 1 -pintype=unknown -T 1345 495 5 10 1 1 0 6 1 -pinlabel=E -T 1795 545 5 10 1 1 0 0 1 -pinnumber=9 -T 2000 500 5 10 0 0 0 0 1 -pinseq=0 -}