From e253ac2ac927e7efa6f3316361ad8a07260d023c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Du=C3=9Fin?= Date: Fri, 30 Aug 2024 12:41:04 +0200 Subject: [PATCH 1/2] feat: Add schematic describing the LED driver --- led_driver.kicad_sch | 3630 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3630 insertions(+) create mode 100644 led_driver.kicad_sch diff --git a/led_driver.kicad_sch b/led_driver.kicad_sch new file mode 100644 index 0000000..d36b014 --- /dev/null +++ b/led_driver.kicad_sch @@ -0,0 +1,3630 @@ +(kicad_sch + (version 20231120) + (generator "eeschema") + (generator_version "8.0") + (uuid "91c3627f-de80-4c97-940f-3a36590d8138") + (paper "A4") + (lib_symbols + (symbol "Connector:Raspberry_Pi_2_3" + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "J" + (at -17.78 31.75 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left bottom) + ) + ) + (property "Value" "Raspberry_Pi_2_3" + (at 10.16 -31.75 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left top) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_3bplus_1p0_reduced.pdf" + (at 60.96 -44.45 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "expansion header for Raspberry Pi 2 & 3" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "raspberrypi gpio" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "PinHeader*2x20*P2.54mm*Vertical* PinSocket*2x20*P2.54mm*Vertical*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "Raspberry_Pi_2_3_0_1" + (rectangle + (start -17.78 30.48) + (end 17.78 -30.48) + (stroke + (width 0.254) + (type default) + ) + (fill + (type background) + ) + ) + ) + (symbol "Raspberry_Pi_2_3_1_1" + (pin power_in line + (at 5.08 33.02 270) + (length 2.54) + (name "3V3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 20.32 0) + (length 2.54) + (name "GPIO15/RXD" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "10" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 12.7 0) + (length 2.54) + (name "GPIO17" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "11" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 10.16 0) + (length 2.54) + (name "GPIO18/PWM0" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "12" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 -17.78 0) + (length 2.54) + (name "GPIO27" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "13" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -33.02 90) + (length 2.54) hide + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "14" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 -5.08 0) + (length 2.54) + (name "GPIO22" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "15" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 -7.62 0) + (length 2.54) + (name "GPIO23" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "16" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 5.08 33.02 270) + (length 2.54) hide + (name "3V3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "17" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 -10.16 0) + (length 2.54) + (name "GPIO24" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "18" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 -10.16 180) + (length 2.54) + (name "MOSI0/GPIO10" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "19" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at -5.08 33.02 270) + (length 2.54) + (name "5V" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -33.02 90) + (length 2.54) hide + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "20" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 -7.62 180) + (length 2.54) + (name "MISO0/GPIO9" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "21" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 -12.7 0) + (length 2.54) + (name "GPIO25" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "22" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 -12.7 180) + (length 2.54) + (name "SCLK0/GPIO11" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "23" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 -5.08 180) + (length 2.54) + (name "~{CE0}/GPIO8" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "24" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -33.02 90) + (length 2.54) hide + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "25" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 -2.54 180) + (length 2.54) + (name "~{CE1}/GPIO7" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "26" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 22.86 180) + (length 2.54) + (name "ID_SD/GPIO0" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "27" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 20.32 180) + (length 2.54) + (name "ID_SC/GPIO1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "28" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 5.08 180) + (length 2.54) + (name "GCLK1/GPIO5" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "29" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 15.24 180) + (length 2.54) + (name "SDA/GPIO2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -33.02 90) + (length 2.54) hide + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "30" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 2.54 180) + (length 2.54) + (name "GCLK2/GPIO6" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "31" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 -17.78 180) + (length 2.54) + (name "PWM0/GPIO12" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "32" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 -20.32 180) + (length 2.54) + (name "PWM1/GPIO13" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "33" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -33.02 90) + (length 2.54) hide + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "34" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 5.08 0) + (length 2.54) + (name "GPIO19/MISO1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "35" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 15.24 0) + (length 2.54) + (name "GPIO16" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "36" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 -15.24 0) + (length 2.54) + (name "GPIO26" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "37" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 2.54 0) + (length 2.54) + (name "GPIO20/MOSI1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "38" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -33.02 90) + (length 2.54) hide + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "39" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at -5.08 33.02 270) + (length 2.54) hide + (name "5V" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "4" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 0 0) + (length 2.54) + (name "GPIO21/SCLK1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "40" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 12.7 180) + (length 2.54) + (name "SCL/GPIO3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "5" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin power_in line + (at 0 -33.02 90) + (length 2.54) + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "6" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at 20.32 7.62 180) + (length 2.54) + (name "GCLK0/GPIO4" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "7" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin bidirectional line + (at -20.32 22.86 0) + (length 2.54) + (name "GPIO14/TXD" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "8" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -33.02 90) + (length 2.54) hide + (name "GND" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "9" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "Device:LED" + (pin_numbers hide) + (pin_names + (offset 1.016) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "D" + (at 0 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "LED" + (at 0 -2.54 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Light emitting diode" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "LED diode" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "LED* LED_SMD:* LED_THT:*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "LED_0_1" + (polyline + (pts + (xy -1.27 -1.27) (xy -1.27 1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -1.27 0) (xy 1.27 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 1.27 -1.27) (xy 1.27 1.27) (xy -1.27 0) (xy 1.27 -1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -3.048 -0.762) (xy -4.572 -2.286) (xy -3.81 -2.286) (xy -4.572 -2.286) (xy -4.572 -1.524) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -1.778 -0.762) (xy -3.302 -2.286) (xy -2.54 -2.286) (xy -3.302 -2.286) (xy -3.302 -1.524) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "LED_1_1" + (pin passive line + (at -3.81 0 0) + (length 2.54) + (name "K" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 3.81 0 180) + (length 2.54) + (name "A" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "Device:Q_NMOS_GDS" + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "Q" + (at 5.08 1.27 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Q_NMOS_GDS" + (at 5.08 -1.27 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 5.08 2.54 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "N-MOSFET transistor, gate/drain/source" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "transistor NMOS N-MOS N-MOSFET" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "Q_NMOS_GDS_0_1" + (polyline + (pts + (xy 0.254 0) (xy -2.54 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.254 1.905) (xy 0.254 -1.905) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 -1.27) (xy 0.762 -2.286) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 0.508) (xy 0.762 -0.508) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 2.286) (xy 0.762 1.27) + ) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 2.54 2.54) (xy 2.54 1.778) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 2.54 -2.54) (xy 2.54 0) (xy 0.762 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.762 -1.778) (xy 3.302 -1.778) (xy 3.302 1.778) (xy 0.762 1.778) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 1.016 0) (xy 2.032 0.381) (xy 2.032 -0.381) (xy 1.016 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + (polyline + (pts + (xy 2.794 0.508) (xy 2.921 0.381) (xy 3.683 0.381) (xy 3.81 0.254) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 3.302 0.381) (xy 2.921 -0.254) (xy 3.683 -0.254) (xy 3.302 0.381) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (circle + (center 1.651 0) + (radius 2.794) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + (circle + (center 2.54 -1.778) + (radius 0.254) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + (circle + (center 2.54 1.778) + (radius 0.254) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + ) + (symbol "Q_NMOS_GDS_1_1" + (pin input line + (at -5.08 0 0) + (length 2.54) + (name "G" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 2.54 5.08 270) + (length 2.54) + (name "D" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 2.54 -5.08 90) + (length 2.54) + (name "S" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "Device:R" + (pin_numbers hide) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "R" + (at 2.032 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 0 0 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at -1.778 0 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "R res resistor" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_fp_filters" "R_*" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "R_0_1" + (rectangle + (start -1.016 -2.54) + (end 1.016 2.54) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "R_1_1" + (pin passive line + (at 0 3.81 270) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin passive line + (at 0 -3.81 90) + (length 1.27) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "Simulation_SPICE:NPN" + (pin_numbers hide) + (pin_names + (offset 0) + ) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "Q" + (at -2.54 7.62 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "NPN" + (at -2.54 5.08 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 63.5 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "https://ngspice.sourceforge.io/docs/ngspice-html-manual/manual.xhtml#cha_BJTs" + (at 63.5 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Bipolar transistor symbol for simulation only, substrate tied to the emitter" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Sim.Device" "NPN" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Sim.Type" "GUMMELPOON" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Sim.Pins" "1=C 2=B 3=E" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "simulation" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "NPN_0_1" + (polyline + (pts + (xy -2.54 0) (xy 0.635 0) + ) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.635 0.635) (xy 2.54 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 2.794 -1.27) (xy 2.794 -1.27) + ) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 2.794 -1.27) (xy 2.794 -1.27) + ) + (stroke + (width 0.1524) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.635 -0.635) (xy 2.54 -2.54) (xy 2.54 -2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0.635 1.905) (xy 0.635 -1.905) (xy 0.635 -1.905) + ) + (stroke + (width 0.508) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 1.27 -1.778) (xy 1.778 -1.27) (xy 2.286 -2.286) (xy 1.27 -1.778) (xy 1.27 -1.778) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type outline) + ) + ) + (circle + (center 1.27 0) + (radius 2.8194) + (stroke + (width 0.254) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "NPN_1_1" + (pin open_collector line + (at 2.54 5.08 270) + (length 2.54) + (name "C" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin input line + (at -5.08 0 0) + (length 2.54) + (name "B" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "2" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + (pin open_emitter line + (at 2.54 -5.08 90) + (length 2.54) + (name "E" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "3" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "power:+12V" + (power) + (pin_numbers hide) + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "+12V" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+12V\"" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "+12V_0_1" + (polyline + (pts + (xy -0.762 1.27) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 0) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 2.54) (xy 0.762 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "+12V_1_1" + (pin power_in line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "power:+5V" + (power) + (pin_numbers hide) + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "+5V" + (at 0 3.556 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+5V\"" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "global power" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "+5V_0_1" + (polyline + (pts + (xy -0.762 1.27) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 0) (xy 0 2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 2.54) (xy 0.762 1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "+5V_1_1" + (pin power_in line + (at 0 0 90) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + (symbol "power:Earth" + (power) + (pin_numbers hide) + (pin_names + (offset 0) hide) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (property "Reference" "#PWR" + (at 0 -6.35 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "Earth" + (at 0 -3.81 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"Earth\"" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "ki_keywords" "global ground gnd" + (at 0 0 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (symbol "Earth_0_1" + (polyline + (pts + (xy -0.635 -1.905) (xy 0.635 -1.905) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy -0.127 -2.54) (xy 0.127 -2.54) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 0 -1.27) (xy 0 0) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + (polyline + (pts + (xy 1.27 -1.27) (xy -1.27 -1.27) + ) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + ) + ) + (symbol "Earth_1_1" + (pin power_in line + (at 0 0 270) + (length 0) + (name "~" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (number "1" + (effects + (font + (size 1.27 1.27) + ) + ) + ) + ) + ) + ) + ) + (junction + (at 120.65 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "1331bbbf-6c2b-4e18-8c39-529eeb5b3431") + ) + (junction + (at 120.65 86.36) + (diameter 0) + (color 0 0 0 0) + (uuid "22acc6f7-f681-4837-9dd8-bebdbc072899") + ) + (junction + (at 111.76 68.58) + (diameter 0) + (color 0 0 0 0) + (uuid "368370d7-f469-496b-81c1-910739d60b29") + ) + (junction + (at 111.76 92.71) + (diameter 0) + (color 0 0 0 0) + (uuid "51bfddae-6c08-4b6f-af61-69eda04df9b4") + ) + (junction + (at 104.14 185.42) + (diameter 0) + (color 0 0 0 0) + (uuid "51f9c5f0-fb70-4311-887f-033672c0e245") + ) + (junction + (at 120.65 105.41) + (diameter 0) + (color 0 0 0 0) + (uuid "67415b4a-3fdb-49c3-b637-4d7cb7fd3dca") + ) + (junction + (at 92.71 99.06) + (diameter 0) + (color 0 0 0 0) + (uuid "ce8ec94e-4210-454e-afbe-41ae16a160bc") + ) + (wire + (pts + (xy 111.76 68.58) (xy 120.65 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "0ac3a21b-f26c-4275-b134-24337b5d3270") + ) + (wire + (pts + (xy 101.6 92.71) (xy 102.87 92.71) + ) + (stroke + (width 0) + (type default) + ) + (uuid "1308b0e5-1828-427d-a9b0-3b2111fb7e42") + ) + (wire + (pts + (xy 66.04 185.42) (xy 66.04 180.34) + ) + (stroke + (width 0) + (type default) + ) + (uuid "165c7d00-c270-4768-ac02-57818a7173d0") + ) + (wire + (pts + (xy 120.65 68.58) (xy 120.65 77.47) + ) + (stroke + (width 0) + (type default) + ) + (uuid "18164642-112a-421c-9268-218b97beb1e6") + ) + (wire + (pts + (xy 60.96 111.76) (xy 60.96 114.3) + ) + (stroke + (width 0) + (type default) + ) + (uuid "1921b344-eae5-4c9c-bf3f-de3ea909b832") + ) + (wire + (pts + (xy 120.65 86.36) (xy 128.27 86.36) + ) + (stroke + (width 0) + (type default) + ) + (uuid "25ae39e4-220f-4f8a-8d32-58d38399e814") + ) + (wire + (pts + (xy 104.14 185.42) (xy 66.04 185.42) + ) + (stroke + (width 0) + (type default) + ) + (uuid "29dc9874-1d6b-4ca5-9f6d-ce3ccb4c3246") + ) + (wire + (pts + (xy 101.6 104.14) (xy 101.6 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "319269e0-e784-41fc-8b5b-f0fd795c4983") + ) + (wire + (pts + (xy 111.76 92.71) (xy 113.03 92.71) + ) + (stroke + (width 0) + (type default) + ) + (uuid "4e05c4ba-7cd3-44fa-90e0-cd3e0056c9af") + ) + (wire + (pts + (xy 138.43 86.36) (xy 138.43 92.71) + ) + (stroke + (width 0) + (type default) + ) + (uuid "516a49c8-803b-4452-9f52-248c1baaf2b4") + ) + (wire + (pts + (xy 120.65 68.58) (xy 148.59 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "52295c77-11ce-4ec5-8888-ad8b644315b6") + ) + (wire + (pts + (xy 120.65 85.09) (xy 120.65 86.36) + ) + (stroke + (width 0) + (type default) + ) + (uuid "529ac6ea-ad28-48da-94b1-826fc56cd982") + ) + (wire + (pts + (xy 148.59 105.41) (xy 120.65 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "5949b791-42d3-469e-9b84-5748e850202a") + ) + (wire + (pts + (xy 120.65 105.41) (xy 120.65 185.42) + ) + (stroke + (width 0) + (type default) + ) + (uuid "618c0de0-0f2a-4a27-9067-af7488418cfc") + ) + (wire + (pts + (xy 91.44 99.06) (xy 92.71 99.06) + ) + (stroke + (width 0) + (type default) + ) + (uuid "66ee1251-5069-42da-8087-4550da2ae8af") + ) + (wire + (pts + (xy 39.37 99.06) (xy 83.82 99.06) + ) + (stroke + (width 0) + (type default) + ) + (uuid "6b609881-9a4a-4954-8db6-b5fee9a07924") + ) + (wire + (pts + (xy 111.76 86.36) (xy 111.76 92.71) + ) + (stroke + (width 0) + (type default) + ) + (uuid "6fe0c5ac-0ca5-4cfe-95cd-4ee1ef9c1856") + ) + (wire + (pts + (xy 101.6 105.41) (xy 120.65 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "708bc3fd-8baf-46f3-a50a-10df446f78ab") + ) + (wire + (pts + (xy 135.89 86.36) (xy 138.43 86.36) + ) + (stroke + (width 0) + (type default) + ) + (uuid "71271859-ea72-405a-b924-e049a7f17d13") + ) + (wire + (pts + (xy 45.72 137.16) (xy 39.37 137.16) + ) + (stroke + (width 0) + (type default) + ) + (uuid "716003e8-c2d8-4b84-8dc1-93851a7f6fb6") + ) + (wire + (pts + (xy 148.59 69.85) (xy 148.59 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "79d29b83-30d3-4942-9d09-04d299bc98c5") + ) + (wire + (pts + (xy 111.76 68.58) (xy 111.76 66.04) + ) + (stroke + (width 0) + (type default) + ) + (uuid "876d20b9-c939-42c7-8dc3-40a50b4c0d8e") + ) + (wire + (pts + (xy 120.65 86.36) (xy 120.65 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "8c7453be-91f9-4c08-8aa2-8966d417ba97") + ) + (wire + (pts + (xy 92.71 68.58) (xy 92.71 90.17) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a7bb799f-2648-4d54-9c33-c8d1774193a8") + ) + (wire + (pts + (xy 39.37 99.06) (xy 39.37 137.16) + ) + (stroke + (width 0) + (type default) + ) + (uuid "a8e018da-0eba-4047-b281-a7bc343a5334") + ) + (wire + (pts + (xy 92.71 68.58) (xy 111.76 68.58) + ) + (stroke + (width 0) + (type default) + ) + (uuid "b32b84f9-ebfb-4979-aef7-a70682caa727") + ) + (wire + (pts + (xy 111.76 68.58) (xy 111.76 78.74) + ) + (stroke + (width 0) + (type default) + ) + (uuid "b91e7384-5aa3-4f02-b095-d28b49115548") + ) + (wire + (pts + (xy 148.59 77.47) (xy 148.59 78.74) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c7ccdb8c-6bd5-4596-a145-3031068e19cc") + ) + (wire + (pts + (xy 92.71 99.06) (xy 93.98 99.06) + ) + (stroke + (width 0) + (type default) + ) + (uuid "c8a48bab-e9d8-4bf5-9403-8cb4e0debc2e") + ) + (wire + (pts + (xy 101.6 93.98) (xy 101.6 92.71) + ) + (stroke + (width 0) + (type default) + ) + (uuid "da7548ff-8473-4b5c-81ba-d762676e1155") + ) + (wire + (pts + (xy 104.14 185.42) (xy 104.14 187.96) + ) + (stroke + (width 0) + (type default) + ) + (uuid "e63648ea-0e38-43cc-b4a8-5476bdbdd716") + ) + (wire + (pts + (xy 120.65 97.79) (xy 120.65 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "ea8648fb-9ad8-4da7-8c86-1fd04021ddf0") + ) + (wire + (pts + (xy 92.71 97.79) (xy 92.71 99.06) + ) + (stroke + (width 0) + (type default) + ) + (uuid "ed74cd11-0dd8-4103-9bc3-dc5994f79956") + ) + (wire + (pts + (xy 148.59 97.79) (xy 148.59 105.41) + ) + (stroke + (width 0) + (type default) + ) + (uuid "ef62a730-bc25-49b7-b235-de525b574295") + ) + (wire + (pts + (xy 138.43 92.71) (xy 140.97 92.71) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f4d614ad-ae57-48b8-a057-0ea4e1d791b4") + ) + (wire + (pts + (xy 148.59 86.36) (xy 148.59 87.63) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f64c6feb-0d78-485d-bde7-852e68889f9c") + ) + (wire + (pts + (xy 120.65 185.42) (xy 104.14 185.42) + ) + (stroke + (width 0) + (type default) + ) + (uuid "f75c3bff-4d68-499d-82f1-0f2fa97ca59b") + ) + (wire + (pts + (xy 110.49 92.71) (xy 111.76 92.71) + ) + (stroke + (width 0) + (type default) + ) + (uuid "fcb5cffb-b039-4f8a-9dbc-704fb6d7a861") + ) + (rectangle + (start 146.05 69.85) + (end 170.18 87.63) + (stroke + (width 0) + (type default) + ) + (fill + (type none) + ) + (uuid bc3b1a38-6cda-49d3-be50-a91d87584de9) + ) + (text "LED Strip" + (exclude_from_sim no) + (at 161.29 78.994 0) + (effects + (font + (size 1.27 1.27) + ) + ) + (uuid "0dd379cd-7066-4ade-91cb-0a4ae1bd228e") + ) + (symbol + (lib_id "Device:R") + (at 106.68 92.71 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "340a4f6b-ba0f-4707-b74c-59a17d1a6f9e") + (property "Reference" "R2" + (at 106.68 86.36 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "200" + (at 106.68 88.9 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 106.68 94.488 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 106.68 92.71 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 106.68 92.71 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "cb37763d-87a6-408b-b312-200fbcc88f02") + ) + (pin "2" + (uuid "0a6c7629-def8-4e5b-8f95-04f4a234c901") + ) + (instances + (project "zweite_sonne" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "R2") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 120.65 81.28 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "35451cdd-e355-4f2c-97ee-b0a8269b2bd4") + (property "Reference" "R5" + (at 123.19 80.0099 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "2" + (at 123.19 82.5499 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 118.872 81.28 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 120.65 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 120.65 81.28 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "ae9ef84d-4da9-4cfb-a8c0-c1f7cb2de23e") + ) + (pin "2" + (uuid "d21d9c55-0a9e-4f9b-a017-7dc0b6ab40e5") + ) + (instances + (project "zweite_sonne" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "R5") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:Earth") + (at 104.14 187.96 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "476d5cdb-e766-47be-b6dc-fffbfcc322df") + (property "Reference" "#PWR02" + (at 104.14 194.31 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "Earth" + (at 104.14 193.04 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 104.14 187.96 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 104.14 187.96 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"Earth\"" + (at 104.14 187.96 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "18229131-dadc-4aa3-b1ca-92b321d65aab") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "#PWR02") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Connector:Raspberry_Pi_2_3") + (at 66.04 147.32 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "5756ca1a-eee7-4a5e-9d82-05506d668a5b") + (property "Reference" "J1" + (at 68.2341 180.34 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Raspberry_Pi_2_3" + (at 68.2341 182.88 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 66.04 147.32 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_3bplus_1p0_reduced.pdf" + (at 127 191.77 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "expansion header for Raspberry Pi 2 & 3" + (at 66.04 147.32 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "3" + (uuid "6c5b7574-a07d-4f61-bf58-ba7662dc42b9") + ) + (pin "8" + (uuid "63afbb66-c6a2-40a1-b1db-db7857542ce8") + ) + (pin "34" + (uuid "e75aefd3-6de0-4953-9453-49766063a95d") + ) + (pin "7" + (uuid "796aaed3-86d6-4382-abc7-9825e247ac88") + ) + (pin "19" + (uuid "ec720f60-82d4-4ab1-ab28-32c8ee7ebf3e") + ) + (pin "25" + (uuid "5caa605c-b47a-4b69-b64e-7245c7ce0f37") + ) + (pin "33" + (uuid "c3ee1c1e-5559-45e2-974e-eff629f30941") + ) + (pin "27" + (uuid "77a1d518-2771-403f-8826-4e7d2fd2290b") + ) + (pin "12" + (uuid "b2091c43-11f4-418c-bf77-27ec19e3bb8a") + ) + (pin "22" + (uuid "e394dd3c-0e09-489b-ad10-6894e0f37439") + ) + (pin "6" + (uuid "f38b3e73-1eaf-4fbc-a93f-cc97adb9cf73") + ) + (pin "26" + (uuid "9a1744e9-655d-4d24-9bcb-fe9daf515360") + ) + (pin "5" + (uuid "cbeefba5-5487-43c3-b694-b8fb273f357f") + ) + (pin "2" + (uuid "246ed22d-1b80-4cba-ab6d-3b4448c85919") + ) + (pin "31" + (uuid "aae36b1e-8350-4c9e-9106-ca59253f05d3") + ) + (pin "4" + (uuid "a3a61262-e82a-481e-aa77-bf1eabb314b9") + ) + (pin "29" + (uuid "eca04d8c-7fb9-44a4-9150-b5beaed30959") + ) + (pin "32" + (uuid "127ab784-abd1-44a3-ae32-be091ff77663") + ) + (pin "30" + (uuid "bfae134c-66ee-4be9-9299-35f58fa51e38") + ) + (pin "17" + (uuid "99748859-0520-46f5-bdeb-c558d29c7b83") + ) + (pin "15" + (uuid "0496b6ca-2e64-432f-8209-813a60ca14f0") + ) + (pin "14" + (uuid "34c18b0f-a5b7-47e0-9b17-2081362c7552") + ) + (pin "1" + (uuid "e34575ee-ce4e-463e-a9ad-14349358a3d5") + ) + (pin "16" + (uuid "d5792a8d-4531-4aa6-bb60-2d158409921b") + ) + (pin "37" + (uuid "c3b9b0ad-4d50-4f28-858f-17d808158554") + ) + (pin "28" + (uuid "81d164a4-5e34-4dbf-9a8e-a81cbc7e3fb8") + ) + (pin "40" + (uuid "029334d4-ee04-42b8-8bb5-d7b453abf627") + ) + (pin "38" + (uuid "dc365d66-a737-4c50-bd13-af8c7574d0cc") + ) + (pin "21" + (uuid "2d0e6523-4b99-48e3-a874-b1e846632ad0") + ) + (pin "13" + (uuid "9d3ca376-835f-4c8b-9d04-076c8a50eefc") + ) + (pin "10" + (uuid "7ac6800f-ec6e-4e5d-8843-231d561dd6ab") + ) + (pin "35" + (uuid "521af7cd-6919-4f82-8c9f-d5662595898d") + ) + (pin "36" + (uuid "cbe8d5a5-57ab-44d8-adfa-6334e283d431") + ) + (pin "20" + (uuid "62ae475c-f6ba-4043-b7d9-62ffab6ede9c") + ) + (pin "24" + (uuid "f4e32aca-f8f2-409e-9b7b-52445485d177") + ) + (pin "23" + (uuid "1d7760a7-03cf-4369-8e8e-188ea9f13dee") + ) + (pin "18" + (uuid "2be039d6-2a2d-44cb-9b6e-da4da4ac9642") + ) + (pin "9" + (uuid "575da3f7-3419-4399-a346-0d53dfb2e6b9") + ) + (pin "39" + (uuid "289aaf09-1987-4edf-af06-d577b52b4947") + ) + (pin "11" + (uuid "b5202ea6-72a6-4156-b7a9-f2dba7950192") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "J1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Simulation_SPICE:NPN") + (at 99.06 99.06 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "5ce42961-791e-4bf7-8b63-567a9538547f") + (property "Reference" "Q2" + (at 104.14 97.7899 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "NPN" + (at 104.14 100.3299 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 162.56 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "https://ngspice.sourceforge.io/docs/ngspice-html-manual/manual.xhtml#cha_BJTs" + (at 162.56 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Bipolar transistor symbol for simulation only, substrate tied to the emitter" + (at 99.06 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Sim.Device" "NPN" + (at 99.06 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Sim.Type" "GUMMELPOON" + (at 99.06 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Sim.Pins" "1=C 2=B 3=E" + (at 99.06 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "29bdbf82-9301-45e2-a1ff-c94801807196") + ) + (pin "2" + (uuid "65f1d1e6-f852-41f9-bfff-b4469d714f5c") + ) + (pin "3" + (uuid "ee617f60-76a5-44b7-acdc-fdb1db30d8bc") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "Q2") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 132.08 86.36 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "6cfac41d-4cd2-42e1-a2cf-e4e7a0b03d71") + (property "Reference" "R6" + (at 132.08 80.01 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "200" + (at 132.08 82.55 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 132.08 88.138 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 132.08 86.36 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 132.08 86.36 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "42206621-7f3c-44dc-8a17-341c88f98ee9") + ) + (pin "2" + (uuid "570c3800-0bd6-404b-89e8-7af89102f4d0") + ) + (instances + (project "zweite_sonne" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "R6") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 148.59 73.66 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "6eec1b17-00f6-4068-b637-7ca2fa8a928f") + (property "Reference" "R7" + (at 151.13 72.3899 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "0k163" + (at 151.13 74.9299 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 146.812 73.66 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 148.59 73.66 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 148.59 73.66 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "d906e1d4-3a5a-4e0c-a61d-a1879d93ca6e") + ) + (pin "2" + (uuid "bec50e0f-07da-4d3d-9da3-3f0e954807c6") + ) + (instances + (project "zweite_sonne" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "R7") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:Q_NMOS_GDS") + (at 118.11 92.71 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "b79477c1-00fd-4990-ace9-dce8a0680ba4") + (property "Reference" "Q1" + (at 124.46 91.4399 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Q_NMOS_GDS" + (at 124.46 93.9799 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 123.19 90.17 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 118.11 92.71 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "N-MOSFET transistor, gate/drain/source" + (at 118.11 92.71 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "2" + (uuid "5c582ff9-a0a3-40ba-b9b1-ece6d23bd478") + ) + (pin "3" + (uuid "885db479-1254-4a48-9e0f-46f07d8fbcfa") + ) + (pin "1" + (uuid "ce08ce32-fe69-47ad-8673-7672a44694cf") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "Q1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 87.63 99.06 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "cc57a2cd-18b9-4ad7-ab9d-5d797aa33b14") + (property "Reference" "R1" + (at 87.63 92.71 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Value" "R" + (at 87.63 95.25 90) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 87.63 100.838 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 87.63 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 87.63 99.06 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "c5c8c0b7-b0c3-4112-bc37-3d35eabae21e") + ) + (pin "2" + (uuid "c32b2093-d9f0-4772-867c-f79c68d96874") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "R1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:LED") + (at 148.59 82.55 90) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "d540e3c7-f602-4bf3-81ad-07bfec3774d4") + (property "Reference" "D1" + (at 152.4 82.8674 90) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Value" "LED (9V75)" + (at 152.4 85.4074 90) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Footprint" "" + (at 148.59 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 148.59 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Light emitting diode" + (at 148.59 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "79cba9a7-ff0c-4409-a3d5-bf738ce1e2d9") + ) + (pin "2" + (uuid "e5994162-a4e6-4bc3-8839-e5eabf8a367e") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "D1") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:Q_NMOS_GDS") + (at 146.05 92.71 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "d7f8787e-bbe5-44dc-81d7-7d9a26140d1d") + (property "Reference" "Q3" + (at 152.4 91.4399 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "Q_NMOS_GDS" + (at 152.4 93.9799 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 151.13 90.17 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 146.05 92.71 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "N-MOSFET transistor, gate/drain/source" + (at 146.05 92.71 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "2" + (uuid "e5da2be3-2609-4452-a55e-cb99e65c4b4f") + ) + (pin "3" + (uuid "d8920fad-c0bf-436f-994d-0fca56db1fb6") + ) + (pin "1" + (uuid "9e7b7a40-32d6-4a0a-b9be-f56ab0588c02") + ) + (instances + (project "zweite_sonne" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "Q3") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:+12V") + (at 111.76 66.04 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "e8c9d76c-c00b-4a5f-a2b0-8bbc1bbcee67") + (property "Reference" "#PWR01" + (at 111.76 69.85 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "+12V" + (at 111.76 60.96 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 111.76 66.04 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 111.76 66.04 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+12V\"" + (at 111.76 66.04 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "9dafe2ce-936d-4d22-8580-36a8fe8bb156") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "#PWR01") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 92.71 93.98 180) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "e98676d9-6038-4cc5-b394-b9b610f3ff8d") + (property "Reference" "R4" + (at 95.25 92.7099 0) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Value" "10k" + (at 95.25 95.2499 0) + (effects + (font + (size 1.27 1.27) + ) + (justify right) + ) + ) + (property "Footprint" "" + (at 94.488 93.98 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 92.71 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 92.71 93.98 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "8f39a1df-2647-474c-8fe2-02bd18f4d4c7") + ) + (pin "2" + (uuid "e7354dbf-ca4c-49c4-827f-9b4c87a74908") + ) + (instances + (project "zweite_sonne" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "R4") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "power:+5V") + (at 60.96 111.76 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "f46842ea-44a3-4615-848b-c983ccb9ccba") + (property "Reference" "#PWR03" + (at 60.96 115.57 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Value" "+5V" + (at 60.96 106.68 0) + (effects + (font + (size 1.27 1.27) + ) + ) + ) + (property "Footprint" "" + (at 60.96 111.76 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "" + (at 60.96 111.76 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Power symbol creates a global label with name \"+5V\"" + (at 60.96 111.76 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "070ace26-c8d6-4353-bfad-61c7c626af25") + ) + (instances + (project "" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "#PWR03") + (unit 1) + ) + ) + ) + ) + (symbol + (lib_id "Device:R") + (at 111.76 82.55 0) + (unit 1) + (exclude_from_sim no) + (in_bom yes) + (on_board yes) + (dnp no) + (fields_autoplaced yes) + (uuid "f8a21725-9ebb-449a-8b99-f598e7198b82") + (property "Reference" "R3" + (at 114.3 81.2799 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Value" "10k" + (at 114.3 83.8199 0) + (effects + (font + (size 1.27 1.27) + ) + (justify left) + ) + ) + (property "Footprint" "" + (at 109.982 82.55 90) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Datasheet" "~" + (at 111.76 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (property "Description" "Resistor" + (at 111.76 82.55 0) + (effects + (font + (size 1.27 1.27) + ) + (hide yes) + ) + ) + (pin "1" + (uuid "107944e2-5061-4fb2-9f8f-3c41c27e724c") + ) + (pin "2" + (uuid "6eec104f-f565-4c14-ad97-fc91ebf2aa6a") + ) + (instances + (project "zweite_sonne" + (path "/91c3627f-de80-4c97-940f-3a36590d8138" + (reference "R3") + (unit 1) + ) + ) + ) + ) + (sheet_instances + (path "/" + (page "1") + ) + ) +) From 7056149ff1a0c77b878134536e86458b4c8678a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20Du=C3=9Fin?= Date: Sat, 7 Dec 2024 13:32:31 +0100 Subject: [PATCH 2/2] WIP: Redoing light modes --- Cargo.lock | 186 +++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 1 + curve_description.adoc | 36 ++++++++ src/client.rs | 38 +-------- src/military_time.rs | 76 +++++++++++++++++ src/packet.rs | 19 ++--- src/schedule.rs | 1 + src/server.rs | 4 + transfer.sh | 1 + 9 files changed, 314 insertions(+), 48 deletions(-) create mode 100644 curve_description.adoc create mode 100644 src/military_time.rs create mode 100644 src/schedule.rs create mode 100644 transfer.sh diff --git a/Cargo.lock b/Cargo.lock index c77a4bb..eff3a2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anstream" version = "0.6.15" @@ -51,6 +66,12 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + [[package]] name = "bincode" version = "1.3.3" @@ -60,6 +81,41 @@ dependencies = [ "serde", ] +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "cc" +version = "1.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "wasm-bindgen", + "windows-targets", +] + [[package]] name = "clap" version = "4.5.16" @@ -106,24 +162,83 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + [[package]] name = "heck" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "iana-time-zone" +version = "0.1.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +[[package]] +name = "js-sys" +version = "0.3.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "libc" version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + [[package]] name = "proc-macro2" version = "1.0.86" @@ -171,6 +286,12 @@ dependencies = [ "syn", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "strsim" version = "0.11.1" @@ -200,6 +321,70 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "wasm-bindgen" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -278,6 +463,7 @@ name = "zwote_sonne" version = "0.1.0" dependencies = [ "bincode", + "chrono", "clap", "clap_derive", "rppal", diff --git a/Cargo.toml b/Cargo.toml index 1a55416..0c90235 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ path = "src/client.rs" [dependencies] bincode = "1.3.3" +chrono = "0.4.38" clap = { version = "4.5.16", features = ["derive"] } clap_derive = "4.5.13" rppal = "0.19.0" diff --git a/curve_description.adoc b/curve_description.adoc new file mode 100644 index 0000000..d610ecd --- /dev/null +++ b/curve_description.adoc @@ -0,0 +1,36 @@ += Description of curves for light purposes +Since the daily cycle is the main factor for plants whatever the periodicity of +the curve it will be restarted at midnight local time. + +== Curve definition +To keep it simple, we will only consider linear change. +Because of this the light value can be described in required brightness at +a given time. The value that the light had before that will then be adjusted +smoothly, until it reaches the value intended at the next time point. +The brightness at midnight must always be declared. + +For example: We want the light to be on off during the night, then turn on at +6:00 in the morning with 20% and gradually increase in brightness until it +reaches 100% at 8:00. Then, at 21:00 we want the light to start dimming until +it turns off at 23:00. The following graph shows this: + +.Graph not yet available +[%collapsible] +==== +==== + +The points should then be defined as follows: +[source] +---- +0000 0.0 +0600 0.0 +0600 0.2 +0800 1.0 +2100 1.0 +2300 0.0 +---- + +You will notice that two entries are at the same time here. This will make sure +that the light stays at the same level during the duration from 0000 to 0600. +When multiple entries are at the same time, the furthest down will be chosen. + diff --git a/src/client.rs b/src/client.rs index 0f987c9..603b63e 100644 --- a/src/client.rs +++ b/src/client.rs @@ -4,6 +4,7 @@ use clap::Parser; use clap_derive::Subcommand; use packet::Packet; +pub mod military_time; mod packet; #[derive(Parser, Debug)] @@ -17,47 +18,14 @@ struct Args } #[derive(Subcommand, Debug)] -enum Command -{ - /// Set a constant brightness in Range 0.0..=1.0 - Constant - { - brightness: f64 - }, - /// Sinusoidal curve with a period of 0.0.. seconds - Sine - { - period: f64 - }, - /// Triangle curve with a period of 0.0.. seconds - Triangle - { - period: f64 - }, - /// Sawtooth curve with a period of 0.0.. seconds - Sawtooth - { - period: f64 - }, - /// Square curve witha period of 0.0.. seconds and a duty cycle of 0.0..1.0 - Square - { - period: f64, duty: f64 - }, -} +enum Command {} fn main() { let args = Args::parse(); let mut stream = TcpStream::connect(args.connect).expect("Unable to connect to server"); - let packet = match args.command { - Command::Constant { brightness } => Packet::Constant(brightness), - Command::Sine { period } => Packet::Sine(period), - Command::Triangle { period } => Packet::Triangle(period), - Command::Sawtooth { period } => Packet::Sawtooth(period), - Command::Square { period, duty } => Packet::Square { period, duty }, - }; + let packet = match args.command {}; packet .write_to_stream(&mut stream) diff --git a/src/military_time.rs b/src/military_time.rs new file mode 100644 index 0000000..4b32e00 --- /dev/null +++ b/src/military_time.rs @@ -0,0 +1,76 @@ +use core::fmt; +use std::str::FromStr; + +const NUM_CHARS: usize = 4; + +/// Time of day representation in military time. +/// +/// Time does not know about anything fancy shmancy like timezones. Just useful +/// for simple time of day comparisons. +#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] +pub struct MilitaryTime(u16); + +#[derive(Debug)] +pub struct WrongFormat; +impl FromStr for MilitaryTime +{ + type Err = WrongFormat; + + fn from_str(s: &str) -> Result + { + if s.len() != NUM_CHARS { + return Err(WrongFormat); + } + + let time = u16::from_str(s).map_err(|_| Err(WrongFormat))?; + if time >= 2400 || (time % 100) >= 60 { + Err(WrongFormat) + } + else { + Ok(Self(time)) + } + } +} + +impl fmt::Display for MilitaryTime +{ + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.0.fmt(f) } +} + +#[cfg(test)] +mod test +{ + use std::str::FromStr; + + use super::MilitaryTime; + + #[test] + fn parse_valid() + { + let valid_times = ["0000", "1234", "2359", "2000"]; + + for t in valid_times { + let _mt = MilitaryTime::from_str(&t).expect("Failed to parse valid time"); + } + } + + #[test] + fn parse_wrong_len() + { + let times = ["", "1", "12", "123", "12345"]; + + for t in times { + let _err = MilitaryTime::from_str(&t).expect_err("Invalid time parsed"); + } + } + + #[test] + fn parse_invalid_times() + { + let times = ["-123", "0061", "2360", "2400", "-000", "060a"]; + + for t in times { + let _err = MilitaryTime::from_str(&t).expect_err("Invalid time parsed"); + } + } +} diff --git a/src/packet.rs b/src/packet.rs index b30c819..67c40ad 100644 --- a/src/packet.rs +++ b/src/packet.rs @@ -8,19 +8,12 @@ const MAX_PACKET_SIZE_BYTES: u64 = 1024; #[derive(Serialize, Deserialize)] pub enum Packet { - /// Constant brightness in range 0.0..1.0 - Constant(f64), - /// Sinusoidal curve with a period of 0.0.. seconds - Sine(f64), - /// Triangle curve with a period of 0.0.. seconds - Triangle(f64), - /// Sawtooth curve with a period of 0.0.. seconds - Sawtooth(f64), - /// Square curve witha period of 0.0.. seconds and a duty cycle of 0.0..1.0 - Square - { - period: f64, duty: f64 - }, + SetDefaultCurveFile(String), + GetDefaultCurveFile(String), + SetCurve(String), + SaveCurve(String), + Ok(String), + Err(String), } #[inline] diff --git a/src/schedule.rs b/src/schedule.rs new file mode 100644 index 0000000..20eac61 --- /dev/null +++ b/src/schedule.rs @@ -0,0 +1 @@ +pub struct Schedule {} diff --git a/src/server.rs b/src/server.rs index ef8dc28..1fb5d5c 100644 --- a/src/server.rs +++ b/src/server.rs @@ -37,6 +37,7 @@ enum LightMode Triangle(f64), Sawtooth(f64), Square(f64, f64), + DaylightCycle(u32, u32), } impl LightMode { @@ -50,6 +51,9 @@ impl LightMode Self::Triangle(p) => triangle_wave(t / p), Self::Sawtooth(p) => sawtooth_wave(t / p), Self::Square(period, duty) => square_wave(t / period, *duty), + Self::DaylightCycle(day_start, night_start) => { + let night_after_day = night_start >= day_start; + }, } } } diff --git a/transfer.sh b/transfer.sh new file mode 100644 index 0000000..ff26338 --- /dev/null +++ b/transfer.sh @@ -0,0 +1 @@ +scp target/debug/zwote_sonne kuchen:~/