Compare commits

...

4 Commits

Author SHA1 Message Date
Sebastian Denz cb7b56c83a [gui] first steps on playground ;) 4 years ago
Sebastian Denz 9b7ffd4d3d [board] sync wip to git 4 years ago
Sebastian Denz 0699954311 [fw] add missing font 4 years ago
Sebastian Denz 66c6a10ab6 firmware: add support for e-ink, lcd and oled 4 years ago
  1. BIN
      electronics/Nano_V3_mit_CH340_Datenblatt.pdf
  2. BIN
      electronics/Nano_V3_mit_CH340_Schematic.pdf
  3. BIN
      electronics/azdelivery_nano_pins.pdf
  4. 3634
      electronics/bom/ibom.html
  5. 4
      electronics/first_try-B_Cu.gbr
  6. 4
      electronics/first_try-B_Mask.gbr
  7. 4
      electronics/first_try-B_Paste.gbr
  8. 4
      electronics/first_try-B_SilkS.gbr
  9. 4
      electronics/first_try-Edge_Cuts.gbr
  10. 80
      electronics/first_try-F_Cu.gbr
  11. 4
      electronics/first_try-F_Mask.gbr
  12. 4
      electronics/first_try-F_Paste.gbr
  13. 1164
      electronics/first_try-F_SilkS.gbr
  14. 23
      electronics/first_try-cache.lib
  15. 2
      electronics/first_try-job.gbrjob
  16. 2328
      electronics/first_try.kicad_pcb
  17. 2116
      electronics/first_try.kicad_pcb-bak
  18. 236
      electronics/first_try.net
  19. 44
      electronics/first_try.sch
  20. 12
      electronics/first_try.sch-bak
  21. 138
      firmware/DejaVuSansMono5pt7b.h
  22. 253
      firmware/firmware.ino
  23. 1
      gui/.gitignore
  24. 71
      gui/main.go

BIN
electronics/Nano_V3_mit_CH340_Datenblatt.pdf

Binary file not shown.

BIN
electronics/Nano_V3_mit_CH340_Schematic.pdf

Binary file not shown.

BIN
electronics/azdelivery_nano_pins.pdf

Binary file not shown.

3634
electronics/bom/ibom.html

File diff suppressed because one or more lines are too long

4
electronics/first_try-B_Cu.gbr

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Copper,L2,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*

4
electronics/first_try-B_Mask.gbr

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Soldermask,Bot*
G04 #@! TF.FilePolarity,Negative*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*

4
electronics/first_try-B_Paste.gbr

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Paste,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*

4
electronics/first_try-B_SilkS.gbr

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Legend,Bot*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*

4
electronics/first_try-Edge_Cuts.gbr

@ -1,11 +1,11 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Profile,NP*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*

80
electronics/first_try-F_Cu.gbr

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Copper,L1,Top*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*
@ -610,10 +610,6 @@ X151877100Y-99420900D01*
G04 #@! TO.N,Net-(K6-Pad1)*
X155796000Y-98042000D02*
X156027000Y-98042000D01*
X189844900Y-64224100D02*
X201775900Y-64224100D01*
X201775900Y-64224100D02*
X206000000Y-60000000D01*
X155796000Y-98042000D02*
X160338000Y-93500000D01*
X160338000Y-93500000D02*
@ -2692,17 +2688,12 @@ X187987066Y-76618543D01*
X187802229Y-77064778D01*
X187708000Y-77538499D01*
X185236302Y-77538499D01*
X197790702Y-64984100D01*
X201738578Y-64984100D01*
X201775900Y-64987776D01*
X201813222Y-64984100D01*
X201813233Y-64984100D01*
X201924886Y-64973103D01*
X202068147Y-64929646D01*
X202200176Y-64859074D01*
X202315901Y-64764101D01*
X202339704Y-64735097D01*
X205412954Y-61661848D01*
X202014802Y-60760000D01*
X204409792Y-60760000D01*
X204440308Y-60833673D01*
X204632919Y-61121935D01*
X204878065Y-61367081D01*
X205166327Y-61559692D01*
X205486627Y-61692364D01*
X205826655Y-61760000D01*
X206173345Y-61760000D01*
@ -2737,25 +2728,6 @@ X201407753Y-59294454D01*
X201275724Y-59365026D01*
X201159999Y-59459999D01*
X201136201Y-59488997D01*
X197161098Y-63464100D01*
X189807567Y-63464100D01*
X189695914Y-63475097D01*
X189552653Y-63518554D01*
X189420624Y-63589126D01*
X189304899Y-63684099D01*
X189209926Y-63799824D01*
X189139354Y-63931853D01*
X189095897Y-64075114D01*
X189081223Y-64224100D01*
X189095897Y-64373086D01*
X189139354Y-64516347D01*
X189209926Y-64648376D01*
X189304899Y-64764101D01*
X189420624Y-64859074D01*
X189552653Y-64929646D01*
X189695914Y-64973103D01*
X189807567Y-64984100D01*
X195641098Y-64984100D01*
X192574333Y-68050865D01*
X192612000Y-67861501D01*
X192612000Y-67378499D01*
@ -5968,17 +5940,12 @@ X187987066Y-76618543D01*
X187802229Y-77064778D01*
X187708000Y-77538499D01*
X185236302Y-77538499D01*
X197790702Y-64984100D01*
X201738578Y-64984100D01*
X201775900Y-64987776D01*
X201813222Y-64984100D01*
X201813233Y-64984100D01*
X201924886Y-64973103D01*
X202068147Y-64929646D01*
X202200176Y-64859074D01*
X202315901Y-64764101D01*
X202339704Y-64735097D01*
X205412954Y-61661848D01*
X202014802Y-60760000D01*
X204409792Y-60760000D01*
X204440308Y-60833673D01*
X204632919Y-61121935D01*
X204878065Y-61367081D01*
X205166327Y-61559692D01*
X205486627Y-61692364D01*
X205826655Y-61760000D01*
X206173345Y-61760000D01*
@ -6013,25 +5980,6 @@ X201407753Y-59294454D01*
X201275724Y-59365026D01*
X201159999Y-59459999D01*
X201136201Y-59488997D01*
X197161098Y-63464100D01*
X189807567Y-63464100D01*
X189695914Y-63475097D01*
X189552653Y-63518554D01*
X189420624Y-63589126D01*
X189304899Y-63684099D01*
X189209926Y-63799824D01*
X189139354Y-63931853D01*
X189095897Y-64075114D01*
X189081223Y-64224100D01*
X189095897Y-64373086D01*
X189139354Y-64516347D01*
X189209926Y-64648376D01*
X189304899Y-64764101D01*
X189420624Y-64859074D01*
X189552653Y-64929646D01*
X189695914Y-64973103D01*
X189807567Y-64984100D01*
X195641098Y-64984100D01*
X192574333Y-68050865D01*
X192612000Y-67861501D01*
X192612000Y-67378499D01*

4
electronics/first_try-F_Mask.gbr

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Soldermask,Top*
G04 #@! TF.FilePolarity,Negative*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*

4
electronics/first_try-F_Paste.gbr

@ -1,12 +1,12 @@
G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.1.9+dfsg1-1*
G04 #@! TF.CreationDate,2020-12-31T02:51:56+01:00*
G04 #@! TF.CreationDate,2021-01-03T20:36:41+01:00*
G04 #@! TF.ProjectId,first_try,66697273-745f-4747-9279-2e6b69636164,rev?*
G04 #@! TF.SameCoordinates,Original*
G04 #@! TF.FileFunction,Paste,Top*
G04 #@! TF.FilePolarity,Positive*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2020-12-31 02:51:56*
G04 Created by KiCad (PCBNEW 5.1.9+dfsg1-1) date 2021-01-03 20:36:41*
%MOMM*%
%LPD*%
G01*

1164
electronics/first_try-F_SilkS.gbr

File diff suppressed because it is too large

23
electronics/first_try-cache.lib

@ -92,6 +92,29 @@ X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_LED
#
DEF Device_LED D 0 40 N N 1 F N
F0 "D" 0 100 50 H V C CNN
F1 "Device_LED" 0 -100 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
LED*
LED_SMD:*
LED_THT:*
$ENDFPLIST
DRAW
P 2 0 1 10 -50 -50 -50 50 N
P 2 0 1 0 -50 0 50 0 N
P 4 0 1 10 50 -50 50 50 -50 0 50 -50 N
P 5 0 1 0 -120 -30 -180 -90 -150 -90 -180 -90 -180 -60 N
P 5 0 1 0 -70 -30 -130 -90 -100 -90 -130 -90 -130 -60 N
X K 1 -150 0 100 R 50 50 1 1 P
X A 2 150 0 100 L 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_R
#
DEF Device_R R 0 0 N Y 1 F N

2
electronics/first_try-job.gbrjob

@ -7,7 +7,7 @@
"Application": "Pcbnew",
"Version": "5.1.9+dfsg1-1"
},
"CreationDate": "2020-12-31T02:51:56+01:00"
"CreationDate": "2021-01-03T20:36:41+01:00"
},
"GeneralSpecs":
{

2328
electronics/first_try.kicad_pcb

File diff suppressed because it is too large

2116
electronics/first_try.kicad_pcb-bak

File diff suppressed because it is too large

236
electronics/first_try.net

@ -1,7 +1,7 @@
(export (version D)
(design
(source /home/ixyd/Nextcloud/funkstuff/projects/antennaswitch/electronics/first_try.sch)
(date "Do 31 Dez 2020 02:20:50 CET")
(date "Do 07 Jan 2021 23:14:56 CET")
(tool "Eeschema 5.1.9+dfsg1-1")
(sheet (number 1) (name /) (tstamps /)
(title_block
@ -150,7 +150,7 @@
(tstamp 5FE3BA1F))
(comp (ref A1)
(value Arduino_Nano_Every)
(footprint Module:Arduino_Nano)
(footprint Package_DIP:DIP-32_W15.24mm_Socket)
(datasheet https://content.arduino.cc/assets/NANOEveryV3.0_sch.pdf)
(libsource (lib MCU_Module) (part Arduino_Nano_Every) (description "Arduino Nano Every"))
(sheetpath (names /) (tstamps /))
@ -231,7 +231,21 @@
(datasheet ~)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5FF995D0)))
(tstamp 5FF995D0))
(comp (ref R2)
(value R)
(footprint Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal)
(datasheet ~)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5FF7F7BC))
(comp (ref D1)
(value LED)
(footprint Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical)
(datasheet ~)
(libsource (lib Device) (part LED) (description "Light emitting diode"))
(sheetpath (names /) (tstamps /))
(tstamp 5FF80506)))
(libparts
(libpart (lib Connector) (part Conn_01x02_Male)
(description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)")
@ -283,6 +297,19 @@
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib Device) (part LED)
(description "Light emitting diode")
(docs ~)
(footprints
(fp LED*)
(fp LED_SMD:*)
(fp LED_THT:*))
(fields
(field (name Reference) D)
(field (name Value) LED))
(pins
(pin (num 1) (name K) (type passive))
(pin (num 2) (name A) (type passive))))
(libpart (lib Device) (part R)
(description Resistor)
(docs ~)
@ -467,78 +494,77 @@
(library (logical Transistor_Array)
(uri /usr/share/kicad/library/Transistor_Array.lib)))
(nets
(net (code 1) (name "Net-(J_IN1-Pad1)")
(node (ref J_IN1) (pin 1))
(node (ref K1) (pin 6))
(node (ref K1) (pin 7)))
(net (code 1) (name "Net-(K1-Pad1)")
(node (ref K1) (pin 1))
(node (ref U1) (pin 16)))
(net (code 2) (name "Net-(K2-Pad1)")
(node (ref K2) (pin 1))
(node (ref U1) (pin 15)))
(node (ref U1) (pin 15))
(node (ref K2) (pin 1)))
(net (code 3) (name "Net-(K3-Pad1)")
(node (ref U1) (pin 14))
(node (ref K3) (pin 1)))
(net (code 4) (name "Net-(K1-Pad1)")
(node (ref U1) (pin 16))
(node (ref K1) (pin 1)))
(net (code 4) (name "Net-(J_OUT2-Pad1)")
(node (ref K6) (pin 5))
(node (ref J_OUT2) (pin 1))
(node (ref K3) (pin 5))
(node (ref K2) (pin 5)))
(net (code 5) (name "Net-(J_OUT1-Pad1)")
(node (ref K1) (pin 5))
(node (ref K6) (pin 8))
(node (ref K4) (pin 5))
(node (ref J_OUT1) (pin 1))
(node (ref K4) (pin 5)))
(net (code 6) (name "Net-(J_OUT2-Pad1)")
(node (ref K3) (pin 5))
(node (ref J_OUT2) (pin 1))
(node (ref K2) (pin 5))
(node (ref K6) (pin 5)))
(node (ref K6) (pin 8)))
(net (code 6) (name "Net-(A1-Pad5)")
(node (ref SW1) (pin 2))
(node (ref R1) (pin 1))
(node (ref A1) (pin 5)))
(net (code 7) (name "Net-(A1-Pad27)")
(node (ref SW1) (pin 1))
(node (ref A1) (pin 27))
(node (ref SW1) (pin 1))
(node (ref U2) (pin 3))
(node (ref C2) (pin 1))
(node (ref J2) (pin 4))
(node (ref U2) (pin 3)))
(net (code 8) (name "Net-(A1-Pad5)")
(node (ref R1) (pin 1))
(node (ref A1) (pin 5))
(node (ref SW1) (pin 2)))
(net (code 9) (name "Net-(A1-Pad24)")
(node (ref J2) (pin 4)))
(net (code 8) (name "Net-(D1-Pad2)")
(node (ref R2) (pin 2))
(node (ref D1) (pin 2)))
(net (code 9) (name "Net-(A1-Pad23)")
(node (ref A1) (pin 23))
(node (ref J2) (pin 1)))
(net (code 10) (name "Net-(A1-Pad24)")
(node (ref A1) (pin 24))
(node (ref J2) (pin 2)))
(net (code 10) (name "Net-(A1-Pad23)")
(node (ref J2) (pin 1))
(node (ref A1) (pin 23)))
(net (code 11) (name "Net-(K5-Pad8)")
(node (ref K6) (pin 7))
(node (ref K6) (pin 6))
(node (ref K5) (pin 8)))
(net (code 11) (name "Net-(K1-Pad8)")
(node (ref K1) (pin 8))
(node (ref K2) (pin 6))
(node (ref K2) (pin 7)))
(net (code 12) (name "Net-(K6-Pad1)")
(node (ref K6) (pin 1))
(node (ref U1) (pin 11)))
(node (ref U1) (pin 11))
(node (ref K6) (pin 1)))
(net (code 13) (name "Net-(K5-Pad1)")
(node (ref K5) (pin 1))
(node (ref U1) (pin 12)))
(node (ref U1) (pin 12))
(node (ref K5) (pin 1)))
(net (code 14) (name "Net-(K4-Pad1)")
(node (ref K4) (pin 1))
(node (ref U1) (pin 13)))
(net (code 15) (name "Net-(J_IN3-Pad1)")
(node (ref U1) (pin 13))
(node (ref K4) (pin 1)))
(net (code 15) (name "Net-(K5-Pad8)")
(node (ref K5) (pin 8))
(node (ref K6) (pin 6))
(node (ref K6) (pin 7)))
(net (code 16) (name "Net-(J_IN3-Pad1)")
(node (ref K5) (pin 7))
(node (ref K5) (pin 6))
(node (ref J_IN3) (pin 1)))
(net (code 16) (name "Net-(J_IN2-Pad1)")
(node (ref J_IN3) (pin 1))
(node (ref K5) (pin 6)))
(net (code 17) (name "Net-(J_IN2-Pad1)")
(node (ref J_IN2) (pin 1))
(node (ref K3) (pin 7))
(node (ref K3) (pin 6)))
(net (code 17) (name "Net-(J_OUT3-Pad1)")
(node (ref K4) (pin 8))
(node (ref K3) (pin 6))
(node (ref K3) (pin 7)))
(net (code 18) (name "Net-(J_OUT3-Pad1)")
(node (ref K2) (pin 8))
(node (ref K4) (pin 8))
(node (ref K5) (pin 5))
(node (ref J_OUT3) (pin 1)))
(net (code 18) (name "Net-(K1-Pad8)")
(node (ref K2) (pin 7))
(node (ref K1) (pin 8))
(node (ref K2) (pin 6)))
(net (code 19) (name "Net-(A1-Pad9)")
(node (ref U1) (pin 3))
(node (ref A1) (pin 9)))
(node (ref A1) (pin 9))
(node (ref U1) (pin 3)))
(net (code 20) (name "Net-(A1-Pad8)")
(node (ref U1) (pin 4))
(node (ref A1) (pin 8)))
@ -549,79 +575,85 @@
(node (ref U1) (pin 6))
(node (ref A1) (pin 6)))
(net (code 23) (name VCC)
(node (ref U1) (pin 9))
(node (ref K4) (pin 4))
(node (ref K1) (pin 4))
(node (ref K5) (pin 4))
(node (ref K3) (pin 4))
(node (ref K4) (pin 4))
(node (ref J1) (pin 1))
(node (ref K2) (pin 4))
(node (ref U1) (pin 9))
(node (ref K6) (pin 4))
(node (ref R2) (pin 1))
(node (ref U2) (pin 1))
(node (ref C1) (pin 1))
(node (ref U2) (pin 1)))
(node (ref J1) (pin 1))
(node (ref K2) (pin 4)))
(net (code 24) (name "Net-(U1-Pad7)")
(node (ref U1) (pin 7)))
(net (code 25) (name "Net-(A1-Pad10)")
(node (ref A1) (pin 10))
(node (ref U1) (pin 2)))
(node (ref U1) (pin 2))
(node (ref A1) (pin 10)))
(net (code 26) (name "Net-(U1-Pad10)")
(node (ref U1) (pin 10)))
(net (code 27) (name "Net-(K3-Pad8)")
(node (ref K4) (pin 6))
(node (ref K3) (pin 8))
(node (ref K4) (pin 7)))
(net (code 28) (name "Net-(A1-Pad11)")
(node (ref U1) (pin 1))
(node (ref A1) (pin 11)))
(net (code 29) (name "Net-(A1-Pad30)")
(node (ref K4) (pin 7))
(node (ref K4) (pin 6)))
(net (code 28) (name "Net-(J_IN1-Pad1)")
(node (ref K1) (pin 6))
(node (ref K1) (pin 7))
(node (ref J_IN1) (pin 1)))
(net (code 29) (name "Net-(A1-Pad11)")
(node (ref A1) (pin 11))
(node (ref U1) (pin 1)))
(net (code 30) (name "Net-(A1-Pad30)")
(node (ref A1) (pin 30)))
(net (code 30) (name "Net-(A1-Pad3)")
(net (code 31) (name "Net-(A1-Pad3)")
(node (ref A1) (pin 3)))
(net (code 31) (name "Net-(A1-Pad28)")
(node (ref A1) (pin 28)))
(net (code 32) (name "Net-(A1-Pad26)")
(node (ref A1) (pin 26)))
(net (code 33) (name "Net-(A1-Pad25)")
(node (ref A1) (pin 25)))
(net (code 34) (name GND)
(net (code 32) (name "Net-(A1-Pad1)")
(node (ref A1) (pin 1)))
(net (code 33) (name GND)
(node (ref J_IN3) (pin 2))
(node (ref U2) (pin 2))
(node (ref J_OUT1) (pin 2))
(node (ref C1) (pin 2))
(node (ref J1) (pin 2))
(node (ref C2) (pin 2))
(node (ref J2) (pin 3))
(node (ref J_OUT2) (pin 2))
(node (ref D1) (pin 1))
(node (ref J_IN1) (pin 2))
(node (ref J_IN2) (pin 2))
(node (ref R1) (pin 2))
(node (ref J2) (pin 3))
(node (ref A1) (pin 29))
(node (ref A1) (pin 4))
(node (ref U1) (pin 8))
(node (ref J_OUT3) (pin 2))
(node (ref J_OUT2) (pin 2))
(node (ref J_OUT1) (pin 2))
(node (ref J_IN3) (pin 2))
(node (ref J_IN2) (pin 2))
(node (ref J_IN1) (pin 2))
(node (ref U2) (pin 2))
(node (ref C1) (pin 2)))
(net (code 35) (name "Net-(A1-Pad16)")
(node (ref A1) (pin 16)))
(net (code 36) (name "Net-(A1-Pad22)")
(node (ref A1) (pin 4))
(node (ref C2) (pin 2)))
(net (code 34) (name "Net-(A1-Pad2)")
(node (ref A1) (pin 2)))
(net (code 35) (name "Net-(A1-Pad28)")
(node (ref A1) (pin 28)))
(net (code 36) (name "Net-(A1-Pad26)")
(node (ref A1) (pin 26)))
(net (code 37) (name "Net-(A1-Pad25)")
(node (ref A1) (pin 25)))
(net (code 38) (name "Net-(A1-Pad22)")
(node (ref A1) (pin 22)))
(net (code 37) (name "Net-(A1-Pad21)")
(net (code 39) (name "Net-(A1-Pad21)")
(node (ref A1) (pin 21)))
(net (code 38) (name "Net-(A1-Pad20)")
(net (code 40) (name "Net-(A1-Pad20)")
(node (ref A1) (pin 20)))
(net (code 39) (name "Net-(A1-Pad2)")
(node (ref A1) (pin 2)))
(net (code 40) (name "Net-(A1-Pad19)")
(net (code 41) (name "Net-(A1-Pad19)")
(node (ref A1) (pin 19)))
(net (code 41) (name "Net-(A1-Pad18)")
(net (code 42) (name "Net-(A1-Pad18)")
(node (ref A1) (pin 18)))
(net (code 42) (name "Net-(A1-Pad17)")
(net (code 43) (name "Net-(A1-Pad17)")
(node (ref A1) (pin 17)))
(net (code 43) (name "Net-(A1-Pad15)")
(net (code 44) (name "Net-(A1-Pad16)")
(node (ref A1) (pin 16)))
(net (code 45) (name "Net-(A1-Pad15)")
(node (ref A1) (pin 15)))
(net (code 44) (name "Net-(A1-Pad14)")
(net (code 46) (name "Net-(A1-Pad14)")
(node (ref A1) (pin 14)))
(net (code 45) (name "Net-(A1-Pad13)")
(net (code 47) (name "Net-(A1-Pad13)")
(node (ref A1) (pin 13)))
(net (code 46) (name "Net-(A1-Pad12)")
(node (ref A1) (pin 12)))
(net (code 47) (name "Net-(A1-Pad1)")
(node (ref A1) (pin 1)))))
(net (code 48) (name "Net-(A1-Pad12)")
(node (ref A1) (pin 12)))))

44
electronics/first_try.sch

@ -254,7 +254,7 @@ U 1 1 5FE23361
P 3450 3200
F 0 "A1" H 3450 2019 50 0000 C CNN
F 1 "Arduino_Nano_Every" H 3450 2110 50 0000 C CNN
F 2 "Module:Arduino_Nano" H 3450 3200 50 0001 C CIN
F 2 "Package_DIP:DIP-32_W15.24mm_Socket" H 3450 3200 50 0001 C CIN
F 3 "https://content.arduino.cc/assets/NANOEveryV3.0_sch.pdf" H 3450 3200 50 0001 C CNN
1 3450 3200
-1 0 0 1
@ -598,8 +598,6 @@ Wire Wire Line
Connection ~ 2050 1600
Wire Wire Line
2050 1600 2600 1600
Wire Wire Line
1200 6150 2050 6150
Wire Wire Line
1200 950 1400 950
Wire Wire Line
@ -663,11 +661,47 @@ Wire Wire Line
4050 5150 3650 5150
Connection ~ 3650 5150
Connection ~ 1400 950
Wire Wire Line
1400 950 5250 950
Wire Wire Line
1750 1300 1400 1300
Connection ~ 1400 1300
Wire Wire Line
1400 1600 2050 1600
$Comp
L Device:R R2
U 1 1 5FF7F7BC
P 1650 5100
F 0 "R2" H 1720 5146 50 0000 L CNN
F 1 "R" H 1720 5055 50 0000 L CNN
F 2 "Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal" V 1580 5100 50 0001 C CNN
F 3 "~" H 1650 5100 50 0001 C CNN
1 1650 5100
1 0 0 -1
$EndComp
$Comp
L Device:LED D1
U 1 1 5FF80506
P 1650 5650
F 0 "D1" V 1689 5532 50 0000 R CNN
F 1 "LED" V 1598 5532 50 0000 R CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical" H 1650 5650 50 0001 C CNN
F 3 "~" H 1650 5650 50 0001 C CNN
1 1650 5650
0 -1 -1 0
$EndComp
Wire Wire Line
1650 4950 1650 950
Wire Wire Line
1400 950 1650 950
Connection ~ 1650 950
Wire Wire Line
1650 950 5250 950
Wire Wire Line
1650 5250 1650 5500
Wire Wire Line
1650 5800 1650 6150
Wire Wire Line
1200 6150 1650 6150
Connection ~ 1650 6150
Wire Wire Line
1650 6150 2050 6150
$EndSCHEMATC

12
electronics/first_try.sch-bak

@ -44,7 +44,7 @@ U 1 1 5FE2468F
P 6200 1900
F 0 "K1" H 6800 2165 50 0000 C CNN
F 1 "ST1-DC12V-F" H 6800 2074 50 0000 C CNN
F 2 "first_try:ST1DC12VF" H 7250 2000 50 0001 L CNN
F 2 "st1:ST1DC12VF" H 7250 2000 50 0001 L CNN
F 3 "https://www3.panasonic.biz/ac/e/uacs/download/index.jsp?c=mech_download" H 7250 1900 50 0001 L CNN
F 4 "General Purpose Relays 8A 12VDC 1FORMA/1FORMB PCB" H 7250 1800 50 0001 L CNN "Description"
F 5 "11.5" H 7250 1700 50 0001 L CNN "Height"
@ -61,7 +61,7 @@ U 1 1 5FE4896A
P 6200 3850
F 0 "K4" H 6800 4115 50 0000 C CNN
F 1 "ST1-DC12V-F" H 6800 4024 50 0000 C CNN
F 2 "first_try:ST1DC12VF" H 7250 3950 50 0001 L CNN
F 2 "st1:ST1DC12VF" H 7250 3950 50 0001 L CNN
F 3 "https://www3.panasonic.biz/ac/e/uacs/download/index.jsp?c=mech_download" H 7250 3850 50 0001 L CNN
F 4 "General Purpose Relays 8A 12VDC 1FORMA/1FORMB PCB" H 7250 3750 50 0001 L CNN "Description"
F 5 "11.5" H 7250 3650 50 0001 L CNN "Height"
@ -78,7 +78,7 @@ U 1 1 5FE48976
P 6200 4500
F 0 "K5" H 6800 4765 50 0000 C CNN
F 1 "ST1-DC12V-F" H 6800 4674 50 0000 C CNN
F 2 "first_try:ST1DC12VF" H 7250 4600 50 0001 L CNN
F 2 "st1:ST1DC12VF" H 7250 4600 50 0001 L CNN
F 3 "https://www3.panasonic.biz/ac/e/uacs/download/index.jsp?c=mech_download" H 7250 4500 50 0001 L CNN
F 4 "General Purpose Relays 8A 12VDC 1FORMA/1FORMB PCB" H 7250 4400 50 0001 L CNN "Description"
F 5 "11.5" H 7250 4300 50 0001 L CNN "Height"
@ -95,7 +95,7 @@ U 1 1 5FE48982
P 6200 5150
F 0 "K6" H 6800 5415 50 0000 C CNN
F 1 "ST1-DC12V-F" H 6800 5324 50 0000 C CNN
F 2 "first_try:ST1DC12VF" H 7250 5250 50 0001 L CNN
F 2 "st1:ST1DC12VF" H 7250 5250 50 0001 L CNN
F 3 "https://www3.panasonic.biz/ac/e/uacs/download/index.jsp?c=mech_download" H 7250 5150 50 0001 L CNN
F 4 "General Purpose Relays 8A 12VDC 1FORMA/1FORMB PCB" H 7250 5050 50 0001 L CNN "Description"
F 5 "11.5" H 7250 4950 50 0001 L CNN "Height"
@ -122,7 +122,7 @@ U 1 1 5FE2CEF1
P 6200 2550
F 0 "K2" H 6800 2815 50 0000 C CNN
F 1 "ST1-DC12V-F" H 6800 2724 50 0000 C CNN
F 2 "first_try:ST1DC12VF" H 7250 2650 50 0001 L CNN
F 2 "st1:ST1DC12VF" H 7250 2650 50 0001 L CNN
F 3 "https://www3.panasonic.biz/ac/e/uacs/download/index.jsp?c=mech_download" H 7250 2550 50 0001 L CNN
F 4 "General Purpose Relays 8A 12VDC 1FORMA/1FORMB PCB" H 7250 2450 50 0001 L CNN "Description"
F 5 "11.5" H 7250 2350 50 0001 L CNN "Height"
@ -211,7 +211,7 @@ U 1 1 5FE3BA1F
P 6200 3200
F 0 "K3" H 6800 3465 50 0000 C CNN
F 1 "ST1-DC12V-F" H 6800 3374 50 0000 C CNN
F 2 "first_try:ST1DC12VF" H 7250 3300 50 0001 L CNN
F 2 "st1:ST1DC12VF" H 7250 3300 50 0001 L CNN
F 3 "https://www3.panasonic.biz/ac/e/uacs/download/index.jsp?c=mech_download" H 7250 3200 50 0001 L CNN
F 4 "General Purpose Relays 8A 12VDC 1FORMA/1FORMB PCB" H 7250 3100 50 0001 L CNN "Description"
F 5 "11.5" H 7250 3000 50 0001 L CNN "Height"

138
firmware/DejaVuSansMono5pt7b.h

@ -0,0 +1,138 @@
const uint8_t DejaVuSansMono5pt7bBitmaps[] PROGMEM = {
0x00, 0xFA, 0xB6, 0x80, 0x28, 0xA7, 0xD4, 0xF9, 0x45, 0x00, 0x23, 0xE9,
0xC3, 0x97, 0xC4, 0xE2, 0x8E, 0x8C, 0x5C, 0x51, 0xC0, 0x72, 0x19, 0x59,
0xC9, 0xA0, 0xE0, 0x6A, 0xAA, 0x40, 0xA5, 0x56, 0x80, 0xAB, 0x9D, 0x50,
0x21, 0x3E, 0x42, 0x00, 0xE0, 0xE0, 0x80, 0x08, 0x84, 0x42, 0x21, 0x10,
0x74, 0x63, 0x58, 0xC5, 0xC0, 0xE1, 0x08, 0x42, 0x13, 0xE0, 0x74, 0x42,
0x33, 0x23, 0xE0, 0x74, 0x42, 0xE0, 0xC5, 0xC0, 0x11, 0x95, 0xAF, 0x88,
0x40, 0xF4, 0x3C, 0x10, 0x87, 0xC0, 0x7E, 0x21, 0xE8, 0xC5, 0xC0, 0xF8,
0xC4, 0x22, 0x11, 0x00, 0x74, 0x62, 0xE8, 0xC5, 0xC0, 0x74, 0x62, 0xF0,
0x8F, 0xC0, 0x88, 0x8E, 0x0B, 0xA0, 0xE0, 0x80, 0xF8, 0x3E, 0x83, 0x82,
0xE8, 0x00, 0xF1, 0x24, 0x40, 0x40, 0x72, 0x6F, 0x5A, 0xD6, 0xE8, 0x30,
0x21, 0x14, 0xA7, 0x46, 0x20, 0xF4, 0x63, 0xE8, 0xC7, 0xC0, 0x7E, 0x61,
0x08, 0x65, 0xE0, 0xF4, 0xE3, 0x18, 0xCF, 0xC0, 0xFC, 0x21, 0xF8, 0x43,
0xE0, 0xFC, 0x21, 0xF8, 0x42, 0x00, 0x76, 0x61, 0x38, 0xE5, 0xE0, 0x8C,
0x63, 0xF8, 0xC6, 0x20, 0xF9, 0x08, 0x42, 0x13, 0xE0, 0x71, 0x11, 0x19,
0x60, 0x8C, 0xA9, 0x8A, 0x4A, 0x20, 0x84, 0x21, 0x08, 0x43, 0xE0, 0x8E,
0xF7, 0x58, 0xC6, 0x20, 0x8E, 0x73, 0x59, 0xCE, 0x20, 0x74, 0x63, 0x18,
0xC5, 0xC0, 0xF4, 0x63, 0xE8, 0x42, 0x00, 0x74, 0x63, 0x18, 0xC5, 0xC3,
0xF2, 0x28, 0xBC, 0x9A, 0x28, 0x40, 0x74, 0x60, 0xE0, 0xC5, 0xC0, 0xF9,
0x08, 0x42, 0x10, 0x80, 0x8C, 0x63, 0x18, 0xC5, 0xC0, 0x8C, 0x54, 0xA5,
0x10, 0x80, 0x86, 0xDB, 0x5E, 0x49, 0x24, 0x80, 0x8A, 0x94, 0x45, 0x2A,
0x20, 0x8A, 0x94, 0x42, 0x10, 0x80, 0xF8, 0x84, 0x44, 0x23, 0xE0, 0xEA,
0xAA, 0xC0, 0x82, 0x10, 0x42, 0x08, 0x41, 0xD5, 0x55, 0xC0, 0x22, 0xA2,
0xFC, 0x90, 0xF0, 0x5F, 0x1F, 0x80, 0x84, 0x21, 0xE8, 0xC6, 0x3E, 0x78,
0x88, 0x70, 0x08, 0x42, 0xF8, 0xC6, 0x2F, 0x74, 0x7F, 0x07, 0x80, 0x34,
0x4F, 0x44, 0x44, 0x7C, 0x63, 0x17, 0x85, 0xC0, 0x84, 0x21, 0x6C, 0xC6,
0x31, 0x20, 0x00, 0xC2, 0x10, 0x9F, 0x20, 0x72, 0x49, 0x38, 0x84, 0x21,
0x2A, 0x72, 0x51, 0xE1, 0x08, 0x42, 0x10, 0x83, 0xFD, 0x6B, 0x5A, 0x80,
0xB6, 0x63, 0x18, 0x80, 0x74, 0x63, 0x17, 0x00, 0xF4, 0x63, 0x1F, 0x42,
0x00, 0x7C, 0x63, 0x17, 0x84, 0x20, 0xF9, 0x88, 0x80, 0x7C, 0x1E, 0x1F,
0x00, 0x44, 0xF4, 0x44, 0x70, 0x8C, 0x63, 0x17, 0x80, 0x8A, 0x94, 0xA2,
0x00, 0x8D, 0x54, 0xA5, 0x00, 0xDA, 0x88, 0xAD, 0x80, 0x8A, 0x94, 0x42,
0x13, 0x00, 0xF8, 0x88, 0x8F, 0x80, 0x32, 0x22, 0xC2, 0x22, 0x30, 0xFF,
0xC0, 0xC4, 0x44, 0x34, 0x44, 0xC0, 0xE0, 0xC0 };
const GFXglyph DejaVuSansMono5pt7bGlyphs[] PROGMEM = {
{ 0, 1, 1, 6, 0, 0 }, // 0x20 ' '
{ 1, 1, 7, 6, 3, -6 }, // 0x21 '!'
{ 2, 3, 3, 6, 2, -6 }, // 0x22 '"'
{ 4, 6, 7, 6, 0, -6 }, // 0x23 '#'
{ 10, 5, 8, 6, 1, -6 }, // 0x24 '$'
{ 15, 6, 7, 6, 0, -6 }, // 0x25 '%'
{ 21, 5, 7, 6, 1, -6 }, // 0x26 '&'
{ 26, 1, 3, 6, 3, -6 }, // 0x27 '''
{ 27, 2, 9, 6, 2, -7 }, // 0x28 '('
{ 30, 2, 9, 6, 2, -7 }, // 0x29 ')'
{ 33, 5, 4, 6, 1, -6 }, // 0x2A '*'
{ 36, 5, 5, 6, 1, -5 }, // 0x2B '+'
{ 40, 1, 3, 6, 2, 0 }, // 0x2C ','
{ 41, 3, 1, 6, 2, -2 }, // 0x2D '-'
{ 42, 1, 1, 6, 2, 0 }, // 0x2E '.'
{ 43, 5, 8, 6, 1, -6 }, // 0x2F '/'
{ 48, 5, 7, 6, 1, -6 }, // 0x30 '0'
{ 53, 5, 7, 6, 1, -6 }, // 0x31 '1'
{ 58, 5, 7, 6, 1, -6 }, // 0x32 '2'
{ 63, 5, 7, 6, 1, -6 }, // 0x33 '3'
{ 68, 5, 7, 6, 1, -6 }, // 0x34 '4'
{ 73, 5, 7, 6, 1, -6 }, // 0x35 '5'
{ 78, 5, 7, 6, 1, -6 }, // 0x36 '6'
{ 83, 5, 7, 6, 1, -6 }, // 0x37 '7'
{ 88, 5, 7, 6, 1, -6 }, // 0x38 '8'
{ 93, 5, 7, 6, 1, -6 }, // 0x39 '9'
{ 98, 1, 5, 6, 2, -4 }, // 0x3A ':'
{ 99, 1, 7, 6, 2, -4 }, // 0x3B ';'
{ 100, 5, 5, 6, 1, -5 }, // 0x3C '<'
{ 104, 5, 3, 6, 0, -4 }, // 0x3D '='
{ 106, 5, 5, 6, 1, -5 }, // 0x3E '>'
{ 110, 4, 7, 6, 1, -6 }, // 0x3F '?'
{ 114, 5, 9, 6, 1, -6 }, // 0x40 '@'
{ 120, 5, 7, 6, 1, -6 }, // 0x41 'A'
{ 125, 5, 7, 6, 1, -6 }, // 0x42 'B'
{ 130, 5, 7, 6, 1, -6 }, // 0x43 'C'
{ 135, 5, 7, 6, 1, -6 }, // 0x44 'D'
{ 140, 5, 7, 6, 1, -6 }, // 0x45 'E'
{ 145, 5, 7, 6, 1, -6 }, // 0x46 'F'
{ 150, 5, 7, 6, 1, -6 }, // 0x47 'G'
{ 155, 5, 7, 6, 1, -6 }, // 0x48 'H'
{ 160, 5, 7, 6, 1, -6 }, // 0x49 'I'
{ 165, 4, 7, 6, 1, -6 }, // 0x4A 'J'
{ 169, 5, 7, 6, 1, -6 }, // 0x4B 'K'
{ 174, 5, 7, 6, 1, -6 }, // 0x4C 'L'
{ 179, 5, 7, 6, 1, -6 }, // 0x4D 'M'
{ 184, 5, 7, 6, 1, -6 }, // 0x4E 'N'
{ 189, 5, 7, 6, 1, -6 }, // 0x4F 'O'
{ 194, 5, 7, 6, 1, -6 }, // 0x50 'P'
{ 199, 5, 8, 6, 1, -6 }, // 0x51 'Q'
{ 204, 6, 7, 6, 1, -6 }, // 0x52 'R'
{ 210, 5, 7, 6, 1, -6 }, // 0x53 'S'
{ 215, 5, 7, 6, 1, -6 }, // 0x54 'T'
{ 220, 5, 7, 6, 1, -6 }, // 0x55 'U'
{ 225, 5, 7, 6, 1, -6 }, // 0x56 'V'
{ 230, 6, 7, 6, 0, -6 }, // 0x57 'W'
{ 236, 5, 7, 6, 1, -6 }, // 0x58 'X'
{ 241, 5, 7, 6, 1, -6 }, // 0x59 'Y'
{ 246, 5, 7, 6, 1, -6 }, // 0x5A 'Z'
{ 251, 2, 9, 6, 2, -7 }, // 0x5B '['
{ 254, 5, 8, 6, 1, -6 }, // 0x5C '\'
{ 259, 2, 9, 6, 2, -7 }, // 0x5D ']'
{ 262, 5, 3, 6, 0, -6 }, // 0x5E '^'
{ 264, 6, 1, 6, 0, 2 }, // 0x5F '_'
{ 265, 2, 2, 6, 1, -7 }, // 0x60 '`'
{ 266, 5, 5, 6, 1, -4 }, // 0x61 'a'
{ 270, 5, 8, 6, 1, -7 }, // 0x62 'b'
{ 275, 4, 5, 6, 1, -4 }, // 0x63 'c'
{ 278, 5, 8, 6, 1, -7 }, // 0x64 'd'
{ 283, 5, 5, 6, 1, -4 }, // 0x65 'e'
{ 287, 4, 8, 6, 1, -7 }, // 0x66 'f'
{ 291, 5, 7, 6, 1, -4 }, // 0x67 'g'
{ 296, 5, 8, 6, 1, -7 }, // 0x68 'h'
{ 301, 5, 8, 6, 1, -7 }, // 0x69 'i'
{ 306, 3, 10, 6, 1, -7 }, // 0x6A 'j'
{ 310, 5, 8, 6, 1, -7 }, // 0x6B 'k'
{ 315, 5, 8, 6, 0, -7 }, // 0x6C 'l'
{ 320, 5, 5, 6, 1, -4 }, // 0x6D 'm'
{ 324, 5, 5, 6, 1, -4 }, // 0x6E 'n'
{ 328, 5, 5, 6, 1, -4 }, // 0x6F 'o'
{ 332, 5, 7, 6, 1, -4 }, // 0x70 'p'
{ 337, 5, 7, 6, 1, -4 }, // 0x71 'q'
{ 342, 4, 5, 6, 2, -4 }, // 0x72 'r'
{ 345, 5, 5, 6, 1, -4 }, // 0x73 's'
{ 349, 4, 7, 6, 1, -6 }, // 0x74 't'
{ 353, 5, 5, 6, 1, -4 }, // 0x75 'u'
{ 357, 5, 5, 6, 1, -4 }, // 0x76 'v'
{ 361, 5, 5, 6, 1, -4 }, // 0x77 'w'
{ 365, 5, 5, 6, 1, -4 }, // 0x78 'x'
{ 369, 5, 7, 6, 1, -4 }, // 0x79 'y'
{ 374, 5, 5, 6, 1, -4 }, // 0x7A 'z'
{ 378, 4, 9, 6, 1, -7 }, // 0x7B '{'
{ 383, 1, 10, 6, 3, -7 }, // 0x7C '|'
{ 385, 4, 9, 6, 2, -7 }, // 0x7D '}'
{ 390, 5, 2, 6, 1, -3 } }; // 0x7E '~'
const GFXfont DejaVuSansMono5pt7b PROGMEM = {
(uint8_t *)DejaVuSansMono5pt7bBitmaps,
(GFXglyph *)DejaVuSansMono5pt7bGlyphs,
0x20, 0x7E, 11 };
// Approx. 1064 bytes

253
firmware/firmware.ino

@ -5,20 +5,21 @@
*/
#include <EEPROM.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#define MODES 6
#define USE_I2C_LCD
//#define USE_I2C_OLED
//#define USE_SPI_EINK
#define VERSION "v0.2"
#define pin_K1 8 //2
#define pin_K2 7//3
#define pin_K3 6//4
#define pin_K4 5//5
#define pin_K5 4//6
#define pin_K6 3//12
#define pin_T 2//14
#define pin_K1 8
#define pin_K2 7
#define pin_K3 6
#define pin_K4 5
#define pin_K5 4
#define pin_K6 3
#define pin_T 12
#define VERSION "v0.2"
#define MODES 6
struct state {
char name[4];
@ -31,11 +32,12 @@ struct state {
};
struct identifier {
char signature[16];
char ant[3][16];
char trx[3][16];
};
struct identifier names;
struct identifier names; // = { "samcfg", "ant1", "ant2", "ant3", "trx1", "trx2", "trx3" };
const struct state matrix[] = {
{"123", 0, 0, 0, 0, 0, 0}, // ANT1->TRX1 ANT2->TRX2 ANT3->TRX3
@ -48,43 +50,18 @@ const struct state matrix[] = {
int mode;
LiquidCrystal_I2C lcd(0x27, 20, 4);
/*###########################################*/
#if defined(USE_I2C_LCD)
/*###########################################*/
void setup() {
Serial.begin(9600);
Serial.print(F("[S] configuring pins.."));
pinMode(pin_K1, OUTPUT);
pinMode(pin_K2, OUTPUT);
pinMode(pin_K3, OUTPUT);
pinMode(pin_K4, OUTPUT);
pinMode(pin_K5, OUTPUT);
pinMode(pin_K6, OUTPUT);
pinMode(pin_T, INPUT);
Serial.println("done");
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
Serial.print(F("[S] loading identifiers from EEPROM.."));
EEPROM.get(0, names);
Serial.println("done");
LiquidCrystal_I2C lcd(0x27, 20, 4);
Serial.print(F("[S] initializing display.."));
void initDisplay() {
lcd.init();
lcd.backlight();
Serial.println("done");
Serial.print(F("[S] initializing relays with mode 123.."));
setMode("123");
setRelays(0);
Serial.println("done");
Serial.print(F("[S] showing bootsplash.."));
bootSplash();
Serial.println("done");
printMatrix();
Serial.println("[S] setup finished");
}
void bootSplash() {
lcd.setCursor(8,0);
lcd.print(F("stupid"));
delay(350);
@ -100,7 +77,7 @@ void bootSplash() {
delay(3000);
lcd.clear();
lcd.setCursor(8,0);
lcd.print(F("see"));
lcd.print(F("visit"));
lcd.setCursor(0,1);
lcd.print(F("github.com/denzs/sam"));
lcd.setCursor(0,2);
@ -108,30 +85,190 @@ void bootSplash() {
delay(5000);
}
void storeName(char *dst, char *src) {
strncpy(dst, src, strlen(src));
dst[strlen(src) - 1] = '\0';
}
void printMatrix() {
void updateDisplay() {
char m[4], out[32];
int c;
strcpy(m, matrix[mode].name);
lcd.clear();
lcd.setCursor(3,0);
lcd.print(F("S.A.M. by DL3SD"));
for(int i=0; i < 3; i++) {
for(int i=0; i < MODES/2; i++) {
c = m[i]-48;
lcd.setCursor(0, i+1);
lcd.print(names.trx[i]);
lcd.setCursor(9, i+1);
sprintf(out, "<- %s", names.ant[c-1]);
lcd.setCursor(10, i+1);
sprintf(out, "%s", names.ant[c-1]);
lcd.print(out);
}
}
/*###########################################*/
#endif
/*###########################################*/
/*###########################################*/
#if defined(USE_I2C_OLED)
/*###########################################*/
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeSans9pt7b.h>
#include "DejaVuSansMono5pt7b.h"
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
void updateDisplay() {
char m[4], out[32];
int c;
strcpy(m, matrix[mode].name);
display.clearDisplay();
//lcd.setCursor(3,0);
//lcd.print(F("S.A.M. by DL3SD"));
for(int i=0; i < MODES/2; i++) {
c = m[i]-48;
display.setCursor(0, (i+1)*10);
display.print(names.trx[i]);
display.setCursor(64, (i+1)*10);
sprintf(out, "%s", names.ant[c-1]);
display.print(out);
}
display.display();
}
void initDisplay() {
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.display();
//display.setFont(&FreeSans9pt7b);
display.setFont(&DejaVuSansMono5pt7b);
//display.setTextSize(1);
delay(1000);
display.clearDisplay();
display.setTextColor(WHITE);
}
/*###########################################*/
#endif
/*###########################################*/
/*###########################################*/
#if defined(USE_SPI_EINK)
/*###########################################*/
#define ENABLE_GxEPD2_GFX 0
#include <GxEPD2_BW.h> // including both doesn't hurt
#include <GxEPD2_3C.h> // including both doesn't hurt FIXME remove???
#include <Fonts/FreeMonoBold9pt7b.h>
#define MAX_DISPLAY_BUFFER_SIZE 600
#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8))
GxEPD2_BW<GxEPD2_290, MAX_HEIGHT(GxEPD2_290)> display(GxEPD2_290(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
void updateDisplay() {
char out[256];
sprintf(out, " s.a.m. by DL3SD\n github.com/denzs/sam\n\n %s %s\n %s %s\n %s %s", names.trx[0], names.ant[matrix[mode].name[0]-49], names.trx[1], names.ant[matrix[mode].name[1]-49], names.trx[2], names.ant[matrix[mode].name[2]-49]);
Serial.println(out);
display.setRotation(1);
display.setFont(&FreeMonoBold9pt7b);
display.setTextColor(GxEPD_BLACK);
int16_t tbx, tby; uint16_t tbw, tbh;
display.getTextBounds(out , 0, 0, &tbx, &tby, &tbw, &tbh);
// center the bounding box by transposition of the origin:
uint16_t x = ((display.width() - tbw) / 2) - tbx;
uint16_t y = ((display.height() - tbh) / 2) - tby;
display.setFullWindow();
display.firstPage();
do
{
Serial.println("[I] refresh eink screen..");
display.fillScreen(GxEPD_WHITE);
display.setCursor(x, y);
display.print(out);
}
while (display.nextPage());
display.hibernate();
}
void initDisplay() {
display.init();
char out[] = " s.a.m. by DL3SD\n github.com/denzs/sam\n\n";
display.setRotation(1);
display.setFont(&FreeMonoBold9pt7b);
display.setTextColor(GxEPD_BLACK);
int16_t tbx, tby; uint16_t tbw, tbh;
display.getTextBounds(out , 0, 0, &tbx, &tby, &tbw, &tbh);
// center the bounding box by transposition of the origin:
uint16_t x = ((display.width() - tbw) / 2) - tbx;
uint16_t y = ((display.height() - tbh) / 2); // - tby;
display.setFullWindow();
display.firstPage();
do
{
display.fillScreen(GxEPD_WHITE);
display.setCursor(x, y);
display.print(out);
}
while (display.nextPage());
display.hibernate();
}
/*###########################################*/
#endif
/*###########################################*/
void setup() {
Serial.begin(9600);
Serial.print(F("[S] configuring pins.."));
pinMode(pin_K1, OUTPUT);
pinMode(pin_K2, OUTPUT);
pinMode(pin_K3, OUTPUT);
pinMode(pin_K4, OUTPUT);
pinMode(pin_K5, OUTPUT);
pinMode(pin_K6, OUTPUT);
pinMode(pin_T, INPUT);
Serial.println(F("done"));
Serial.print(F("[S] trying to read identifiers from EEPROM.."));
EEPROM.get(0, names);
Serial.println(F("done"));
if(strcmp(names.signature, "samcfg") == 0) {
Serial.println(F("[S] configuration found"));
} else {
Serial.println(F("[S] configuration not found.. using defaults"));
strcpy(names.signature, "samcfg");
strcpy(names.ant[0], "ant1");
strcpy(names.ant[1], "ant2");
strcpy(names.ant[2], "ant3");
strcpy(names.trx[0], "trx1");
strcpy(names.trx[1], "trx2");
strcpy(names.trx[2], "trx3");
}
Serial.print(F("[S] init relays with mode 123.."));
setMode("123");
setRelays(0);
Serial.println(F("done"));
Serial.print(F("[S] initializing display.."));
initDisplay();
Serial.println(F("done"));
updateDisplay();
Serial.println(F("[S] setup finished"));
}
void storeName(char *dst, char *src) {
strncpy(dst, src, strlen(src));
dst[strlen(src) - 1] = '\0';
}
void setRelays(bool display) {
digitalWrite(pin_K1, matrix[mode].K1);
digitalWrite(pin_K2, matrix[mode].K2);
@ -140,7 +277,7 @@ void setRelays(bool display) {
digitalWrite(pin_K5, matrix[mode].K5);
digitalWrite(pin_K6, matrix[mode].K6);
if (display) {
printMatrix();
updateDisplay();
}
}
@ -181,7 +318,7 @@ void parseCommand(String s) {
case '2':
case '3':
storeName(names.ant[(int)s[1] - 49], &s[2]);
printMatrix();
updateDisplay();
break;
default:
Serial.println("unsupported option");
@ -195,7 +332,7 @@ void parseCommand(String s) {
case '2':
case '3':
storeName(names.trx[(int)s[1] - 49], &s[2]);
printMatrix();
updateDisplay();
break;
default:
Serial.println("unsupported option");

1
gui/.gitignore

@ -0,0 +1 @@
gui

71
gui/main.go

@ -0,0 +1,71 @@
package main
import (
"fmt"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/widget"
"github.com/jnovack/flag"
log "github.com/sirupsen/logrus"
"os"
)
var password string
var trx int
var trace bool
var uri string
var trxname string
var ant1 string
var ant2 string
var ant3 string
func usage() {
fmt.Printf("Usage of %s:\n", os.Args[0])
flag.PrintDefaults()
}
func init() {
flag.StringVar(&password, "password", "", "your password")
flag.StringVar(&uri, "uri", "http://http-exporter", "uri to your http-exporter")
flag.IntVar(&trx, "trx", -1, "connected trx port on s.a.m.")
flag.BoolVar(&trace, "trace", false, "log almost everything")
flag.Parse()
if password == "" || uri == "" || trx == -1 {
usage()
os.Exit(1)
}
if trace {
log.SetLevel(log.TraceLevel)
log.Info("trace logging enabled")
} else {
log.Info("normal logging enabled")
}
// FIXME
log.Info("[fake] getting name from s.a.m. server..")
trxname = "KX3"
ant1 = "HF-P1 40m"
ant2 = "GP 20/15/10m"
ant3 = "2m Eggbeater"
}
func main() {
a := app.New()
w := a.NewWindow("Antenna Switcher")
hello := widget.NewLabel("just started..")
w.SetContent(container.NewVBox(
hello,
widget.NewButton(ant1, func() {
hello.SetText(fmt.Sprintf("%s : %s", trxname, ant1))
}),
widget.NewButton(ant2, func() {
hello.SetText(fmt.Sprintf("%s : %s", trxname, ant2))
}),
widget.NewButton(ant3, func() {
hello.SetText(fmt.Sprintf("%s : %s", trxname, ant3))
}),
))
w.ShowAndRun()
}
Loading…
Cancel
Save