Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
51ad293c94 |
@ -1,54 +1,484 @@
|
|||||||
EESchema-LIBRARY Version 2.4
|
EESchema-LIBRARY Version 2.4
|
||||||
#encoding utf-8
|
#encoding utf-8
|
||||||
#
|
#
|
||||||
# 00_mylib_Logo
|
# 000_my_lib:DSN-MINI-360
|
||||||
#
|
#
|
||||||
DEF 00_mylib_Logo Log 0 0 N N 1 F N
|
DEF 000_my_lib:DSN-MINI-360 MOD 0 40 N Y 1 F N
|
||||||
F0 "Log" 0 0 50 H I C CNN
|
F0 "MOD" 350 -50 50 H V C CNN
|
||||||
F1 "00_mylib_Logo" 0 100 50 H V C CNN
|
F1 "000_my_lib:DSN-MINI-360" 200 350 50 H V C CNN
|
||||||
F2 "" 0 0 50 H I C CNN
|
F2 "" 250 150 50 H I C CNN
|
||||||
F3 "" 0 0 50 H I C CNN
|
F3 "" 250 150 50 H I C CNN
|
||||||
DRAW
|
DRAW
|
||||||
|
S 0 300 400 0 0 0 0 f
|
||||||
|
X GND GND 200 -100 100 U 50 50 1 1 P
|
||||||
|
X IN IN -100 250 100 R 50 50 1 1 P
|
||||||
|
X OUT OUT 500 250 100 L 50 50 1 1 P
|
||||||
ENDDRAW
|
ENDDRAW
|
||||||
ENDDEF
|
ENDDEF
|
||||||
#
|
#
|
||||||
# 00_mylib_OWN_DCDC-CANNode
|
# 000_my_lib:MAX3032
|
||||||
#
|
#
|
||||||
DEF 00_mylib_OWN_DCDC-CANNode MOD 0 40 N N 1 L N
|
DEF 000_my_lib:MAX3032 U 0 20 Y Y 1 F N
|
||||||
F0 "MOD" 0 0 45 H I C CNN
|
F0 "U" -300 750 50 H V L CNN
|
||||||
F1 "00_mylib_OWN_DCDC-CANNode" 0 0 45 H I C CNN
|
F1 "000_my_lib:MAX3032" 100 750 50 H V L CNN
|
||||||
|
F2 "Package_SO:SOIC-16_3.9x9.9mm_P1.27mm" -100 -800 50 H I C CNN
|
||||||
|
F3 "" 50 -100 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
TSSOP*4.4x5mm*P0.65mm*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
C 0 -300 14 1 0 0 F
|
||||||
|
C 0 300 14 1 0 0 F
|
||||||
|
C 75 -500 20 1 0 0 N
|
||||||
|
C 75 -200 20 1 0 0 N
|
||||||
|
C 75 100 20 1 0 0 N
|
||||||
|
C 75 400 20 1 0 0 N
|
||||||
|
T 0 -35 450 40 0 1 0 D1 Normal 0 C C
|
||||||
|
T 0 -35 150 40 0 1 0 D2 Normal 0 C C
|
||||||
|
T 0 -35 -150 40 0 1 0 D3 Normal 0 C C
|
||||||
|
T 0 -35 -450 40 0 1 0 D4 Normal 0 C C
|
||||||
|
S -350 700 400 -700 1 0 10 f
|
||||||
|
P 2 1 0 0 150 -500 95 -500 N
|
||||||
|
P 2 1 0 0 150 -200 95 -200 N
|
||||||
|
P 2 1 0 0 150 100 95 100 N
|
||||||
|
P 2 1 0 0 150 400 95 400 N
|
||||||
|
P 3 1 0 0 75 -435 75 -400 150 -400 N
|
||||||
|
P 3 1 0 0 75 165 75 200 150 200 N
|
||||||
|
P 3 1 0 0 75 465 75 500 150 500 N
|
||||||
|
P 2 0 1 0 -100 -450 -200 -450 N
|
||||||
|
P 2 0 1 0 -100 -150 -200 -150 N
|
||||||
|
P 2 0 1 0 -100 150 -200 150 N
|
||||||
|
P 2 0 1 0 -100 450 -200 450 N
|
||||||
|
P 2 0 1 0 0 -300 -100 -300 N
|
||||||
|
P 2 0 1 0 0 -200 0 -400 N
|
||||||
|
P 2 0 1 0 0 300 -100 300 N
|
||||||
|
P 2 0 1 0 0 400 0 200 N
|
||||||
|
P 2 0 1 0 75 -480 75 -465 N
|
||||||
|
P 2 0 1 0 75 -180 75 -165 N
|
||||||
|
P 2 0 1 0 75 120 75 135 N
|
||||||
|
P 2 0 1 0 75 420 75 435 N
|
||||||
|
P 2 0 1 0 350 -400 350 -400 N
|
||||||
|
P 3 0 1 0 150 -100 75 -100 75 -135 N
|
||||||
|
P 4 1 1 10 -100 -350 -100 -550 100 -450 -100 -350 N
|
||||||
|
P 4 1 1 10 -100 -50 -100 -250 100 -150 -100 -50 N
|
||||||
|
P 4 1 1 10 -100 250 -100 50 100 150 -100 250 N
|
||||||
|
P 4 1 1 10 -100 550 -100 350 100 450 -100 550 N
|
||||||
|
X DI1 1 -450 450 100 R 50 50 1 1 I
|
||||||
|
X DO3+ 10 500 -100 100 L 50 50 1 1 O
|
||||||
|
X DO3- 11 500 -200 100 L 50 50 1 1 O
|
||||||
|
X EN34 12 -450 -300 100 R 50 50 1 1 I
|
||||||
|
X DO4- 13 500 -500 100 L 50 50 1 1 O
|
||||||
|
X DO4+ 14 500 -400 100 L 50 50 1 1 O
|
||||||
|
X DI4 15 -450 -450 100 R 50 50 1 1 I
|
||||||
|
X VCC 16 0 800 100 D 50 50 1 1 W
|
||||||
|
X DO1+ 2 500 500 100 L 50 50 1 1 O
|
||||||
|
X DO1- 3 500 400 100 L 50 50 1 1 O
|
||||||
|
X EN12 4 -450 300 100 R 50 50 1 1 I
|
||||||
|
X DO2- 5 500 100 100 L 50 50 1 1 O
|
||||||
|
X DO2+ 6 500 200 100 L 50 50 1 1 O
|
||||||
|
X DI2 7 -450 150 100 R 50 50 1 1 I
|
||||||
|
X GND 8 0 -800 100 U 50 50 1 1 W
|
||||||
|
X DI3 9 -450 -150 100 R 50 50 1 1 I
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Connector_Generic:Conn_01x04
|
||||||
|
#
|
||||||
|
DEF Connector_Generic:Conn_01x04 J 0 40 Y N 1 F N
|
||||||
|
F0 "J" 0 200 50 H V C CNN
|
||||||
|
F1 "Connector_Generic:Conn_01x04" 0 -300 50 H V C CNN
|
||||||
F2 "" 0 0 50 H I C CNN
|
F2 "" 0 0 50 H I C CNN
|
||||||
F3 "" 0 0 50 H I C CNN
|
F3 "" 0 0 50 H I C CNN
|
||||||
$FPLIST
|
$FPLIST
|
||||||
*OWN_DC-DC*
|
Connector*:*_1x??_*
|
||||||
$ENDFPLIST
|
$ENDFPLIST
|
||||||
DRAW
|
DRAW
|
||||||
T 0 -174 128 56 0 1 0 + Normal 0 C C
|
S -50 -195 0 -205 1 1 6 N
|
||||||
T 0 226 128 56 0 1 0 + Normal 0 C C
|
S -50 -95 0 -105 1 1 6 N
|
||||||
T 0 7 28 56 0 1 0 DCDC Normal 0 C C
|
S -50 5 0 -5 1 1 6 N
|
||||||
S -150 100 150 -50 1 1 0 N
|
S -50 105 0 95 1 1 6 N
|
||||||
P 2 1 0 0 -300 -200 300 -200 N
|
S -50 150 50 -250 1 1 10 f
|
||||||
P 2 1 0 0 -300 -100 -300 -200 N
|
X Pin_1 1 -200 100 150 R 50 50 1 1 P
|
||||||
P 2 1 0 0 -300 -100 0 -100 N
|
X Pin_2 2 -200 0 150 R 50 50 1 1 P
|
||||||
P 2 1 0 0 -300 200 -300 -100 N
|
X Pin_3 3 -200 -100 150 R 50 50 1 1 P
|
||||||
P 2 1 0 0 -30 -150 30 -150 N
|
X Pin_4 4 -200 -200 150 R 50 50 1 1 P
|
||||||
P 2 1 0 0 0 -100 0 -150 N
|
|
||||||
P 2 1 0 0 0 -100 300 -100 N
|
|
||||||
P 2 1 0 0 300 -200 300 -100 N
|
|
||||||
P 2 1 0 0 300 -100 300 200 N
|
|
||||||
P 2 1 0 0 300 200 -300 200 N
|
|
||||||
X IN+ IN+ -400 100 200 R 40 40 1 1 W
|
|
||||||
X IN- IN- -400 -100 200 R 40 40 1 1 W
|
|
||||||
X OUT+ OUT+ 400 100 200 L 40 40 1 1 w
|
|
||||||
X OUT- OUT- 400 -100 200 L 40 40 1 1 w
|
|
||||||
ENDDRAW
|
ENDDRAW
|
||||||
ENDDEF
|
ENDDEF
|
||||||
#
|
#
|
||||||
# CANNode-rescue_Teensy3.2-teensy
|
# Connector_Generic:Conn_01x10
|
||||||
#
|
#
|
||||||
DEF CANNode-rescue_Teensy3.2-teensy U 0 40 Y Y 1 F N
|
DEF Connector_Generic:Conn_01x10 J 0 40 Y N 1 F N
|
||||||
|
F0 "J" 0 500 50 H V C CNN
|
||||||
|
F1 "Connector_Generic:Conn_01x10" 0 -600 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
Connector*:*_1x??_*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -50 -495 0 -505 1 1 6 N
|
||||||
|
S -50 -395 0 -405 1 1 6 N
|
||||||
|
S -50 -295 0 -305 1 1 6 N
|
||||||
|
S -50 -195 0 -205 1 1 6 N
|
||||||
|
S -50 -95 0 -105 1 1 6 N
|
||||||
|
S -50 5 0 -5 1 1 6 N
|
||||||
|
S -50 105 0 95 1 1 6 N
|
||||||
|
S -50 205 0 195 1 1 6 N
|
||||||
|
S -50 305 0 295 1 1 6 N
|
||||||
|
S -50 405 0 395 1 1 6 N
|
||||||
|
S -50 450 50 -550 1 1 10 f
|
||||||
|
X Pin_1 1 -200 400 150 R 50 50 1 1 P
|
||||||
|
X Pin_10 10 -200 -500 150 R 50 50 1 1 P
|
||||||
|
X Pin_2 2 -200 300 150 R 50 50 1 1 P
|
||||||
|
X Pin_3 3 -200 200 150 R 50 50 1 1 P
|
||||||
|
X Pin_4 4 -200 100 150 R 50 50 1 1 P
|
||||||
|
X Pin_5 5 -200 0 150 R 50 50 1 1 P
|
||||||
|
X Pin_6 6 -200 -100 150 R 50 50 1 1 P
|
||||||
|
X Pin_7 7 -200 -200 150 R 50 50 1 1 P
|
||||||
|
X Pin_8 8 -200 -300 150 R 50 50 1 1 P
|
||||||
|
X Pin_9 9 -200 -400 150 R 50 50 1 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Connector_Generic:Conn_02x03_Odd_Even
|
||||||
|
#
|
||||||
|
DEF Connector_Generic:Conn_02x03_Odd_Even J 0 40 Y N 1 F N
|
||||||
|
F0 "J" 50 200 50 H V C CNN
|
||||||
|
F1 "Connector_Generic:Conn_02x03_Odd_Even" 50 -200 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
Connector*:*_2x??_*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -50 -95 0 -105 1 1 6 N
|
||||||
|
S -50 5 0 -5 1 1 6 N
|
||||||
|
S -50 105 0 95 1 1 6 N
|
||||||
|
S -50 150 150 -150 1 1 10 f
|
||||||
|
S 150 -95 100 -105 1 1 6 N
|
||||||
|
S 150 5 100 -5 1 1 6 N
|
||||||
|
S 150 105 100 95 1 1 6 N
|
||||||
|
X Pin_1 1 -200 100 150 R 50 50 1 1 P
|
||||||
|
X Pin_2 2 300 100 150 L 50 50 1 1 P
|
||||||
|
X Pin_3 3 -200 0 150 R 50 50 1 1 P
|
||||||
|
X Pin_4 4 300 0 150 L 50 50 1 1 P
|
||||||
|
X Pin_5 5 -200 -100 150 R 50 50 1 1 P
|
||||||
|
X Pin_6 6 300 -100 150 L 50 50 1 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Connector_Generic:Conn_02x04_Odd_Even
|
||||||
|
#
|
||||||
|
DEF Connector_Generic:Conn_02x04_Odd_Even J 0 40 Y N 1 F N
|
||||||
|
F0 "J" 50 200 50 H V C CNN
|
||||||
|
F1 "Connector_Generic:Conn_02x04_Odd_Even" 50 -300 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
Connector*:*_2x??_*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -50 -195 0 -205 1 1 6 N
|
||||||
|
S -50 -95 0 -105 1 1 6 N
|
||||||
|
S -50 5 0 -5 1 1 6 N
|
||||||
|
S -50 105 0 95 1 1 6 N
|
||||||
|
S -50 150 150 -250 1 1 10 f
|
||||||
|
S 150 -195 100 -205 1 1 6 N
|
||||||
|
S 150 -95 100 -105 1 1 6 N
|
||||||
|
S 150 5 100 -5 1 1 6 N
|
||||||
|
S 150 105 100 95 1 1 6 N
|
||||||
|
X Pin_1 1 -200 100 150 R 50 50 1 1 P
|
||||||
|
X Pin_2 2 300 100 150 L 50 50 1 1 P
|
||||||
|
X Pin_3 3 -200 0 150 R 50 50 1 1 P
|
||||||
|
X Pin_4 4 300 0 150 L 50 50 1 1 P
|
||||||
|
X Pin_5 5 -200 -100 150 R 50 50 1 1 P
|
||||||
|
X Pin_6 6 300 -100 150 L 50 50 1 1 P
|
||||||
|
X Pin_7 7 -200 -200 150 R 50 50 1 1 P
|
||||||
|
X Pin_8 8 300 -200 150 L 50 50 1 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Device:CP_Small
|
||||||
|
#
|
||||||
|
DEF Device:CP_Small C 0 10 N N 1 F N
|
||||||
|
F0 "C" 10 70 50 H V L CNN
|
||||||
|
F1 "Device:CP_Small" 10 -80 50 H V L CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
CP_*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -60 -12 60 -27 0 1 0 F
|
||||||
|
S -60 27 60 12 0 1 0 N
|
||||||
|
P 2 0 1 0 -50 60 -30 60 N
|
||||||
|
P 2 0 1 0 -40 50 -40 70 N
|
||||||
|
X ~ 1 0 100 73 D 50 50 1 1 P
|
||||||
|
X ~ 2 0 -100 73 U 50 50 1 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Device:C_Small
|
||||||
|
#
|
||||||
|
DEF Device:C_Small C 0 10 N N 1 F N
|
||||||
|
F0 "C" 10 70 50 H V L CNN
|
||||||
|
F1 "Device:C_Small" 10 -80 50 H V L CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
C_*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
P 2 0 1 13 -60 -20 60 -20 N
|
||||||
|
P 2 0 1 12 -60 20 60 20 N
|
||||||
|
X ~ 1 0 100 80 D 50 50 1 1 P
|
||||||
|
X ~ 2 0 -100 80 U 50 50 1 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Device:Jumper_NC_Small
|
||||||
|
#
|
||||||
|
DEF Device:Jumper_NC_Small JP 0 30 N N 1 F N
|
||||||
|
F0 "JP" 0 80 50 H V C CNN
|
||||||
|
F1 "Device:Jumper_NC_Small" 10 -60 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
DRAW
|
||||||
|
A 0 -10 57 450 1350 0 1 0 N 40 30 -40 30
|
||||||
|
C -40 0 20 0 1 0 N
|
||||||
|
C 40 0 20 0 1 0 N
|
||||||
|
X 1 1 -100 0 40 R 50 50 0 1 P
|
||||||
|
X 2 2 100 0 40 L 50 50 0 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Device:R_Small
|
||||||
|
#
|
||||||
|
DEF Device:R_Small R 0 10 N N 1 F N
|
||||||
|
F0 "R" 30 20 50 H V L CNN
|
||||||
|
F1 "Device:R_Small" 30 -40 50 H V L CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
R_*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -30 70 30 -70 0 1 8 N
|
||||||
|
X ~ 1 0 100 30 D 50 50 1 1 P
|
||||||
|
X ~ 2 0 -100 30 U 50 50 1 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Interface:PCA9306
|
||||||
|
#
|
||||||
|
DEF Interface:PCA9306 U 0 40 Y Y 1 F N
|
||||||
|
F0 "U" -300 450 50 H V L CNN
|
||||||
|
F1 "Interface:PCA9306" 200 450 50 H V L CNN
|
||||||
|
F2 "" -400 350 50 H I C CNN
|
||||||
|
F3 "" -300 450 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
SSOP*2.95x2.8mm*P0.65mm*
|
||||||
|
VSSOP*2.3x2mm*P0.5mm*
|
||||||
|
X2SON*1.4x1mm*P0.35mm*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -300 400 300 -400 0 1 10 f
|
||||||
|
X GND 1 0 -500 100 U 50 50 1 1 W
|
||||||
|
X VREF1 2 -100 500 100 D 50 50 1 1 W
|
||||||
|
X SCL1 3 -400 0 100 R 50 50 1 1 B
|
||||||
|
X SDA1 4 -400 -100 100 R 50 50 1 1 B
|
||||||
|
X SDA2 5 400 -100 100 L 50 50 1 1 B
|
||||||
|
X SCL2 6 400 0 100 L 50 50 1 1 B
|
||||||
|
X VREF2 7 100 500 100 D 50 50 1 1 W
|
||||||
|
X EN 8 400 100 100 L 50 50 1 1 I
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Interface_CAN_LIN:SN65HVD230
|
||||||
|
#
|
||||||
|
DEF Interface_CAN_LIN:SN65HVD230 U 0 40 Y Y 1 F N
|
||||||
|
F0 "U" -100 400 50 H V R CNN
|
||||||
|
F1 "Interface_CAN_LIN:SN65HVD230" -100 300 50 H V R CNN
|
||||||
|
F2 "Package_SO:SOIC-8_3.9x4.9mm_P1.27mm" 0 -500 50 H I C CNN
|
||||||
|
F3 "" -100 400 50 H I C CNN
|
||||||
|
ALIAS SN65HVD231
|
||||||
|
$FPLIST
|
||||||
|
SOIC*3.9x4.9mm*P1.27mm*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -300 200 300 -300 0 1 10 f
|
||||||
|
X D 1 -400 100 100 R 50 50 1 1 I
|
||||||
|
X GND 2 0 -400 100 U 50 50 1 1 W
|
||||||
|
X VCC 3 0 300 100 D 50 50 1 1 W
|
||||||
|
X R 4 -400 0 100 R 50 50 1 1 O
|
||||||
|
X Vref 5 -400 -100 100 R 50 50 1 1 O
|
||||||
|
X CANL 6 400 -100 100 L 50 50 1 1 B
|
||||||
|
X CANH 7 400 0 100 L 50 50 1 1 B
|
||||||
|
X Rs 8 -400 -200 100 R 50 50 1 1 I
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Interface_UART:MAX3485
|
||||||
|
#
|
||||||
|
DEF Interface_UART:MAX3485 U 0 20 Y Y 1 F N
|
||||||
|
F0 "U" -240 450 50 H V C CNN
|
||||||
|
F1 "Interface_UART:MAX3485" 30 450 50 H V L CNN
|
||||||
|
F2 "" 0 -700 50 H I C CNN
|
||||||
|
F3 "" 0 50 50 H I C CNN
|
||||||
|
ALIAS MAX483E MAX485E MAX487E MAX1487E MAX3485 MAX3483 MAX3486
|
||||||
|
$FPLIST
|
||||||
|
DIP*W7.62mm*
|
||||||
|
SOIC*3.9x4.9mm*P1.27mm*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
C -12 -145 14 0 1 10 F
|
||||||
|
C -1 59 14 0 1 10 F
|
||||||
|
C 65 75 14 0 1 10 F
|
||||||
|
S -300 400 300 -500 0 1 10 f
|
||||||
|
S 50 125 50 125 0 1 0 N
|
||||||
|
P 2 0 1 10 -160 -200 -75 -200 N
|
||||||
|
P 2 0 1 10 -160 100 -50 100 N
|
||||||
|
P 2 0 1 10 -50 -126 -50 -136 N
|
||||||
|
P 2 0 1 10 -25 -200 210 -200 N
|
||||||
|
P 3 0 1 10 -160 -100 -50 -100 -50 -125 N
|
||||||
|
P 3 0 1 10 0 50 0 0 -160 0 N
|
||||||
|
P 3 0 1 10 50 125 150 125 150 -200 N
|
||||||
|
P 3 0 1 10 100 75 100 -150 0 -150 N
|
||||||
|
P 4 0 1 10 -75 -125 -75 -225 25 -175 -75 -125 N
|
||||||
|
P 4 0 1 10 -50 100 50 150 50 50 -50 100 N
|
||||||
|
P 4 0 1 10 75 75 175 75 175 100 210 100 N
|
||||||
|
X RO 1 -400 100 100 R 50 50 1 1 O
|
||||||
|
X ~RE 2 -400 0 100 R 50 50 1 1 I
|
||||||
|
X DE 3 -400 -100 100 R 50 50 1 1 I
|
||||||
|
X DI 4 -400 -200 100 R 50 50 1 1 I
|
||||||
|
X GND 5 0 -600 100 U 50 50 1 1 W
|
||||||
|
X A 6 400 -200 100 L 50 50 1 1 B
|
||||||
|
X B 7 400 100 100 L 50 50 1 1 B
|
||||||
|
X VCC 8 0 500 100 D 50 50 1 1 W
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Jumper:Jumper_3_Bridged12
|
||||||
|
#
|
||||||
|
DEF Jumper:Jumper_3_Bridged12 JP 0 0 Y N 1 F N
|
||||||
|
F0 "JP" -100 -100 50 H V C CNN
|
||||||
|
F1 "Jumper:Jumper_3_Bridged12" 0 110 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
$FPLIST
|
||||||
|
Jumper*Bridged12*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
A -65 -50 89 1282 518 0 1 0 N -120 20 -10 20
|
||||||
|
C -130 0 20 0 0 0 N
|
||||||
|
C 0 0 20 0 0 0 N
|
||||||
|
C 130 0 20 0 0 0 N
|
||||||
|
P 2 0 1 0 0 -50 0 -20 N
|
||||||
|
X A 1 -250 0 100 R 50 50 1 1 P
|
||||||
|
X C 2 0 -150 100 U 50 50 1 1 I
|
||||||
|
X B 3 250 0 100 L 50 50 1 1 P
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# Regulator_Linear:LM1117-5.0
|
||||||
|
#
|
||||||
|
DEF Regulator_Linear:LM1117-5.0 U 0 10 Y Y 1 F N
|
||||||
|
F0 "U" -150 125 50 H V C CNN
|
||||||
|
F1 "Regulator_Linear:LM1117-5.0" 0 125 50 H V L CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
ALIAS LM1117-2.5 LM1117-3.3 LM1117-5.0 TLV1117-15 TLV1117-18 TLV1117-25 TLV1117-33 TLV1117-50
|
||||||
|
$FPLIST
|
||||||
|
SOT?223*
|
||||||
|
TO?263*
|
||||||
|
TO?252*
|
||||||
|
TO?220*
|
||||||
|
$ENDFPLIST
|
||||||
|
DRAW
|
||||||
|
S -200 -200 200 75 0 1 10 f
|
||||||
|
X GND 1 0 -300 100 U 50 50 1 1 W
|
||||||
|
X VO 2 300 0 100 L 50 50 1 1 w
|
||||||
|
X VI 3 -300 0 100 R 50 50 1 1 W
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# power:+12V
|
||||||
|
#
|
||||||
|
DEF power:+12V #PWR 0 0 Y Y 1 F P
|
||||||
|
F0 "#PWR" 0 -150 50 H I C CNN
|
||||||
|
F1 "power:+12V" 0 140 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
DRAW
|
||||||
|
P 2 0 1 0 -30 50 0 100 N
|
||||||
|
P 2 0 1 0 0 0 0 100 N
|
||||||
|
P 2 0 1 0 0 100 30 50 N
|
||||||
|
X +12V 1 0 0 0 U 50 50 1 1 W N
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# power:+3.3V
|
||||||
|
#
|
||||||
|
DEF power:+3.3V #PWR 0 0 Y Y 1 F P
|
||||||
|
F0 "#PWR" 0 -150 50 H I C CNN
|
||||||
|
F1 "power:+3.3V" 0 140 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
ALIAS +3.3V
|
||||||
|
DRAW
|
||||||
|
P 2 0 1 0 -30 50 0 100 N
|
||||||
|
P 2 0 1 0 0 0 0 100 N
|
||||||
|
P 2 0 1 0 0 100 30 50 N
|
||||||
|
X +3V3 1 0 0 0 U 50 50 1 1 W N
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# power:+5V
|
||||||
|
#
|
||||||
|
DEF power:+5V #PWR 0 0 Y Y 1 F P
|
||||||
|
F0 "#PWR" 0 -150 50 H I C CNN
|
||||||
|
F1 "power:+5V" 0 140 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
DRAW
|
||||||
|
P 2 0 1 0 -30 50 0 100 N
|
||||||
|
P 2 0 1 0 0 0 0 100 N
|
||||||
|
P 2 0 1 0 0 100 30 50 N
|
||||||
|
X +5V 1 0 0 0 U 50 50 1 1 W N
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# power:GND
|
||||||
|
#
|
||||||
|
DEF power:GND #PWR 0 0 Y Y 1 F P
|
||||||
|
F0 "#PWR" 0 -250 50 H I C CNN
|
||||||
|
F1 "power:GND" 0 -150 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
DRAW
|
||||||
|
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
|
||||||
|
X GND 1 0 0 0 D 50 50 1 1 W N
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# power:PWR_FLAG
|
||||||
|
#
|
||||||
|
DEF power:PWR_FLAG #FLG 0 0 N N 1 F P
|
||||||
|
F0 "#FLG" 0 75 50 H I C CNN
|
||||||
|
F1 "power:PWR_FLAG" 0 150 50 H V C CNN
|
||||||
|
F2 "" 0 0 50 H I C CNN
|
||||||
|
F3 "" 0 0 50 H I C CNN
|
||||||
|
DRAW
|
||||||
|
P 6 0 1 0 0 0 0 50 -40 75 0 100 40 75 0 50 N
|
||||||
|
X pwr 1 0 0 0 U 50 50 0 0 w
|
||||||
|
ENDDRAW
|
||||||
|
ENDDEF
|
||||||
|
#
|
||||||
|
# teensy:Teensy3.2
|
||||||
|
#
|
||||||
|
DEF teensy:Teensy3.2 U 0 40 Y Y 1 F N
|
||||||
F0 "U" -700 -850 60 H V C CNN
|
F0 "U" -700 -850 60 H V C CNN
|
||||||
F1 "CANNode-rescue_Teensy3.2-teensy" 550 -850 60 H V C CNN
|
F1 "teensy:Teensy3.2" 550 -850 60 H V C CNN
|
||||||
F2 "" -200 -800 60 H V C CNN
|
F2 "" -200 -800 60 H V C CNN
|
||||||
F3 "" -200 -800 60 H V C CNN
|
F3 "" -200 -800 60 H V C CNN
|
||||||
DRAW
|
DRAW
|
||||||
@ -89,398 +519,4 @@ X 7_RX3_DOUT 9 -950 -100 200 R 50 50 1 1 B
|
|||||||
ENDDRAW
|
ENDDRAW
|
||||||
ENDDEF
|
ENDDEF
|
||||||
#
|
#
|
||||||
# Connector_Generic_Conn_01x03
|
|
||||||
#
|
|
||||||
DEF Connector_Generic_Conn_01x03 J 0 40 Y N 1 F N
|
|
||||||
F0 "J" 0 200 50 H V C CNN
|
|
||||||
F1 "Connector_Generic_Conn_01x03" 0 -200 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
Connector*:*_1x??_*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -50 -95 0 -105 1 1 6 N
|
|
||||||
S -50 5 0 -5 1 1 6 N
|
|
||||||
S -50 105 0 95 1 1 6 N
|
|
||||||
S -50 150 50 -150 1 1 10 f
|
|
||||||
X Pin_1 1 -200 100 150 R 50 50 1 1 P
|
|
||||||
X Pin_2 2 -200 0 150 R 50 50 1 1 P
|
|
||||||
X Pin_3 3 -200 -100 150 R 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Connector_Generic_Conn_01x04
|
|
||||||
#
|
|
||||||
DEF Connector_Generic_Conn_01x04 J 0 40 Y N 1 F N
|
|
||||||
F0 "J" 0 200 50 H V C CNN
|
|
||||||
F1 "Connector_Generic_Conn_01x04" 0 -300 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
Connector*:*_1x??_*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -50 -195 0 -205 1 1 6 N
|
|
||||||
S -50 -95 0 -105 1 1 6 N
|
|
||||||
S -50 5 0 -5 1 1 6 N
|
|
||||||
S -50 105 0 95 1 1 6 N
|
|
||||||
S -50 150 50 -250 1 1 10 f
|
|
||||||
X Pin_1 1 -200 100 150 R 50 50 1 1 P
|
|
||||||
X Pin_2 2 -200 0 150 R 50 50 1 1 P
|
|
||||||
X Pin_3 3 -200 -100 150 R 50 50 1 1 P
|
|
||||||
X Pin_4 4 -200 -200 150 R 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Connector_Generic_Conn_01x10
|
|
||||||
#
|
|
||||||
DEF Connector_Generic_Conn_01x10 J 0 40 Y N 1 F N
|
|
||||||
F0 "J" 0 500 50 H V C CNN
|
|
||||||
F1 "Connector_Generic_Conn_01x10" 0 -600 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
Connector*:*_1x??_*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -50 -495 0 -505 1 1 6 N
|
|
||||||
S -50 -395 0 -405 1 1 6 N
|
|
||||||
S -50 -295 0 -305 1 1 6 N
|
|
||||||
S -50 -195 0 -205 1 1 6 N
|
|
||||||
S -50 -95 0 -105 1 1 6 N
|
|
||||||
S -50 5 0 -5 1 1 6 N
|
|
||||||
S -50 105 0 95 1 1 6 N
|
|
||||||
S -50 205 0 195 1 1 6 N
|
|
||||||
S -50 305 0 295 1 1 6 N
|
|
||||||
S -50 405 0 395 1 1 6 N
|
|
||||||
S -50 450 50 -550 1 1 10 f
|
|
||||||
X Pin_1 1 -200 400 150 R 50 50 1 1 P
|
|
||||||
X Pin_10 10 -200 -500 150 R 50 50 1 1 P
|
|
||||||
X Pin_2 2 -200 300 150 R 50 50 1 1 P
|
|
||||||
X Pin_3 3 -200 200 150 R 50 50 1 1 P
|
|
||||||
X Pin_4 4 -200 100 150 R 50 50 1 1 P
|
|
||||||
X Pin_5 5 -200 0 150 R 50 50 1 1 P
|
|
||||||
X Pin_6 6 -200 -100 150 R 50 50 1 1 P
|
|
||||||
X Pin_7 7 -200 -200 150 R 50 50 1 1 P
|
|
||||||
X Pin_8 8 -200 -300 150 R 50 50 1 1 P
|
|
||||||
X Pin_9 9 -200 -400 150 R 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Connector_Generic_Conn_02x03_Odd_Even
|
|
||||||
#
|
|
||||||
DEF Connector_Generic_Conn_02x03_Odd_Even J 0 40 Y N 1 F N
|
|
||||||
F0 "J" 50 200 50 H V C CNN
|
|
||||||
F1 "Connector_Generic_Conn_02x03_Odd_Even" 50 -200 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
Connector*:*_2x??_*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -50 -95 0 -105 1 1 6 N
|
|
||||||
S -50 5 0 -5 1 1 6 N
|
|
||||||
S -50 105 0 95 1 1 6 N
|
|
||||||
S -50 150 150 -150 1 1 10 f
|
|
||||||
S 150 -95 100 -105 1 1 6 N
|
|
||||||
S 150 5 100 -5 1 1 6 N
|
|
||||||
S 150 105 100 95 1 1 6 N
|
|
||||||
X Pin_1 1 -200 100 150 R 50 50 1 1 P
|
|
||||||
X Pin_2 2 300 100 150 L 50 50 1 1 P
|
|
||||||
X Pin_3 3 -200 0 150 R 50 50 1 1 P
|
|
||||||
X Pin_4 4 300 0 150 L 50 50 1 1 P
|
|
||||||
X Pin_5 5 -200 -100 150 R 50 50 1 1 P
|
|
||||||
X Pin_6 6 300 -100 150 L 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Connector_Generic_Conn_02x04_Odd_Even
|
|
||||||
#
|
|
||||||
DEF Connector_Generic_Conn_02x04_Odd_Even J 0 40 Y N 1 F N
|
|
||||||
F0 "J" 50 200 50 H V C CNN
|
|
||||||
F1 "Connector_Generic_Conn_02x04_Odd_Even" 50 -300 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
Connector*:*_2x??_*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -50 -195 0 -205 1 1 6 N
|
|
||||||
S -50 -95 0 -105 1 1 6 N
|
|
||||||
S -50 5 0 -5 1 1 6 N
|
|
||||||
S -50 105 0 95 1 1 6 N
|
|
||||||
S -50 150 150 -250 1 1 10 f
|
|
||||||
S 150 -195 100 -205 1 1 6 N
|
|
||||||
S 150 -95 100 -105 1 1 6 N
|
|
||||||
S 150 5 100 -5 1 1 6 N
|
|
||||||
S 150 105 100 95 1 1 6 N
|
|
||||||
X Pin_1 1 -200 100 150 R 50 50 1 1 P
|
|
||||||
X Pin_2 2 300 100 150 L 50 50 1 1 P
|
|
||||||
X Pin_3 3 -200 0 150 R 50 50 1 1 P
|
|
||||||
X Pin_4 4 300 0 150 L 50 50 1 1 P
|
|
||||||
X Pin_5 5 -200 -100 150 R 50 50 1 1 P
|
|
||||||
X Pin_6 6 300 -100 150 L 50 50 1 1 P
|
|
||||||
X Pin_7 7 -200 -200 150 R 50 50 1 1 P
|
|
||||||
X Pin_8 8 300 -200 150 L 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Device_C_Small
|
|
||||||
#
|
|
||||||
DEF Device_C_Small C 0 10 N N 1 F N
|
|
||||||
F0 "C" 10 70 50 H V L CNN
|
|
||||||
F1 "Device_C_Small" 10 -80 50 H V L CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
C_*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
P 2 0 1 13 -60 -20 60 -20 N
|
|
||||||
P 2 0 1 12 -60 20 60 20 N
|
|
||||||
X ~ 1 0 100 80 D 50 50 1 1 P
|
|
||||||
X ~ 2 0 -100 80 U 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Device_Jumper_NC_Small
|
|
||||||
#
|
|
||||||
DEF Device_Jumper_NC_Small JP 0 30 N N 1 F N
|
|
||||||
F0 "JP" 0 80 50 H V C CNN
|
|
||||||
F1 "Device_Jumper_NC_Small" 10 -60 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
SolderJumper*Bridged*
|
|
||||||
Jumper*
|
|
||||||
TestPoint*2Pads*
|
|
||||||
TestPoint*Bridge*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
A 0 -10 57 450 1350 0 1 0 N 40 30 -40 30
|
|
||||||
C -40 0 20 0 1 0 N
|
|
||||||
C 40 0 20 0 1 0 N
|
|
||||||
X 1 1 -100 0 40 R 50 50 0 1 P
|
|
||||||
X 2 2 100 0 40 L 50 50 0 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Device_R_Small
|
|
||||||
#
|
|
||||||
DEF Device_R_Small R 0 10 N N 1 F N
|
|
||||||
F0 "R" 30 20 50 H V L CNN
|
|
||||||
F1 "Device_R_Small" 30 -40 50 H V L CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
R_*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -30 70 30 -70 0 1 8 N
|
|
||||||
X ~ 1 0 100 30 D 50 50 1 1 P
|
|
||||||
X ~ 2 0 -100 30 U 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Interface_CAN_LIN_SN65HVD230
|
|
||||||
#
|
|
||||||
DEF Interface_CAN_LIN_SN65HVD230 U 0 40 Y Y 1 F N
|
|
||||||
F0 "U" -100 400 50 H V R CNN
|
|
||||||
F1 "Interface_CAN_LIN_SN65HVD230" -100 300 50 H V R CNN
|
|
||||||
F2 "Package_SO:SOIC-8_3.9x4.9mm_P1.27mm" 0 -500 50 H I C CNN
|
|
||||||
F3 "" -100 400 50 H I C CNN
|
|
||||||
ALIAS SN65HVD231
|
|
||||||
$FPLIST
|
|
||||||
SOIC*3.9x4.9mm*P1.27mm*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -300 200 300 -300 0 1 10 f
|
|
||||||
X D 1 -400 100 100 R 50 50 1 1 I
|
|
||||||
X GND 2 0 -400 100 U 50 50 1 1 W
|
|
||||||
X VCC 3 0 300 100 D 50 50 1 1 W
|
|
||||||
X R 4 -400 0 100 R 50 50 1 1 O
|
|
||||||
X Vref 5 -400 -100 100 R 50 50 1 1 O
|
|
||||||
X CANL 6 400 -100 100 L 50 50 1 1 B
|
|
||||||
X CANH 7 400 0 100 L 50 50 1 1 B
|
|
||||||
X Rs 8 -400 -200 100 R 50 50 1 1 I
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Interface_PCA9306
|
|
||||||
#
|
|
||||||
DEF Interface_PCA9306 U 0 40 Y Y 1 F N
|
|
||||||
F0 "U" -300 450 50 H V L CNN
|
|
||||||
F1 "Interface_PCA9306" 200 450 50 H V L CNN
|
|
||||||
F2 "" -400 350 50 H I C CNN
|
|
||||||
F3 "" -300 450 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
SSOP*2.95x2.8mm*P0.65mm*
|
|
||||||
VSSOP*2.3x2mm*P0.5mm*
|
|
||||||
X2SON*1.4x1mm*P0.35mm*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
S -300 400 300 -400 0 1 10 f
|
|
||||||
X GND 1 0 -500 100 U 50 50 1 1 W
|
|
||||||
X VREF1 2 -100 500 100 D 50 50 1 1 W
|
|
||||||
X SCL1 3 -400 0 100 R 50 50 1 1 B
|
|
||||||
X SDA1 4 -400 -100 100 R 50 50 1 1 B
|
|
||||||
X SDA2 5 400 -100 100 L 50 50 1 1 B
|
|
||||||
X SCL2 6 400 0 100 L 50 50 1 1 B
|
|
||||||
X VREF2 7 100 500 100 D 50 50 1 1 W
|
|
||||||
X EN 8 400 100 100 L 50 50 1 1 I
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Interface_UART_MAX3485
|
|
||||||
#
|
|
||||||
DEF Interface_UART_MAX3485 U 0 20 Y Y 1 F N
|
|
||||||
F0 "U" -240 450 50 H V C CNN
|
|
||||||
F1 "Interface_UART_MAX3485" 30 450 50 H V L CNN
|
|
||||||
F2 "" 0 -700 50 H I C CNN
|
|
||||||
F3 "" 0 50 50 H I C CNN
|
|
||||||
ALIAS MAX483E MAX485E MAX487E MAX1487E MAX3485 MAX3483 MAX3486
|
|
||||||
$FPLIST
|
|
||||||
DIP*W7.62mm*
|
|
||||||
SOIC*3.9x4.9mm*P1.27mm*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
C -12 -145 14 0 1 10 F
|
|
||||||
C -1 59 14 0 1 10 F
|
|
||||||
C 65 75 14 0 1 10 F
|
|
||||||
S -300 400 300 -500 0 1 10 f
|
|
||||||
S 50 125 50 125 0 1 0 N
|
|
||||||
P 2 0 1 10 -160 -200 -75 -200 N
|
|
||||||
P 2 0 1 10 -160 100 -50 100 N
|
|
||||||
P 2 0 1 10 -50 -126 -50 -136 N
|
|
||||||
P 2 0 1 10 -25 -200 210 -200 N
|
|
||||||
P 3 0 1 10 -160 -100 -50 -100 -50 -125 N
|
|
||||||
P 3 0 1 10 0 50 0 0 -160 0 N
|
|
||||||
P 3 0 1 10 50 125 150 125 150 -200 N
|
|
||||||
P 3 0 1 10 100 75 100 -150 0 -150 N
|
|
||||||
P 4 0 1 10 -75 -125 -75 -225 25 -175 -75 -125 N
|
|
||||||
P 4 0 1 10 -50 100 50 150 50 50 -50 100 N
|
|
||||||
P 4 0 1 10 75 75 175 75 175 100 210 100 N
|
|
||||||
X RO 1 -400 100 100 R 50 50 1 1 O
|
|
||||||
X ~RE 2 -400 0 100 R 50 50 1 1 I
|
|
||||||
X DE 3 -400 -100 100 R 50 50 1 1 I
|
|
||||||
X DI 4 -400 -200 100 R 50 50 1 1 I
|
|
||||||
X GND 5 0 -600 100 U 50 50 1 1 W
|
|
||||||
X A 6 400 -200 100 L 50 50 1 1 B
|
|
||||||
X B 7 400 100 100 L 50 50 1 1 B
|
|
||||||
X VCC 8 0 500 100 D 50 50 1 1 W
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Jumper_Jumper_3_Bridged12
|
|
||||||
#
|
|
||||||
DEF Jumper_Jumper_3_Bridged12 JP 0 0 Y N 1 F N
|
|
||||||
F0 "JP" -100 -100 50 H V C CNN
|
|
||||||
F1 "Jumper_Jumper_3_Bridged12" 0 110 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
Jumper*
|
|
||||||
TestPoint*3Pads*
|
|
||||||
TestPoint*Bridge*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
A -65 -50 89 1282 518 0 1 0 N -120 20 -10 20
|
|
||||||
C -130 0 20 0 0 0 N
|
|
||||||
C 0 0 20 0 0 0 N
|
|
||||||
C 130 0 20 0 0 0 N
|
|
||||||
P 2 0 1 0 0 -50 0 -20 N
|
|
||||||
X A 1 -250 0 100 R 50 50 1 1 P
|
|
||||||
X C 2 0 -150 100 U 50 50 1 1 I
|
|
||||||
X B 3 250 0 100 L 50 50 1 1 P
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# Mechanical_MountingHole
|
|
||||||
#
|
|
||||||
DEF Mechanical_MountingHole H 0 40 Y Y 1 F N
|
|
||||||
F0 "H" 0 200 50 H V C CNN
|
|
||||||
F1 "Mechanical_MountingHole" 0 125 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
$FPLIST
|
|
||||||
MountingHole*
|
|
||||||
$ENDFPLIST
|
|
||||||
DRAW
|
|
||||||
C 0 0 50 0 1 50 N
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# power_+12V
|
|
||||||
#
|
|
||||||
DEF power_+12V #PWR 0 0 Y Y 1 F P
|
|
||||||
F0 "#PWR" 0 -150 50 H I C CNN
|
|
||||||
F1 "power_+12V" 0 140 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
DRAW
|
|
||||||
P 2 0 1 0 -30 50 0 100 N
|
|
||||||
P 2 0 1 0 0 0 0 100 N
|
|
||||||
P 2 0 1 0 0 100 30 50 N
|
|
||||||
X +12V 1 0 0 0 U 50 50 1 1 W N
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# power_+3.3V
|
|
||||||
#
|
|
||||||
DEF power_+3.3V #PWR 0 0 Y Y 1 F P
|
|
||||||
F0 "#PWR" 0 -150 50 H I C CNN
|
|
||||||
F1 "power_+3.3V" 0 140 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
ALIAS +3.3V
|
|
||||||
DRAW
|
|
||||||
P 2 0 1 0 -30 50 0 100 N
|
|
||||||
P 2 0 1 0 0 0 0 100 N
|
|
||||||
P 2 0 1 0 0 100 30 50 N
|
|
||||||
X +3V3 1 0 0 0 U 50 50 1 1 W N
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# power_+5V
|
|
||||||
#
|
|
||||||
DEF power_+5V #PWR 0 0 Y Y 1 F P
|
|
||||||
F0 "#PWR" 0 -150 50 H I C CNN
|
|
||||||
F1 "power_+5V" 0 140 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
DRAW
|
|
||||||
P 2 0 1 0 -30 50 0 100 N
|
|
||||||
P 2 0 1 0 0 0 0 100 N
|
|
||||||
P 2 0 1 0 0 100 30 50 N
|
|
||||||
X +5V 1 0 0 0 U 50 50 1 1 W N
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# power_GND
|
|
||||||
#
|
|
||||||
DEF power_GND #PWR 0 0 Y Y 1 F P
|
|
||||||
F0 "#PWR" 0 -250 50 H I C CNN
|
|
||||||
F1 "power_GND" 0 -150 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
DRAW
|
|
||||||
P 6 0 1 0 0 0 0 -50 50 -50 0 -100 -50 -50 0 -50 N
|
|
||||||
X GND 1 0 0 0 D 50 50 1 1 W N
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
# power_PWR_FLAG
|
|
||||||
#
|
|
||||||
DEF power_PWR_FLAG #FLG 0 0 N N 1 F P
|
|
||||||
F0 "#FLG" 0 75 50 H I C CNN
|
|
||||||
F1 "power_PWR_FLAG" 0 150 50 H V C CNN
|
|
||||||
F2 "" 0 0 50 H I C CNN
|
|
||||||
F3 "" 0 0 50 H I C CNN
|
|
||||||
DRAW
|
|
||||||
P 6 0 1 0 0 0 0 50 -40 75 0 100 40 75 0 50 N
|
|
||||||
X pwr 1 0 0 0 U 50 50 0 0 w
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
#End Library
|
#End Library
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
update=Tue 30 Jun 2020 09:41:16 PM CEST
|
update=Tue Sep 3 03:50:31 2019
|
||||||
version=1
|
version=1
|
||||||
last_client=kicad
|
last_client=kicad
|
||||||
[general]
|
[general]
|
||||||
@ -49,7 +49,7 @@ TrackWidth8=0.8
|
|||||||
TrackWidth9=1.6
|
TrackWidth9=1.6
|
||||||
ViaDiameter1=0.6858
|
ViaDiameter1=0.6858
|
||||||
ViaDrill1=0.3302
|
ViaDrill1=0.3302
|
||||||
dPairWidth1=0.3
|
dPairWidth1=0.2
|
||||||
dPairGap1=0.175
|
dPairGap1=0.175
|
||||||
dPairViaGap1=0.25
|
dPairViaGap1=0.25
|
||||||
SilkLineWidth=0.15
|
SilkLineWidth=0.15
|
||||||
@ -75,7 +75,7 @@ OthersTextUpright=1
|
|||||||
SolderMaskClearance=0.2
|
SolderMaskClearance=0.2
|
||||||
SolderMaskMinWidth=0.25
|
SolderMaskMinWidth=0.25
|
||||||
SolderPasteClearance=0
|
SolderPasteClearance=0
|
||||||
SolderPasteRatio=-0
|
SolderPasteRatio=0
|
||||||
[pcbnew/Layer.F.Cu]
|
[pcbnew/Layer.F.Cu]
|
||||||
Name=F.Cu
|
Name=F.Cu
|
||||||
Type=0
|
Type=0
|
||||||
@ -251,7 +251,7 @@ ViaDiameter=0.6858
|
|||||||
ViaDrill=0.3302
|
ViaDrill=0.3302
|
||||||
uViaDiameter=0.3
|
uViaDiameter=0.3
|
||||||
uViaDrill=0.1
|
uViaDrill=0.1
|
||||||
dPairWidth=0.3
|
dPairWidth=0.2
|
||||||
dPairGap=0.175
|
dPairGap=0.175
|
||||||
dPairViaGap=0.25
|
dPairViaGap=0.25
|
||||||
[pcbnew/Netclasses/1]
|
[pcbnew/Netclasses/1]
|
||||||
@ -262,6 +262,6 @@ ViaDiameter=1.25
|
|||||||
ViaDrill=0.5
|
ViaDrill=0.5
|
||||||
uViaDiameter=0.65
|
uViaDiameter=0.65
|
||||||
uViaDrill=0.2
|
uViaDrill=0.2
|
||||||
dPairWidth=0.3
|
dPairWidth=0.2
|
||||||
dPairGap=0.25
|
dPairGap=0.25
|
||||||
dPairViaGap=0.25
|
dPairViaGap=0.25
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
update=Tue Oct 22 14:04:36 2019
|
|
||||||
version=1
|
|
||||||
last_client=eeschema
|
|
||||||
[general]
|
|
||||||
version=1
|
|
||||||
RootSch=
|
|
||||||
BoardNm=
|
|
||||||
[pcbnew]
|
|
||||||
version=1
|
|
||||||
LastNetListRead=
|
|
||||||
UseCmpFile=1
|
|
||||||
PadDrill=0.600000000000
|
|
||||||
PadDrillOvalY=0.600000000000
|
|
||||||
PadSizeH=1.500000000000
|
|
||||||
PadSizeV=1.500000000000
|
|
||||||
PcbTextSizeV=1.500000000000
|
|
||||||
PcbTextSizeH=1.500000000000
|
|
||||||
PcbTextThickness=0.300000000000
|
|
||||||
ModuleTextSizeV=1.000000000000
|
|
||||||
ModuleTextSizeH=1.000000000000
|
|
||||||
ModuleTextSizeThickness=0.150000000000
|
|
||||||
SolderMaskClearance=0.000000000000
|
|
||||||
SolderMaskMinWidth=0.000000000000
|
|
||||||
DrawSegmentWidth=0.200000000000
|
|
||||||
BoardOutlineThickness=0.100000000000
|
|
||||||
ModuleOutlineThickness=0.150000000000
|
|
||||||
[cvpcb]
|
|
||||||
version=1
|
|
||||||
NetIExt=net
|
|
||||||
[eeschema]
|
|
||||||
version=1
|
|
||||||
LibDir=
|
|
||||||
[eeschema/libraries]
|
|
||||||
[schematic_editor]
|
|
||||||
version=1
|
|
||||||
PageLayoutDescrFile=
|
|
||||||
PlotDirectoryName=
|
|
||||||
SubpartIdSeparator=0
|
|
||||||
SubpartFirstId=65
|
|
||||||
NetFmtName=
|
|
||||||
SpiceAjustPassiveValues=0
|
|
||||||
LabSize=50
|
|
||||||
ERC_TestSimilarLabels=1
|
|
@ -1,419 +0,0 @@
|
|||||||
EESchema Schematic File Version 4
|
|
||||||
LIBS:DiffWS2811-cache
|
|
||||||
EELAYER 26 0
|
|
||||||
EELAYER END
|
|
||||||
$Descr A4 11693 8268
|
|
||||||
encoding utf-8
|
|
||||||
Sheet 1 1
|
|
||||||
Title ""
|
|
||||||
Date ""
|
|
||||||
Rev ""
|
|
||||||
Comp ""
|
|
||||||
Comment1 ""
|
|
||||||
Comment2 ""
|
|
||||||
Comment3 ""
|
|
||||||
Comment4 ""
|
|
||||||
$EndDescr
|
|
||||||
$Comp
|
|
||||||
L 000_my_lib:DSN-MINI-360 MOD1
|
|
||||||
U 1 1 5C0664F1
|
|
||||||
P 2900 3550
|
|
||||||
F 0 "MOD1" H 2900 3500 50 0000 C CNN
|
|
||||||
F 1 "DSN-MINI-360" H 3125 3934 50 0001 C CNN
|
|
||||||
F 2 "000_my_footprints:DC-DC" H 3150 3700 50 0001 C CNN
|
|
||||||
F 3 "" H 3150 3700 50 0001 C CNN
|
|
||||||
1 2900 3550
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L Interface_UART:MAX485E U1
|
|
||||||
U 1 1 5C06691A
|
|
||||||
P 3850 2300
|
|
||||||
F 0 "U1" H 4100 1750 50 0000 C CNN
|
|
||||||
F 1 "MAX485E" H 3650 1750 50 0000 C CNN
|
|
||||||
F 2 "Package_SO:SOIC-8_3.9x4.9mm_P1.27mm" H 3850 1600 50 0001 C CNN
|
|
||||||
F 3 "https://datasheets.maximintegrated.com/en/ds/MAX1487E-MAX491E.pdf" H 3850 2350 50 0001 C CNN
|
|
||||||
1 3850 2300
|
|
||||||
-1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L Device:R_Small R1
|
|
||||||
U 1 1 5C066BB7
|
|
||||||
P 3150 2350
|
|
||||||
F 0 "R1" H 3209 2350 50 0000 L CNN
|
|
||||||
F 1 "R_Small" H 3209 2305 50 0001 L CNN
|
|
||||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 3150 2350 50 0001 C CNN
|
|
||||||
F 3 "~" H 3150 2350 50 0001 C CNN
|
|
||||||
1 3150 2350
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L Connector_Generic:Conn_01x04 J1
|
|
||||||
U 1 1 5C066D15
|
|
||||||
P 2750 2400
|
|
||||||
F 0 "J1" H 2670 1975 50 0000 C CNN
|
|
||||||
F 1 "Conn_01x04" H 3200 2100 50 0001 C CNN
|
|
||||||
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical" H 2750 2400 50 0001 C CNN
|
|
||||||
F 3 "~" H 2750 2400 50 0001 C CNN
|
|
||||||
1 2750 2400
|
|
||||||
-1 0 0 1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L Connector_Generic:Conn_01x03 J2
|
|
||||||
U 1 1 5C066E44
|
|
||||||
P 4850 2200
|
|
||||||
F 0 "J2" H 4930 2196 50 0000 L CNN
|
|
||||||
F 1 "Conn_01x03" H 4930 2151 50 0001 L CNN
|
|
||||||
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical" H 4850 2200 50 0001 C CNN
|
|
||||||
F 3 "~" H 4850 2200 50 0001 C CNN
|
|
||||||
1 4850 2200
|
|
||||||
1 0 0 1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L Device:C_Small C1
|
|
||||||
U 1 1 5C066F30
|
|
||||||
P 4150 3350
|
|
||||||
F 0 "C1" H 4242 3396 50 0000 L CNN
|
|
||||||
F 1 "C_Small" H 4242 3305 50 0001 L CNN
|
|
||||||
F 2 "Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 4150 3350 50 0001 C CNN
|
|
||||||
F 3 "~" H 4150 3350 50 0001 C CNN
|
|
||||||
1 4150 3350
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L Device:Jumper_NO_Small JP1
|
|
||||||
U 1 1 5C066FFC
|
|
||||||
P 3100 3200
|
|
||||||
F 0 "JP1" H 3100 3385 50 0000 C CNN
|
|
||||||
F 1 "Jumper" H 3100 3294 50 0000 C CNN
|
|
||||||
F 2 "Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm" H 3100 3200 50 0001 C CNN
|
|
||||||
F 3 "~" H 3100 3200 50 0001 C CNN
|
|
||||||
1 3100 3200
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:GND #PWR0101
|
|
||||||
U 1 1 5C0670C6
|
|
||||||
P 3000 2550
|
|
||||||
F 0 "#PWR0101" H 3000 2300 50 0001 C CNN
|
|
||||||
F 1 "GND" H 3005 2377 50 0001 C CNN
|
|
||||||
F 2 "" H 3000 2550 50 0001 C CNN
|
|
||||||
F 3 "" H 3000 2550 50 0001 C CNN
|
|
||||||
1 3000 2550
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:VCC #PWR0102
|
|
||||||
U 1 1 5C067142
|
|
||||||
P 3850 1750
|
|
||||||
F 0 "#PWR0102" H 3850 1600 50 0001 C CNN
|
|
||||||
F 1 "VCC" H 4000 1800 50 0000 C CNN
|
|
||||||
F 2 "" H 3850 1750 50 0001 C CNN
|
|
||||||
F 3 "" H 3850 1750 50 0001 C CNN
|
|
||||||
1 3850 1750
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:-VSW #PWR0103
|
|
||||||
U 1 1 5C06719C
|
|
||||||
P 3000 2150
|
|
||||||
F 0 "#PWR0103" H 3000 2250 50 0001 C CNN
|
|
||||||
F 1 "-VSW" H 3015 2323 50 0000 C CNN
|
|
||||||
F 2 "" H 3000 2150 50 0001 C CNN
|
|
||||||
F 3 "" H 3000 2150 50 0001 C CNN
|
|
||||||
1 3000 2150
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:GND #PWR0104
|
|
||||||
U 1 1 5C067280
|
|
||||||
P 3100 3700
|
|
||||||
F 0 "#PWR0104" H 3100 3450 50 0001 C CNN
|
|
||||||
F 1 "GND" H 3105 3527 50 0001 C CNN
|
|
||||||
F 2 "" H 3100 3700 50 0001 C CNN
|
|
||||||
F 3 "" H 3100 3700 50 0001 C CNN
|
|
||||||
1 3100 3700
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:-VSW #PWR0106
|
|
||||||
U 1 1 5C0672B2
|
|
||||||
P 2750 3150
|
|
||||||
F 0 "#PWR0106" H 2750 3250 50 0001 C CNN
|
|
||||||
F 1 "-VSW" H 2765 3323 50 0000 C CNN
|
|
||||||
F 2 "" H 2750 3150 50 0001 C CNN
|
|
||||||
F 3 "" H 2750 3150 50 0001 C CNN
|
|
||||||
1 2750 3150
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:VCC #PWR0107
|
|
||||||
U 1 1 5C0672DA
|
|
||||||
P 3450 3150
|
|
||||||
F 0 "#PWR0107" H 3450 3000 50 0001 C CNN
|
|
||||||
F 1 "VCC" H 3467 3323 50 0000 C CNN
|
|
||||||
F 2 "" H 3450 3150 50 0001 C CNN
|
|
||||||
F 3 "" H 3450 3150 50 0001 C CNN
|
|
||||||
1 3450 3150
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
3850 1750 3850 1800
|
|
||||||
Wire Wire Line
|
|
||||||
2750 3150 2750 3200
|
|
||||||
Wire Wire Line
|
|
||||||
2750 3200 2900 3200
|
|
||||||
Wire Wire Line
|
|
||||||
3200 3200 3300 3200
|
|
||||||
Wire Wire Line
|
|
||||||
3450 3200 3450 3150
|
|
||||||
Wire Wire Line
|
|
||||||
3450 3200 3450 3300
|
|
||||||
Connection ~ 3450 3200
|
|
||||||
Wire Wire Line
|
|
||||||
2800 3300 2750 3300
|
|
||||||
Connection ~ 2750 3200
|
|
||||||
Wire Wire Line
|
|
||||||
2950 2200 3000 2200
|
|
||||||
Wire Wire Line
|
|
||||||
3000 2200 3000 2150
|
|
||||||
Wire Wire Line
|
|
||||||
2950 2500 3000 2500
|
|
||||||
Wire Wire Line
|
|
||||||
3000 2500 3000 2550
|
|
||||||
Wire Wire Line
|
|
||||||
2950 2400 3050 2400
|
|
||||||
Wire Wire Line
|
|
||||||
3050 2400 3050 2500
|
|
||||||
Wire Wire Line
|
|
||||||
3050 2500 3150 2500
|
|
||||||
Wire Wire Line
|
|
||||||
3150 2500 3150 2450
|
|
||||||
Wire Wire Line
|
|
||||||
3150 2250 3150 2200
|
|
||||||
Wire Wire Line
|
|
||||||
3150 2200 3050 2200
|
|
||||||
Wire Wire Line
|
|
||||||
3050 2200 3050 2300
|
|
||||||
Wire Wire Line
|
|
||||||
3050 2300 2950 2300
|
|
||||||
Wire Wire Line
|
|
||||||
3450 2200 3150 2200
|
|
||||||
Connection ~ 3150 2200
|
|
||||||
Wire Wire Line
|
|
||||||
3450 2500 3150 2500
|
|
||||||
Connection ~ 3150 2500
|
|
||||||
$Comp
|
|
||||||
L power:VCC #PWR0108
|
|
||||||
U 1 1 5C069637
|
|
||||||
P 4150 3150
|
|
||||||
F 0 "#PWR0108" H 4150 3000 50 0001 C CNN
|
|
||||||
F 1 "VCC" H 4300 3200 50 0000 C CNN
|
|
||||||
F 2 "" H 4150 3150 50 0001 C CNN
|
|
||||||
F 3 "" H 4150 3150 50 0001 C CNN
|
|
||||||
1 4150 3150
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:GND #PWR0109
|
|
||||||
U 1 1 5C069650
|
|
||||||
P 4150 3550
|
|
||||||
F 0 "#PWR0109" H 4150 3300 50 0001 C CNN
|
|
||||||
F 1 "GND" H 4155 3377 50 0001 C CNN
|
|
||||||
F 2 "" H 4150 3550 50 0001 C CNN
|
|
||||||
F 3 "" H 4150 3550 50 0001 C CNN
|
|
||||||
1 4150 3550
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
4150 3150 4150 3200
|
|
||||||
Wire Wire Line
|
|
||||||
4150 3450 4150 3500
|
|
||||||
$Comp
|
|
||||||
L power:GND #PWR0110
|
|
||||||
U 1 1 5C06A0D9
|
|
||||||
P 3850 2950
|
|
||||||
F 0 "#PWR0110" H 3850 2700 50 0001 C CNN
|
|
||||||
F 1 "GND" H 3855 2777 50 0001 C CNN
|
|
||||||
F 2 "" H 3850 2950 50 0001 C CNN
|
|
||||||
F 3 "" H 3850 2950 50 0001 C CNN
|
|
||||||
1 3850 2950
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
3850 2900 3850 2950
|
|
||||||
$Comp
|
|
||||||
L power:GND #PWR0111
|
|
||||||
U 1 1 5C06A85A
|
|
||||||
P 4300 2550
|
|
||||||
F 0 "#PWR0111" H 4300 2300 50 0001 C CNN
|
|
||||||
F 1 "GND" H 4305 2377 50 0001 C CNN
|
|
||||||
F 2 "" H 4300 2550 50 0001 C CNN
|
|
||||||
F 3 "" H 4300 2550 50 0001 C CNN
|
|
||||||
1 4300 2550
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
4250 2400 4300 2400
|
|
||||||
Wire Wire Line
|
|
||||||
4300 2400 4300 2500
|
|
||||||
Wire Wire Line
|
|
||||||
4300 2500 4250 2500
|
|
||||||
Wire Wire Line
|
|
||||||
4300 2300 4300 2400
|
|
||||||
Wire Wire Line
|
|
||||||
4300 2300 4250 2300
|
|
||||||
Connection ~ 4300 2400
|
|
||||||
Wire Wire Line
|
|
||||||
4300 2500 4300 2550
|
|
||||||
Connection ~ 4300 2500
|
|
||||||
$Comp
|
|
||||||
L power:VCC #PWR0112
|
|
||||||
U 1 1 5C06BD25
|
|
||||||
P 4600 2050
|
|
||||||
F 0 "#PWR0112" H 4600 1900 50 0001 C CNN
|
|
||||||
F 1 "VCC" H 4750 2100 50 0000 C CNN
|
|
||||||
F 2 "" H 4600 2050 50 0001 C CNN
|
|
||||||
F 3 "" H 4600 2050 50 0001 C CNN
|
|
||||||
1 4600 2050
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:GND #PWR0113
|
|
||||||
U 1 1 5C06CC4B
|
|
||||||
P 4600 2350
|
|
||||||
F 0 "#PWR0113" H 4600 2100 50 0001 C CNN
|
|
||||||
F 1 "GND" H 4605 2177 50 0001 C CNN
|
|
||||||
F 2 "" H 4600 2350 50 0001 C CNN
|
|
||||||
F 3 "" H 4600 2350 50 0001 C CNN
|
|
||||||
1 4600 2350
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
4650 2200 4500 2200
|
|
||||||
Wire Wire Line
|
|
||||||
4650 2100 4600 2100
|
|
||||||
Wire Wire Line
|
|
||||||
4600 2100 4600 2050
|
|
||||||
Wire Wire Line
|
|
||||||
4650 2300 4600 2300
|
|
||||||
Wire Wire Line
|
|
||||||
4600 2300 4600 2350
|
|
||||||
$Comp
|
|
||||||
L Device:R_Small R2
|
|
||||||
U 1 1 5C06E1D6
|
|
||||||
P 4400 2200
|
|
||||||
F 0 "R2" V 4296 2200 50 0000 C CNN
|
|
||||||
F 1 "R_Small" V 4295 2200 50 0001 C CNN
|
|
||||||
F 2 "Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 4400 2200 50 0001 C CNN
|
|
||||||
F 3 "~" H 4400 2200 50 0001 C CNN
|
|
||||||
1 4400 2200
|
|
||||||
0 1 1 0
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
4250 2200 4300 2200
|
|
||||||
$Comp
|
|
||||||
L power:PWR_FLAG #FLG0101
|
|
||||||
U 1 1 5C07179E
|
|
||||||
P 2900 3150
|
|
||||||
F 0 "#FLG0101" H 2900 3225 50 0001 C CNN
|
|
||||||
F 1 "PWR_FLAG" H 2900 3324 50 0001 C CNN
|
|
||||||
F 2 "" H 2900 3150 50 0001 C CNN
|
|
||||||
F 3 "~" H 2900 3150 50 0001 C CNN
|
|
||||||
1 2900 3150
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
$Comp
|
|
||||||
L power:PWR_FLAG #FLG0102
|
|
||||||
U 1 1 5C071EE6
|
|
||||||
P 3300 3150
|
|
||||||
F 0 "#FLG0102" H 3300 3225 50 0001 C CNN
|
|
||||||
F 1 "PWR_FLAG" H 3300 3324 50 0001 C CNN
|
|
||||||
F 2 "" H 3300 3150 50 0001 C CNN
|
|
||||||
F 3 "~" H 3300 3150 50 0001 C CNN
|
|
||||||
1 3300 3150
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
3300 3150 3300 3200
|
|
||||||
Connection ~ 3300 3200
|
|
||||||
Wire Wire Line
|
|
||||||
3300 3200 3450 3200
|
|
||||||
Wire Wire Line
|
|
||||||
2900 3150 2900 3200
|
|
||||||
Connection ~ 2900 3200
|
|
||||||
Wire Wire Line
|
|
||||||
2900 3200 3000 3200
|
|
||||||
Wire Wire Line
|
|
||||||
2750 3200 2750 3300
|
|
||||||
$Comp
|
|
||||||
L power:PWR_FLAG #FLG0103
|
|
||||||
U 1 1 5C07505B
|
|
||||||
P 3350 3600
|
|
||||||
F 0 "#FLG0103" H 3350 3675 50 0001 C CNN
|
|
||||||
F 1 "PWR_FLAG" H 3350 3774 50 0001 C CNN
|
|
||||||
F 2 "" H 3350 3600 50 0001 C CNN
|
|
||||||
F 3 "~" H 3350 3600 50 0001 C CNN
|
|
||||||
1 3350 3600
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
3400 3300 3450 3300
|
|
||||||
Wire Wire Line
|
|
||||||
3100 3700 3100 3650
|
|
||||||
Wire Wire Line
|
|
||||||
3350 3600 3350 3700
|
|
||||||
Wire Wire Line
|
|
||||||
3350 3700 3100 3700
|
|
||||||
Connection ~ 3100 3700
|
|
||||||
$Comp
|
|
||||||
L Device:C_Small C2
|
|
||||||
U 1 1 5C07E1E5
|
|
||||||
P 4400 3350
|
|
||||||
F 0 "C2" H 4492 3396 50 0000 L CNN
|
|
||||||
F 1 "C_Small" H 4492 3305 50 0001 L CNN
|
|
||||||
F 2 "Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder" H 4400 3350 50 0001 C CNN
|
|
||||||
F 3 "~" H 4400 3350 50 0001 C CNN
|
|
||||||
1 4400 3350
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
4150 3200 4400 3200
|
|
||||||
Wire Wire Line
|
|
||||||
4400 3200 4400 3250
|
|
||||||
Connection ~ 4150 3200
|
|
||||||
Wire Wire Line
|
|
||||||
4150 3200 4150 3250
|
|
||||||
Wire Wire Line
|
|
||||||
4400 3450 4400 3500
|
|
||||||
Wire Wire Line
|
|
||||||
4400 3500 4150 3500
|
|
||||||
Connection ~ 4150 3500
|
|
||||||
Wire Wire Line
|
|
||||||
4150 3500 4150 3550
|
|
||||||
$Comp
|
|
||||||
L Device:CP_Small C3
|
|
||||||
U 1 1 5C07F5DF
|
|
||||||
P 4600 3350
|
|
||||||
F 0 "C3" H 4688 3396 50 0000 L CNN
|
|
||||||
F 1 "CP_Small" H 4688 3305 50 0000 L CNN
|
|
||||||
F 2 "Capacitor_SMD:CP_Elec_3x5.4" H 4600 3350 50 0001 C CNN
|
|
||||||
F 3 "~" H 4600 3350 50 0001 C CNN
|
|
||||||
1 4600 3350
|
|
||||||
1 0 0 -1
|
|
||||||
$EndComp
|
|
||||||
Wire Wire Line
|
|
||||||
4400 3200 4600 3200
|
|
||||||
Wire Wire Line
|
|
||||||
4600 3200 4600 3250
|
|
||||||
Connection ~ 4400 3200
|
|
||||||
Wire Wire Line
|
|
||||||
4600 3450 4600 3500
|
|
||||||
Wire Wire Line
|
|
||||||
4600 3500 4400 3500
|
|
||||||
Connection ~ 4400 3500
|
|
||||||
Text Label 3300 2200 0 50 ~ 0
|
|
||||||
D+
|
|
||||||
Text Label 3300 2500 0 50 ~ 0
|
|
||||||
D-
|
|
||||||
$EndSCHEMATC
|
|
@ -1,33 +0,0 @@
|
|||||||
update=22/05/2015 07:44:53
|
|
||||||
version=1
|
|
||||||
last_client=kicad
|
|
||||||
[general]
|
|
||||||
version=1
|
|
||||||
RootSch=
|
|
||||||
BoardNm=
|
|
||||||
[pcbnew]
|
|
||||||
version=1
|
|
||||||
LastNetListRead=
|
|
||||||
UseCmpFile=1
|
|
||||||
PadDrill=0.600000000000
|
|
||||||
PadDrillOvalY=0.600000000000
|
|
||||||
PadSizeH=1.500000000000
|
|
||||||
PadSizeV=1.500000000000
|
|
||||||
PcbTextSizeV=1.500000000000
|
|
||||||
PcbTextSizeH=1.500000000000
|
|
||||||
PcbTextThickness=0.300000000000
|
|
||||||
ModuleTextSizeV=1.000000000000
|
|
||||||
ModuleTextSizeH=1.000000000000
|
|
||||||
ModuleTextSizeThickness=0.150000000000
|
|
||||||
SolderMaskClearance=0.000000000000
|
|
||||||
SolderMaskMinWidth=0.000000000000
|
|
||||||
DrawSegmentWidth=0.200000000000
|
|
||||||
BoardOutlineThickness=0.100000000000
|
|
||||||
ModuleOutlineThickness=0.150000000000
|
|
||||||
[cvpcb]
|
|
||||||
version=1
|
|
||||||
NetIExt=net
|
|
||||||
[eeschema]
|
|
||||||
version=1
|
|
||||||
LibDir=
|
|
||||||
[eeschema/libraries]
|
|
Before Width: | Height: | Size: 380 KiB |
Before Width: | Height: | Size: 378 KiB |
Before Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 206 KiB |
Before Width: | Height: | Size: 696 KiB |
Before Width: | Height: | Size: 445 KiB |
Before Width: | Height: | Size: 157 KiB |
@ -1,23 +0,0 @@
|
|||||||
#
|
|
||||||
# Project Configuration File
|
|
||||||
#
|
|
||||||
# A detailed documentation with the EXAMPLES is located here:
|
|
||||||
# http://docs.platformio.org/en/latest/projectconf.html
|
|
||||||
#
|
|
||||||
|
|
||||||
# A sign `#` at the beginning of the line indicates a comment
|
|
||||||
# Comment lines are ignored.
|
|
||||||
|
|
||||||
# Simple and base environment
|
|
||||||
# [env:mybaseenv]
|
|
||||||
# platform = %INSTALLED_PLATFORM_NAME_HERE%
|
|
||||||
# framework =
|
|
||||||
# board =
|
|
||||||
#
|
|
||||||
# Automatic targets - enable auto-uploading
|
|
||||||
# targets = upload
|
|
||||||
|
|
||||||
[env:teensy31]
|
|
||||||
platform = teensy
|
|
||||||
framework = arduino
|
|
||||||
board = teensy31
|
|
@ -4,6 +4,7 @@
|
|||||||
// CANNode for Teensy 3.1/3.2
|
// CANNode for Teensy 3.1/3.2
|
||||||
// GPLv2
|
// GPLv2
|
||||||
// by wiebel (c) 2015-2018
|
// by wiebel (c) 2015-2018
|
||||||
|
// github_push_test_01
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <Metro.h>
|
#include <Metro.h>
|
||||||
@ -13,8 +14,8 @@
|
|||||||
|
|
||||||
// For Node definition:
|
// For Node definition:
|
||||||
|
|
||||||
//#include "Node_1_def.h" // Dachstuhl
|
#include "Node_1_def.h" // Dachstuhl
|
||||||
#include "Node_2_def.h" // Werkstatt
|
//#include "Node_2_def.h" // Werkstatt
|
||||||
//#include "Node_3_def.h" // Keller
|
//#include "Node_3_def.h" // Keller
|
||||||
|
|
||||||
// Metro ticks in ms
|
// Metro ticks in ms
|
||||||
@ -220,13 +221,11 @@ for (uint8_t i = 0; action_map[i].tag != 0 ; i++) {
|
|||||||
if ( old_state == new_state) {
|
if ( old_state == new_state) {
|
||||||
data[0]=action_map[i].outputs_idx;
|
data[0]=action_map[i].outputs_idx;
|
||||||
data[1]=new_state ^ outputs[action_map[i].outputs_idx].invert;
|
data[1]=new_state ^ outputs[action_map[i].outputs_idx].invert;
|
||||||
Serial.println(F("Sending nochange to CAN"));
|
|
||||||
CAN_send(NOTIFY, 0x0, STATE_OUT, data, 2);
|
CAN_send(NOTIFY, 0x0, STATE_OUT, data, 2);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
data[0]=action_map[i].outputs_idx;
|
data[0]=action_map[i].outputs_idx;
|
||||||
data[1]=new_state ^ outputs[action_map[i].outputs_idx].invert;
|
data[1]=new_state ^ outputs[action_map[i].outputs_idx].invert;
|
||||||
Serial.println(F("Sending change to CAN"));
|
|
||||||
CAN_send(NOTIFY, 0x0, NEWSTATE_OUT, data, 2);
|
CAN_send(NOTIFY, 0x0, NEWSTATE_OUT, data, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -306,6 +305,7 @@ void loop(void)
|
|||||||
Serial.println();
|
Serial.println();
|
||||||
CAN_send(NOTIFY, 0x0, NEW_TWID, addr, sizeof(addr));
|
CAN_send(NOTIFY, 0x0, NEW_TWID, addr, sizeof(addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (METRO_OW_read.check() ) {
|
if (METRO_OW_read.check() ) {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
static uint8_t node_id PROGMEM= { NODE_ID };
|
static uint8_t node_id PROGMEM= { NODE_ID };
|
||||||
static OW_switch_t switches[N_SWITCHES] PROGMEM={
|
static OW_switch_t switches[N_SWITCHES] PROGMEM={
|
||||||
// nick, addr[8], event_tag[sw1, sw2]
|
// nick, addr[8], event_tag[sw1, sw2]
|
||||||
// { 255, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } },
|
{ 255, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } },
|
||||||
{ 201, { 0x12, 0x5b, 0x27, 0x50, 0x0, 0x0, 0x0, 0x26 }, { 1, 11, 2, 12 } }, // Flur -> Bad
|
{ 201, { 0x12, 0x5b, 0x27, 0x50, 0x0, 0x0, 0x0, 0x26 }, { 1, 11, 2, 12 } }, // Flur -> Bad
|
||||||
{ 202, { 0x12, 0xF7, 0x95, 0x4F, 0x0, 0x0, 0x0, 0x69 }, { 9, 9, 7, 7 } }, // Treppe Unten
|
{ 202, { 0x12, 0xF7, 0x95, 0x4F, 0x0, 0x0, 0x0, 0x69 }, { 9, 9, 7, 7 } }, // Treppe Unten
|
||||||
// { 203, { 0x12, 0x68, 0x31, 0x67, 0x0, 0x0, 0x0, 0xBC }, { 5, 6 } },
|
// { 203, { 0x12, 0x68, 0x31, 0x67, 0x0, 0x0, 0x0, 0xBC }, { 5, 6 } },
|
||||||
@ -40,7 +40,7 @@ static OW_switch_t switches[N_SWITCHES] PROGMEM={
|
|||||||
{ 011, { 0x12, 0x9A, 0x94, 0x4F, 0x0, 0x0, 0x0, 0x2D }, { 6, 6, 255, 254 } }, // Bjarne
|
{ 011, { 0x12, 0x9A, 0x94, 0x4F, 0x0, 0x0, 0x0, 0x2D }, { 6, 6, 255, 254 } }, // Bjarne
|
||||||
{ 012, { 0x12, 0x2F, 0x98, 0x4F, 0x0, 0x0, 0x0, 0xE0 }, { 8, 8, 0, 0 } }, // SZ
|
{ 012, { 0x12, 0x2F, 0x98, 0x4F, 0x0, 0x0, 0x0, 0xE0 }, { 8, 8, 0, 0 } }, // SZ
|
||||||
{ 255, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } },
|
{ 255, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } },
|
||||||
{ 0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } } // END MARK
|
{ 0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } }
|
||||||
};
|
};
|
||||||
static uint8_t switches_state[N_SWITCHES];
|
static uint8_t switches_state[N_SWITCHES];
|
||||||
static outputs_t outputs[N_OUTPUTS] PROGMEM={
|
static outputs_t outputs[N_OUTPUTS] PROGMEM={
|
||||||
|
@ -29,22 +29,12 @@
|
|||||||
static uint8_t node_id PROGMEM= { NODE_ID };
|
static uint8_t node_id PROGMEM= { NODE_ID };
|
||||||
static OW_switch_t switches[N_SWITCHES] PROGMEM={
|
static OW_switch_t switches[N_SWITCHES] PROGMEM={
|
||||||
// nick, addr[8], event_tag[pioA_FALL, pioA_RISE, pioB_FALL, pioB_RISE]
|
// nick, addr[8], event_tag[pioA_FALL, pioA_RISE, pioB_FALL, pioB_RISE]
|
||||||
// { 255, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } },
|
{ 255, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } },
|
||||||
{ 11, { 0x12, 0xF2, 0x2A, 0x66, 0x0, 0x0, 0x0, 0x41 }, { 31, 31, 0, 0 } }, // EZ -> Flur
|
|
||||||
{ 12, { 0x12, 0x37, 0x8A, 0x4F, 0x0, 0x0, 0x0, 0xE5 }, { 32, 32, 32, 32 } }, // im keller TEST
|
|
||||||
{ 13, { 0x12, 0x71, 0x51, 0x57, 0x0, 0x0, 0x0, 0x28 }, { 32, 32, 0, 0 } }, // Küche Kühlschank
|
|
||||||
{ 14, { 0x12, 0x5e, 0xff, 0x55, 0x0, 0x0, 0x0, 0x2c }, { 32, 32, 33, 33 } }, // Küche Terasse
|
|
||||||
|
|
||||||
{ 21, { 0x12, 0x86, 0xB4, 0x54, 0x0, 0x0, 0x0, 0x5F }, { 23, 23, 37, 37 } }, // Flur
|
{ 21, { 0x12, 0x86, 0xB4, 0x54, 0x0, 0x0, 0x0, 0x5F }, { 23, 23, 37, 37 } }, // Flur
|
||||||
{ 22, { 0x12, 0xCE, 0x6E, 0xCA, 0x0, 0x0, 0x0, 0x9C }, { 22, 22, 21, 21 } }, // WZ
|
{ 22, { 0x12, 0xCE, 0x6E, 0xCA, 0x0, 0x0, 0x0, 0x9C }, { 22, 22, 21, 21 } }, // WZ
|
||||||
{ 23, { 0x12, 0x15, 0xD4, 0x86, 0x0, 0x0, 0x0, 0xA0 }, { 31, 31, 32, 32 } }, // EZ -> Küche
|
|
||||||
// { 22, { 0x12, 0xC7, 0x2F, 0xCF, 0x0, 0x0, 0x0, 0xAF }, { 22, 22, 21, 21 } }, // WZ
|
// { 22, { 0x12, 0xC7, 0x2F, 0xCF, 0x0, 0x0, 0x0, 0xAF }, { 22, 22, 21, 21 } }, // WZ
|
||||||
// { 22, { 0x12, 0x5E, 0xFF, 0x55, 0x0, 0x0, 0x0, 0x2C }, { 21, 21, 22, 22 } }, // WZ
|
// { 22, { 0x12, 0x5E, 0xFF, 0x55, 0x0, 0x0, 0x0, 0x2C }, { 21, 21, 22, 22 } }, // WZ
|
||||||
|
{ 0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } }
|
||||||
//{ 21, { 0x12, 0x86, 0xB4, 0x54, 0x0, 0x0, 0x0, 0x5F }, { 3, 3, 4, 4 } },
|
|
||||||
// { 31, { 0x12, 0x88, 0xDD, 0x53, 0x0, 0x0, 0x0, 0x28 }, { 210, 211, 220, 221 } }, // Rolladenschalter (A - UP, B - DOWN)
|
|
||||||
{ 31, { 0x12, 0x8F, 0xE2, 0x86 ,0x0, 0x0, 0x0, 0xC6}, { 220, 221, 210, 211 } }, // Rolladenschalter (A - UP, B - DOWN)
|
|
||||||
{ 0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } } // END MARK
|
|
||||||
};
|
};
|
||||||
static uint8_t switches_state[N_SWITCHES];
|
static uint8_t switches_state[N_SWITCHES];
|
||||||
static outputs_t outputs[N_OUTPUTS] PROGMEM={
|
static outputs_t outputs[N_OUTPUTS] PROGMEM={
|
||||||
@ -67,22 +57,15 @@ static uint8_t outputs_state[N_OUTPUTS];
|
|||||||
static event_t tx_events[N_EVENTS] PROGMEM={
|
static event_t tx_events[N_EVENTS] PROGMEM={
|
||||||
// | --- ID --- |
|
// | --- ID --- |
|
||||||
// tag, prio, dst, cmd, data
|
// tag, prio, dst, cmd, data
|
||||||
{ 13, 0x03, 0x01, TOGGLE, 0x03},
|
|
||||||
{ 14, 0x03, 0x01, TOGGLE, 0x04},
|
|
||||||
{ 15, 0x03, 0x01, TOGGLE, 0x05},
|
|
||||||
{ 16, 0x03, 0x01, TOGGLE, 0x06},
|
|
||||||
{ 18, 0x03, 0x01, TOGGLE, 0x08},
|
|
||||||
{ 21, 0x03, 0x02, TOGGLE, 0x01},
|
{ 21, 0x03, 0x02, TOGGLE, 0x01},
|
||||||
{ 22, 0x03, 0x02, TOGGLE, 0x02},
|
{ 22, 0x03, 0x02, TOGGLE, 0x02},
|
||||||
{ 23, 0x03, 0x02, TOGGLE, 0x03},
|
{ 23, 0x03, 0x02, TOGGLE, 0x03},
|
||||||
{ 31, 0x03, 0x03, TOGGLE, 0x01},
|
{ 13, 0x03, 0x01, TOGGLE, 0x03},
|
||||||
{ 32, 0x03, 0x03, TOGGLE, 0x02},
|
{ 14, 0x03, 0x01, TOGGLE, 0x04},
|
||||||
{ 33, 0x03, 0x03, TOGGLE, 0x03},
|
{ 5, 0x03, 0x01, TOGGLE, 0x05},
|
||||||
{ 34, 0x03, 0x03, TOGGLE, 0x04},
|
{ 6, 0x03, 0x01, TOGGLE, 0x06},
|
||||||
{ 35, 0x03, 0x03, TOGGLE, 0x05},
|
|
||||||
{ 36, 0x03, 0x03, TOGGLE, 0x06},
|
|
||||||
{ 37, 0x03, 0x03, TOGGLE, 0x07},
|
{ 37, 0x03, 0x03, TOGGLE, 0x07},
|
||||||
{ 38, 0x03, 0x03, TOGGLE, 0x08},
|
{ 8, 0x03, 0x01, TOGGLE, 0x08},
|
||||||
{ 11, 0x03, 0x01, ON, 0x01},
|
{ 11, 0x03, 0x01, ON, 0x01},
|
||||||
{ 12, 0x03, 0x01, ON, 0x02},
|
{ 12, 0x03, 0x01, ON, 0x02},
|
||||||
{ 210, 0x03, 0xff, OFF, 0x06},
|
{ 210, 0x03, 0xff, OFF, 0x06},
|
||||||
|
@ -13,14 +13,14 @@
|
|||||||
#define DEBUG 0 // 1 for noisy serial
|
#define DEBUG 0 // 1 for noisy serial
|
||||||
#define LED 13
|
#define LED 13
|
||||||
|
|
||||||
#define RELAY1 0 // EZ
|
#define RELAY1 0
|
||||||
#define RELAY2 1 // Küche
|
#define RELAY2 1
|
||||||
#define RELAY3 23 // Terrasse
|
#define RELAY3 23
|
||||||
#define RELAY4 22 // RO_Garten
|
#define RELAY4 22
|
||||||
#define RELAY5 17 // RO_Garten
|
#define RELAY5 17
|
||||||
#define RELAY6 16 //
|
#define RELAY6 16
|
||||||
#define RELAY7 19 // EG Flur
|
#define RELAY7 19
|
||||||
#define RELAY8 18 //
|
#define RELAY8 18
|
||||||
|
|
||||||
// OneWire
|
// OneWire
|
||||||
#define OW_pin 14
|
#define OW_pin 14
|
||||||
@ -32,24 +32,23 @@ static OW_switch_t switches[N_SWITCHES] PROGMEM={
|
|||||||
{ 11, { 0x12, 0xF2, 0x2A, 0x66, 0x0, 0x0, 0x0, 0x41 }, { 1, 1, 0, 0 } }, // EZ -> Flur
|
{ 11, { 0x12, 0xF2, 0x2A, 0x66, 0x0, 0x0, 0x0, 0x41 }, { 1, 1, 0, 0 } }, // EZ -> Flur
|
||||||
{ 12, { 0x12, 0x37, 0x8A, 0x4F, 0x0, 0x0, 0x0, 0xE5 }, { 2, 2, 2, 2 } }, // im keller TEST
|
{ 12, { 0x12, 0x37, 0x8A, 0x4F, 0x0, 0x0, 0x0, 0xE5 }, { 2, 2, 2, 2 } }, // im keller TEST
|
||||||
{ 13, { 0x12, 0x71, 0x51, 0x57, 0x0, 0x0, 0x0, 0x28 }, { 2, 2, 0, 0 } }, // Küche Kühlschank
|
{ 13, { 0x12, 0x71, 0x51, 0x57, 0x0, 0x0, 0x0, 0x28 }, { 2, 2, 0, 0 } }, // Küche Kühlschank
|
||||||
{ 14, { 0x12, 0x5e, 0xff, 0x55, 0x0, 0x0, 0x0, 0x2c }, { 2, 2, 3, 3 } }, // Küche Terasse
|
|
||||||
//{ 21, { 0x12, 0x86, 0xB4, 0x54, 0x0, 0x0, 0x0, 0x5F }, { 3, 3, 4, 4 } },
|
//{ 21, { 0x12, 0x86, 0xB4, 0x54, 0x0, 0x0, 0x0, 0x5F }, { 3, 3, 4, 4 } },
|
||||||
{ 22, { 0x12, 0x84, 0xAD, 0x4F, 0x0, 0x0, 0x0, 0x12 }, { 1, 1, 2, 2 } }, // EZ -> Küche
|
{ 22, { 0x12, 0x84, 0xAD, 0x4F, 0x0, 0x0, 0x0, 0x12 }, { 1, 1, 2, 2 } }, // EZ -> Küche
|
||||||
// { 31, { 0x12, 0x88, 0xDD, 0x53, 0x0, 0x0, 0x0, 0x28 }, { 210, 211, 220, 221 } }, // Rolladenschalter (A - UP, B - DOWN)
|
// { 31, { 0x12, 0x88, 0xDD, 0x53, 0x0, 0x0, 0x0, 0x28 }, { 210, 211, 220, 221 } }, // Roldenschalter (A - UP, B - DOWN)
|
||||||
{ 31, { 0x12, 0x8F, 0xE2, 0x86 ,0x0, 0x0, 0x0, 0xC6}, { 220, 221, 210, 211 } }, // Rolladenschalter (A - UP, B - DOWN)
|
{ 31, { 0x12, 0x8F, 0xE2, 0x86 ,0x0, 0x0, 0x0, 0xC6}, { 220, 221, 210, 211 } } // Roldenschalter (A - UP, B - DOWN)
|
||||||
{ 0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0, 0, 0 } } // END MARK
|
|
||||||
};
|
};
|
||||||
static uint8_t switches_state[N_SWITCHES];
|
static uint8_t switches_state[N_SWITCHES];
|
||||||
static outputs_t outputs[N_OUTPUTS] PROGMEM={
|
static outputs_t outputs[N_OUTPUTS] PROGMEM={
|
||||||
// type, address(PIN), initial value, inverted
|
// type, address(PIN), initial value, inverted
|
||||||
{ GPIO, RELAY1, 0, true },
|
{ GPIO, 0, 0, true }, // 0
|
||||||
{ GPIO, RELAY2, 0, true },
|
{ GPIO, 1, 0, true }, // 1
|
||||||
{ GPIO, RELAY3, 0, true },
|
{ GPIO, 23, 0, true }, // 2
|
||||||
{ GPIO, RELAY4, 0, true },
|
{ GPIO, 22, 0, true }, // 3
|
||||||
{ GPIO, RELAY5, 0, true },
|
{ GPIO, 17, 0, true }, // 4
|
||||||
{ GPIO, RELAY6, 0, true },
|
{ GPIO, 16, 0, true }, // 5
|
||||||
{ GPIO, RELAY7, 0, true },
|
{ GPIO, 19, 0, true }, // 6
|
||||||
{ GPIO, RELAY8, 0, true },
|
{ GPIO, 18, 0, true }, // 7
|
||||||
{ NOP, 0xFF, 0, 0 }
|
{ NOP, 0xFF, 0, 0 }
|
||||||
};
|
};
|
||||||
static uint8_t outputs_state[N_OUTPUTS];
|
static uint8_t outputs_state[N_OUTPUTS];
|
||||||
@ -93,13 +92,13 @@ static event_t tx_events[N_EVENTS] PROGMEM={
|
|||||||
|
|
||||||
static action_t action_map[N_ACTIONS] PROGMEM={
|
static action_t action_map[N_ACTIONS] PROGMEM={
|
||||||
// tag, output_idx
|
// tag, output_idx
|
||||||
{1, 0}, // EZ
|
{1, 0},
|
||||||
{2, 1}, // Küche
|
{2, 1},
|
||||||
{3, 2}, // Terrasse
|
{3, 2},
|
||||||
{4, 3}, // RO_Garten
|
{4, 3},
|
||||||
{5, 4}, // RO_Garten
|
{5, 4},
|
||||||
{6, 5},
|
{6, 5},
|
||||||
{7, 6}, // EG_Flur
|
{7, 6},
|
||||||
{8, 7},
|
{8, 7},
|
||||||
{9, 0},{9, 1},{9, 2},{9, 3},{9, 4},{9, 5},{9, 6},{9, 7},
|
{9, 0},{9, 1},{9, 2},{9, 3},{9, 4},{9, 5},{9, 6},{9, 7},
|
||||||
{210, 210},
|
{210, 210},
|
||||||
|
@ -1,109 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from __future__ import absolute_import, print_function
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import argparse
|
|
||||||
import socket
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
import can
|
|
||||||
from can import Bus, BusState, Logger
|
|
||||||
|
|
||||||
import paho.mqtt.client as mqtt
|
|
||||||
|
|
||||||
sub_topic = "coil"
|
|
||||||
coil_map = {
|
|
||||||
'EZ': [ 0x03, 0x01 ],
|
|
||||||
'K': [ 0x03, 0x02 ],
|
|
||||||
'WZ1': [ 0x02, 0x01 ],
|
|
||||||
'WZ2': [ 0x02, 0x02 ],
|
|
||||||
'TER': [ 0x03, 0x03 ],
|
|
||||||
'FE': [ 0x03, 0x07 ],
|
|
||||||
'TRE': [ 0x02, 0x03 ],
|
|
||||||
'FO': [ 0x01, 0x03 ],
|
|
||||||
'TRO': [ 0x01, 0x07 ],
|
|
||||||
'KI1': [ 0x01, 0x06 ],
|
|
||||||
'KI2': [ 0x01, 0x04 ],
|
|
||||||
'SCH': [ 0x01, 0x08 ],
|
|
||||||
'B1': [ 0x01, 0x01 ],
|
|
||||||
'B2': [ 0x01, 0x02 ],
|
|
||||||
'ROL_EZ_G_DOWN': [0x03, 0x05],
|
|
||||||
'ROL_EZ_G_UP': [0x03,0x04],
|
|
||||||
'ROL_EZ_N_DOWN': [0x03, 0x06],
|
|
||||||
'ROL_EZ_N_UP': [0x03,0x08],
|
|
||||||
'EG1': [ 0x02, 0x09 ],
|
|
||||||
'EG2': [ 0x03, 0x09 ],
|
|
||||||
'OG': [ 0x01, 0x09 ],
|
|
||||||
'ALL': [ 0xFF, 0x09 ],
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd_map = {
|
|
||||||
'off': 0,
|
|
||||||
'0': 0,
|
|
||||||
'on': 1,
|
|
||||||
'1': 1,
|
|
||||||
'value': 2,
|
|
||||||
'toggle': 3
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def decon(msg_id):
|
|
||||||
msg_prio=msg_id>>26
|
|
||||||
msg_type=(msg_id>>24) & 0x03
|
|
||||||
msg_dst=(msg_id>>16) & 0xFF
|
|
||||||
msg_src=(msg_id>>8) & 0xFF
|
|
||||||
msg_cmd=msg_id & 0xFF
|
|
||||||
# print("msg_id: ", hex(msg_id), "prio: ", hex(msg_prio),"type: ", hex(msg_type)," dst: ", hex(msg_dst)," src: ", hex(msg_src)," cmd: ",hex(msg_cmd))
|
|
||||||
return [msg_prio, msg_type, msg_dst, msg_src, msg_cmd]
|
|
||||||
|
|
||||||
def con(msg_dst,msg_cmd,msg_prio=3,msg_type=0,msg_src=11, ):
|
|
||||||
msg_id=(msg_prio<<26) + \
|
|
||||||
((msg_type&0x03)<<24) +\
|
|
||||||
((msg_dst&0xFF)<<16) +\
|
|
||||||
((msg_src&0xFF)<<8) +\
|
|
||||||
(msg_cmd&0xFF)
|
|
||||||
print("Constructed ID: "+hex(msg_id))
|
|
||||||
return msg_id
|
|
||||||
|
|
||||||
def on_connect(mcp_mqtt, userdata, flags, rc):
|
|
||||||
print("Connected with result code "+str(rc))
|
|
||||||
mcp_mqtt.subscribe(sub_topic+"/+")
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
can_filters = []
|
|
||||||
config = {"can_filters": can_filters, "single_handle": True}
|
|
||||||
config["interface"] = "socketcan_native"
|
|
||||||
config["bitrate"] = 125000
|
|
||||||
canbus = can.Bus("can1", **config)
|
|
||||||
# canBuffer= canbus.BufferedReader()
|
|
||||||
print('Connected to {}: {}'.format(canbus.__class__.__name__, canbus.channel_info))
|
|
||||||
print('Can Logger (Started on {})\n'.format(datetime.now()))
|
|
||||||
|
|
||||||
mcp_mqtt = mqtt.Client()
|
|
||||||
mcp_mqtt.on_connect = on_connect
|
|
||||||
mcp_mqtt.user_data_set(canbus)
|
|
||||||
mcp_mqtt.connect("mcp", 1883, 60)
|
|
||||||
|
|
||||||
mcp_mqtt.publish("coil/welcome", "1" , retain=0)
|
|
||||||
try:
|
|
||||||
while True:
|
|
||||||
msg = canbus.recv(1)
|
|
||||||
# msg = canBuffer.get_message()
|
|
||||||
if msg is not None:
|
|
||||||
de=decon(msg.arbitration_id)
|
|
||||||
m= { "prio": hex(de[0]), "type": hex(de[1]), "dst": hex(de[2]), "src": hex(de[3]), "cmd": hex(de[4]), "action": hex(msg.data[0]) }
|
|
||||||
if de[2]==0 and de[4] == 6:
|
|
||||||
print("received state: ", hex(de[3]), hex(msg.data[0]), hex(msg.data[1]))
|
|
||||||
for key, address in coil_map.items():
|
|
||||||
if address[0] == de[3] and address[1] == msg.data[0]+1:
|
|
||||||
print("coil/"+key+" changed to "+str(msg.data[1]))
|
|
||||||
mcp_mqtt.publish("coil/"+key+"/state", msg.data[1] , retain=1)
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
pass
|
|
||||||
finally:
|
|
||||||
canbus.shutdown()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
@ -1,163 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from __future__ import absolute_import, print_function
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import argparse
|
|
||||||
import socket
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
import can
|
|
||||||
from can import Bus, BusState, Logger
|
|
||||||
|
|
||||||
import paho.mqtt.client as mqtt
|
|
||||||
|
|
||||||
sub_topic = "coil"
|
|
||||||
coil_map = {
|
|
||||||
'EZ': [ 0x03, 0x01 ],
|
|
||||||
'K': [ 0x03, 0x02 ],
|
|
||||||
'WZ1': [ 0x02, 0x01 ],
|
|
||||||
'WZ2': [ 0x02, 0x02 ],
|
|
||||||
'TER': [ 0x03, 0x03 ],
|
|
||||||
'FE': [ 0x03, 0x07 ],
|
|
||||||
'TRE': [ 0x02, 0x03 ],
|
|
||||||
'FO': [ 0x01, 0x03 ],
|
|
||||||
'TRO': [ 0x01, 0x07 ],
|
|
||||||
'KI1': [ 0x01, 0x06 ],
|
|
||||||
'KI2': [ 0x01, 0x04 ],
|
|
||||||
'SCH': [ 0x01, 0x08 ],
|
|
||||||
'B1': [ 0x01, 0x01 ],
|
|
||||||
'B2': [ 0x01, 0x02 ],
|
|
||||||
'ROL_EZ_G_DOWN': [0x03, 0x05, -1],
|
|
||||||
'ROL_EZ_G_UP': [0x03,0x04, -1],
|
|
||||||
'ROL_EZ_N_DOWN': [0x03, 0x06, -2],
|
|
||||||
'ROL_EZ_N_UP': [0x03,0x08, -2],
|
|
||||||
'EG1': [ 0x02, 0x09 ],
|
|
||||||
'EG2': [ 0x03, 0x09 ],
|
|
||||||
'OG': [ 0x01, 0x09 ],
|
|
||||||
'ALL': [ 0xFF, 0x09 ],
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd_map = {
|
|
||||||
'off': 0,
|
|
||||||
'0': 0,
|
|
||||||
'on': 1,
|
|
||||||
'1': 1,
|
|
||||||
'value': 2,
|
|
||||||
'toggle': 3
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def decon(msg_id):
|
|
||||||
msg_prio=msg_id>>26
|
|
||||||
msg_type=(msg_id>>24) & 0x03
|
|
||||||
msg_dst=(msg_id>>16) & 0xFF
|
|
||||||
msg_src=(msg_id>>8) & 0xFF
|
|
||||||
msg_cmd=msg_id & 0xFF
|
|
||||||
# print("msg_id: ", hex(msg_id), "prio: ", hex(msg_prio),"type: ", hex(msg_type)," dst: ", hex(msg_dst)," src: ", hex(msg_src)," cmd: ",hex(msg_cmd))
|
|
||||||
return [msg_prio, msg_type, msg_dst, msg_src, msg_cmd]
|
|
||||||
|
|
||||||
def con(msg_dst,msg_cmd,msg_prio=3,msg_type=0,msg_src=11, ):
|
|
||||||
msg_id=(msg_prio<<26) + \
|
|
||||||
((msg_type&0x03)<<24) +\
|
|
||||||
((msg_dst&0xFF)<<16) +\
|
|
||||||
((msg_src&0xFF)<<8) +\
|
|
||||||
(msg_cmd&0xFF)
|
|
||||||
print("Constructed ID: "+hex(msg_id))
|
|
||||||
return msg_id
|
|
||||||
|
|
||||||
def on_connect(mcp_mqtt, userdata, flags, rc):
|
|
||||||
print("Connected with result code "+str(rc))
|
|
||||||
|
|
||||||
# Subscribing in on_connect() means that if we lose the connection and
|
|
||||||
# reconnect then subscriptions will be renewed.
|
|
||||||
mcp_mqtt.subscribe(sub_topic+"/+")
|
|
||||||
print("Subscribed to:"+sub_topic+"/+")
|
|
||||||
|
|
||||||
def on_message(mcp_mqtt, userdata, msg):
|
|
||||||
local_bus=userdata
|
|
||||||
print("data Received topic: ", msg.topic)
|
|
||||||
m_decode=str(msg.payload.decode("utf-8","ignore"))
|
|
||||||
print("data Received",m_decode)
|
|
||||||
msg_cmd=cmd_map[m_decode]
|
|
||||||
sub=msg.topic[len(sub_topic)+1:]
|
|
||||||
coil=sub
|
|
||||||
print("substring: "+coil)
|
|
||||||
addr = coil_map[coil]
|
|
||||||
print("Addr:", addr)
|
|
||||||
if msg_cmd == 2:
|
|
||||||
msg_data.append(value)
|
|
||||||
print("msg_cmd",msg_cmd, len(addr))
|
|
||||||
if msg_cmd is not 0 and len(addr) is 3:
|
|
||||||
print("hello 001")
|
|
||||||
for key, value in coil_map.items():
|
|
||||||
print("checking: ", key)
|
|
||||||
if len(value) is 3:
|
|
||||||
print("value_2 is", value[2], "Addr: ", addr[2])
|
|
||||||
if value[2] is addr[2]:
|
|
||||||
msg_id=con(msg_dst=value[0],msg_cmd=0)
|
|
||||||
msg_data=[value[1]]
|
|
||||||
m = can.Message(arbitration_id=msg_id,
|
|
||||||
data=msg_data,
|
|
||||||
extended_id=True)
|
|
||||||
try:
|
|
||||||
local_bus.send(m)
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error sending can message {%s}: %s" % (m, e))
|
|
||||||
print("data sent to CAN",m)
|
|
||||||
|
|
||||||
msg_id=con(msg_dst=addr[0],msg_cmd=msg_cmd)
|
|
||||||
msg_data=[addr[1]]
|
|
||||||
|
|
||||||
m = can.Message(arbitration_id=msg_id,
|
|
||||||
data=msg_data,
|
|
||||||
extended_id=True)
|
|
||||||
try:
|
|
||||||
local_bus.send(m)
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error sending can message {%s}: %s" % (m, e))
|
|
||||||
print("data sent to CAN",m)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
verbosity = 2
|
|
||||||
|
|
||||||
logging_level_name = ['critical', 'error', 'warning', 'info', 'debug', 'subdebug'][min(5, verbosity)]
|
|
||||||
can.set_logging_level(logging_level_name)
|
|
||||||
|
|
||||||
can_filters = []
|
|
||||||
config = {"can_filters": can_filters, "single_handle": True}
|
|
||||||
config["interface"] = "socketcan"
|
|
||||||
config["bitrate"] = 125000
|
|
||||||
bus = Bus("can1", **config)
|
|
||||||
|
|
||||||
print('Connected to {}: {}'.format(bus.__class__.__name__, bus.channel_info))
|
|
||||||
print('Can Logger (Started on {})\n'.format(datetime.now()))
|
|
||||||
|
|
||||||
mcp_mqtt = mqtt.Client()
|
|
||||||
mcp_mqtt.on_connect = on_connect
|
|
||||||
mcp_mqtt.on_message = on_message
|
|
||||||
mcp_mqtt.user_data_set(bus)
|
|
||||||
mcp_mqtt.connect("mcp", 1883, 60)
|
|
||||||
mcp_mqtt.loop_start()
|
|
||||||
|
|
||||||
try:
|
|
||||||
while True:
|
|
||||||
msg = bus.recv(1)
|
|
||||||
if msg is not None:
|
|
||||||
de=decon(msg.arbitration_id)
|
|
||||||
m= { "prio": hex(de[0]), "type": hex(de[1]), "dst": hex(de[2]), "src": hex(de[3]), "cmd": hex(de[4]), "action": hex(msg.data[0]) }
|
|
||||||
if de[2]==0 and de[4] == 6:
|
|
||||||
print("received state: ", hex(de[3]), hex(msg.data[0]), hex(msg.data[1]))
|
|
||||||
for key in coil_map:
|
|
||||||
address=coil_map[key]
|
|
||||||
if address[0] == de[3] and address[1] == msg.data[0]+1:
|
|
||||||
print("coil/"+key+" changed to "+str(msg.data[1]))
|
|
||||||
mcp_mqtt.publish("coil/"+key+"/state", msg.data[1] , retain=1)
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
pass
|
|
||||||
finally:
|
|
||||||
bus.shutdown()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
@ -53,6 +53,8 @@ light_map = {
|
|||||||
'SCH': [ 0x01, 0x08 ],
|
'SCH': [ 0x01, 0x08 ],
|
||||||
'B1': [ 0x01, 0x01 ],
|
'B1': [ 0x01, 0x01 ],
|
||||||
'B2': [ 0x01, 0x02 ],
|
'B2': [ 0x01, 0x02 ],
|
||||||
|
'ROL_EZ_DOWN': [0x03,0x05],
|
||||||
|
'ROL_EZ_UP': [0x03,0x04],
|
||||||
'EG1': [ 0x02, 0x09 ],
|
'EG1': [ 0x02, 0x09 ],
|
||||||
'EG2': [ 0x03, 0x09 ],
|
'EG2': [ 0x03, 0x09 ],
|
||||||
'OG': [ 0x01, 0x09 ],
|
'OG': [ 0x01, 0x09 ],
|
||||||
@ -60,9 +62,7 @@ light_map = {
|
|||||||
}
|
}
|
||||||
cmd_map = {
|
cmd_map = {
|
||||||
'off': 0,
|
'off': 0,
|
||||||
'0': 0,
|
|
||||||
'on': 1,
|
'on': 1,
|
||||||
'1': 1,
|
|
||||||
'value': 2,
|
'value': 2,
|
||||||
'toggle': 3
|
'toggle': 3
|
||||||
}
|
}
|
||||||
@ -99,11 +99,18 @@ def on_message(mcp_mqtt, userdata, msg):
|
|||||||
print("data Received topic: ", msg.topic)
|
print("data Received topic: ", msg.topic)
|
||||||
m_decode=str(msg.payload.decode("utf-8","ignore"))
|
m_decode=str(msg.payload.decode("utf-8","ignore"))
|
||||||
print("data Received",m_decode)
|
print("data Received",m_decode)
|
||||||
msg_cmd=cmd_map[m_decode]
|
msg_cmd=2
|
||||||
|
try:
|
||||||
|
value=int(m_decode)
|
||||||
|
except ValueError:
|
||||||
|
msg_cmd=cmd_map[m_decode]
|
||||||
|
|
||||||
sub=msg.topic[len(sub_topic)+1:]
|
sub=msg.topic[len(sub_topic)+1:]
|
||||||
light=aliases.get(sub,None)
|
light=aliases.get(sub,None)
|
||||||
if light is None:
|
if light is None:
|
||||||
light=sub
|
light=sub
|
||||||
|
|
||||||
|
|
||||||
print("substring: "+light)
|
print("substring: "+light)
|
||||||
addr = light_map[light]
|
addr = light_map[light]
|
||||||
msg_id=con(msg_dst=addr[0],msg_cmd=msg_cmd)
|
msg_id=con(msg_dst=addr[0],msg_cmd=msg_cmd)
|
||||||
@ -115,16 +122,14 @@ def on_message(mcp_mqtt, userdata, msg):
|
|||||||
m = can.Message(arbitration_id=msg_id,
|
m = can.Message(arbitration_id=msg_id,
|
||||||
data=msg_data,
|
data=msg_data,
|
||||||
extended_id=True)
|
extended_id=True)
|
||||||
|
print("going to sent to CAN",m)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
local_bus.send(m)
|
local_bus.send(m)
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
logging.error("Error sending can message {%s}: %s" % (m, e))
|
logging.error("Error sending can message {%s}: %s" % (m, e))
|
||||||
print("data sent to CAN",m)
|
print("data sent to CAN",m)
|
||||||
if light == 'ALL':
|
|
||||||
print("ALL detected")
|
|
||||||
for key in light_map:
|
|
||||||
mcp_mqtt.publish("light/"+key+"/state", msg_cmd, retain=1)
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
verbosity = 2
|
verbosity = 2
|
||||||
@ -134,7 +139,7 @@ def main():
|
|||||||
|
|
||||||
can_filters = []
|
can_filters = []
|
||||||
config = {"can_filters": can_filters, "single_handle": True}
|
config = {"can_filters": can_filters, "single_handle": True}
|
||||||
config["interface"] = "socketcan_native"
|
config["interface"] = "socketcan"
|
||||||
config["bitrate"] = 125000
|
config["bitrate"] = 125000
|
||||||
bus = Bus("can1", **config)
|
bus = Bus("can1", **config)
|
||||||
|
|
||||||
@ -146,10 +151,10 @@ def main():
|
|||||||
mcp_mqtt.on_message = on_message
|
mcp_mqtt.on_message = on_message
|
||||||
mcp_mqtt.user_data_set(bus)
|
mcp_mqtt.user_data_set(bus)
|
||||||
mcp_mqtt.connect("mcp", 1883, 60)
|
mcp_mqtt.connect("mcp", 1883, 60)
|
||||||
mcp_mqtt.loop_start()
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
mcp_mqtt.loop_start()
|
||||||
msg = bus.recv(1)
|
msg = bus.recv(1)
|
||||||
if msg is not None:
|
if msg is not None:
|
||||||
de=decon(msg.arbitration_id)
|
de=decon(msg.arbitration_id)
|
||||||
|
@ -1,214 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
from __future__ import absolute_import, print_function
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import argparse
|
|
||||||
import socket
|
|
||||||
import logging
|
|
||||||
from datetime import datetime
|
|
||||||
|
|
||||||
import can
|
|
||||||
from can import Bus, BusState, Logger
|
|
||||||
|
|
||||||
import paho.mqtt.client as mqtt
|
|
||||||
|
|
||||||
base_topic="house"
|
|
||||||
|
|
||||||
coil_topic = "coil"
|
|
||||||
light_topic = "light"
|
|
||||||
switch_topic = "switch"
|
|
||||||
|
|
||||||
coil_map = {
|
|
||||||
# tag, node, address, affinity
|
|
||||||
# tag: (L)ight, (E)G, (O)G, (F)lur, (S)chlaf, (A)ussen
|
|
||||||
'EZ': [ "LE", 0x03, 0x01 ],
|
|
||||||
'K': [ "LE", 0x03, 0x02 ],
|
|
||||||
'WZ1': [ "LE", 0x02, 0x01 ],
|
|
||||||
'WZ2': [ "LE", 0x02, 0x02 ],
|
|
||||||
'TER': [ "LEA", 0x03, 0x03 ],
|
|
||||||
'FE': [ "LFE", 0x03, 0x07 ],
|
|
||||||
'TRE': [ "LFE", 0x02, 0x03 ],
|
|
||||||
'FO': [ "LFO", 0x01, 0x03 ],
|
|
||||||
'TRO': [ "LFO", 0x01, 0x07 ],
|
|
||||||
'KI1': [ "LSO", 0x01, 0x06 ],
|
|
||||||
'KI2': [ "LSO", 0x01, 0x04 ],
|
|
||||||
'SCH': [ "LSO", 0x01, 0x08 ],
|
|
||||||
'B1': [ "LO", 0x01, 0x01 ],
|
|
||||||
'B2': [ "LO", 0x01, 0x02 ],
|
|
||||||
'ROL_EZ_G_DOWN': [ "", 0x03, 0x05, -1],
|
|
||||||
'ROL_EZ_G_UP': [ "", 0x03, 0x04, -1],
|
|
||||||
'ROL_EZ_N_DOWN': [ "", 0x03, 0x06, -2],
|
|
||||||
'ROL_EZ_N_UP': [ "", 0x03, 0x08, -2],
|
|
||||||
# 'EG1': [ 0, 0x02, 0x09 ],
|
|
||||||
# 'EG2': [ 0, 0x03, 0x09 ],
|
|
||||||
# 'OG': [ 0, 0x01, 0x09 ],
|
|
||||||
'ALL': [ "", 0xFF, 0x09 ],
|
|
||||||
}
|
|
||||||
|
|
||||||
cmd_map = {
|
|
||||||
'off': 0,
|
|
||||||
'0': 0,
|
|
||||||
'on': 1,
|
|
||||||
'1': 1,
|
|
||||||
'value': 2,
|
|
||||||
'toggle': 3
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def decon(msg_id):
|
|
||||||
msg_prio=msg_id>>26
|
|
||||||
msg_type=(msg_id>>24) & 0x03
|
|
||||||
msg_dst=(msg_id>>16) & 0xFF
|
|
||||||
msg_src=(msg_id>>8) & 0xFF
|
|
||||||
msg_cmd=msg_id & 0xFF
|
|
||||||
# print("msg_id: ", hex(msg_id), "prio: ", hex(msg_prio),"type: ", hex(msg_type)," dst: ", hex(msg_dst)," src: ", hex(msg_src)," cmd: ",hex(msg_cmd))
|
|
||||||
return [msg_prio, msg_type, msg_dst, msg_src, msg_cmd]
|
|
||||||
|
|
||||||
def con(msg_dst,msg_cmd,msg_prio=3,msg_type=0,msg_src=11, ):
|
|
||||||
msg_id=(msg_prio<<26) + \
|
|
||||||
((msg_type&0x03)<<24) +\
|
|
||||||
((msg_dst&0xFF)<<16) +\
|
|
||||||
((msg_src&0xFF)<<8) +\
|
|
||||||
(msg_cmd&0xFF)
|
|
||||||
print("Constructed ID: "+hex(msg_id))
|
|
||||||
return msg_id
|
|
||||||
|
|
||||||
def coil_action(coil, payload, bus, tag=0 ):
|
|
||||||
try:
|
|
||||||
cmd=cmd_map[payload]
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error finding command {%s}: %s" % (payload, e))
|
|
||||||
print("Coil: ",coil,"cmd:", payload)
|
|
||||||
try:
|
|
||||||
addr = coil_map[coil]
|
|
||||||
print("Addr:", addr)
|
|
||||||
if cmd == 2:
|
|
||||||
print("TBD")
|
|
||||||
# msg_data.append(value)
|
|
||||||
print("cmd", cmd,"length: ", len(addr))
|
|
||||||
if tag is not 0:
|
|
||||||
if tag not in addr[0]:
|
|
||||||
print("not tagged with: ",tag)
|
|
||||||
return
|
|
||||||
|
|
||||||
if cmd is not 0 and len(addr) is 4:
|
|
||||||
print("Applying affinity")
|
|
||||||
for key, value in coil_map.items():
|
|
||||||
print("checking: ", key)
|
|
||||||
if len(value) is 4:
|
|
||||||
print("value_2 is", value[3], "Addr: ", addr[3])
|
|
||||||
if value[3] is addr[3]:
|
|
||||||
msg_id=con(msg_dst=value[1],msg_cmd=0)
|
|
||||||
msg_data=[value[2]]
|
|
||||||
m = can.Message(arbitration_id=msg_id,
|
|
||||||
data=msg_data,
|
|
||||||
extended_id=True)
|
|
||||||
try:
|
|
||||||
bus.send(m)
|
|
||||||
print("data sent to CAN",m)
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error sending can message {%s}: %s" % (m, e))
|
|
||||||
|
|
||||||
msg_id=con(msg_dst=addr[1],msg_cmd=cmd)
|
|
||||||
msg_data=[addr[2]]
|
|
||||||
print(msg_id)
|
|
||||||
m = can.Message(arbitration_id=msg_id,
|
|
||||||
data=msg_data,
|
|
||||||
extended_id=True)
|
|
||||||
try:
|
|
||||||
bus.send(m)
|
|
||||||
print("data sent to CAN",m)
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error sending can message {%s}: %s" % (m, e))
|
|
||||||
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error finding coil %s" % (coil))
|
|
||||||
|
|
||||||
def on_connect(mcp_mqtt, userdata, flags, rc):
|
|
||||||
print("Connected with result code "+str(rc))
|
|
||||||
|
|
||||||
# Subscribing in on_connect() means that if we lose the connection and
|
|
||||||
# reconnect then subscriptions will be renewed.
|
|
||||||
mcp_mqtt.subscribe(base_topic+"/#", 0)
|
|
||||||
print("Subscribed to: "+base_topic+"/#")
|
|
||||||
|
|
||||||
def on_message_coil(mcp_mqtt, bus, msg):
|
|
||||||
print("data Received topic: ", msg.topic)
|
|
||||||
m_decode=str(msg.payload.decode("utf-8","ignore"))
|
|
||||||
print("data Received",m_decode)
|
|
||||||
sub=msg.topic[len(base_topic)+len(coil_topic)+2:]
|
|
||||||
coil_action(sub, m_decode, bus)
|
|
||||||
|
|
||||||
|
|
||||||
def on_message_light(mcp_mqtt, bus, msg):
|
|
||||||
print("data Received topic: ", msg.topic)
|
|
||||||
m_decode=str(msg.payload.decode("utf-8","ignore"))
|
|
||||||
print("data Received",m_decode)
|
|
||||||
sub=msg.topic[len(base_topic)+len(light_topic)+2:]
|
|
||||||
coil_action(sub, m_decode, bus, "L")
|
|
||||||
|
|
||||||
|
|
||||||
def on_message(mcp_mqtt, obj, msg):
|
|
||||||
# This callback will be called for messages that we receive that do not
|
|
||||||
# match any patterns defined in topic specific callbacks, i.e. in this case
|
|
||||||
print(msg.topic + " " + str(msg.qos) + " " + str(msg.payload))
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
verbosity = 2
|
|
||||||
|
|
||||||
logging_level_name = ['critical', 'error', 'warning', 'info', 'debug', 'subdebug'][min(5, verbosity)]
|
|
||||||
can.set_logging_level(logging_level_name)
|
|
||||||
|
|
||||||
can_filters = []
|
|
||||||
config = {"can_filters": can_filters, "single_handle": True}
|
|
||||||
config["interface"] = "socketcan"
|
|
||||||
config["bitrate"] = 125000
|
|
||||||
bus = Bus("can1", **config)
|
|
||||||
|
|
||||||
print('Connected to {}: {}'.format(bus.__class__.__name__, bus.channel_info))
|
|
||||||
print('Can Logger (Started on {})\n'.format(datetime.now()))
|
|
||||||
|
|
||||||
mcp_mqtt = mqtt.Client()
|
|
||||||
mcp_mqtt.on_connect = on_connect
|
|
||||||
# mcp_mqtt.on_message = on_message
|
|
||||||
mcp_mqtt.user_data_set(bus)
|
|
||||||
mcp_mqtt.loop_start()
|
|
||||||
|
|
||||||
mcp_mqtt.message_callback_add(base_topic+"/"+coil_topic+"/+", on_message_coil)
|
|
||||||
mcp_mqtt.message_callback_add(base_topic+"/"+light_topic+"/+", on_message_light)
|
|
||||||
mcp_mqtt.on_message = on_message
|
|
||||||
mcp_mqtt.connect("mcp", 1883, 60)
|
|
||||||
|
|
||||||
mcp_mqtt.loop_start()
|
|
||||||
#mcp_mqtt.loop_forever()
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
while True:
|
|
||||||
msg = bus.recv(1)
|
|
||||||
if msg is not None:
|
|
||||||
de=decon(msg.arbitration_id)
|
|
||||||
m= { "prio": hex(de[0]), "type": hex(de[1]), "dst": hex(de[2]), "src": hex(de[3]), "cmd": hex(de[4]), "action": hex(msg.data[0]) }
|
|
||||||
if de[2]==0 and de[4] == 6:
|
|
||||||
print("received state: ", hex(de[3]), hex(msg.data[0]), hex(msg.data[1]))
|
|
||||||
for key in coil_map:
|
|
||||||
address=coil_map[key]
|
|
||||||
if address[1] == de[3] and address[2] == msg.data[0]+1:
|
|
||||||
print("coil/"+key+" changed to "+str(msg.data[1]))
|
|
||||||
mcp_mqtt.publish(base_topic+"/"+coil_topic+"/"+key+"/state", msg.data[1] , retain=1)
|
|
||||||
if "L" in address[0]:
|
|
||||||
print("light/"+key+" changed to "+str(msg.data[1]))
|
|
||||||
mcp_mqtt.publish(base_topic+"/"+light_topic+"/"+key+"/state", msg.data[1] , retain=1)
|
|
||||||
elif de[2]==0 and de[4] == 5:
|
|
||||||
print("received state: ", de[3], msg.data[0], bin(msg.data[1]))
|
|
||||||
mcp_mqtt.publish(base_topic+"/"+switch_topic+"/"+str(de[3])+"-"+str(msg.data[0]), bin(msg.data[1]) , retain=1)
|
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
pass
|
|
||||||
finally:
|
|
||||||
bus.shutdown()
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
@ -12,29 +12,20 @@ from can import Bus, BusState, Logger
|
|||||||
|
|
||||||
import paho.mqtt.client as mqtt
|
import paho.mqtt.client as mqtt
|
||||||
|
|
||||||
sub_topic = "shutter"
|
sub_topic = "roll"
|
||||||
aliases = {
|
aliases = {
|
||||||
'Esszimmer_Garten': 'EZ_G',
|
'Esszimmer': 'EZ',
|
||||||
'Esszimmer_Nachbar': 'EZ_N',
|
|
||||||
'Wohnzimmer1': 'WZ1',
|
'Wohnzimmer1': 'WZ1',
|
||||||
'Wohnzimmer2': 'WZ2',
|
'Wohnzimmer2': 'WZ2',
|
||||||
'Wohnzimmer3': 'WZ3',
|
'Wohnzimmer3': 'WZ3',
|
||||||
'Wohnzimmer4': 'WZ4',
|
'Wohnzimmer4': 'WZ4',
|
||||||
}
|
}
|
||||||
event_map = {
|
coil_map = {
|
||||||
'stop': 0,
|
'EZ': [ 0x03, 0x04 , 0x03, 0x05 ],
|
||||||
'off': 0,
|
|
||||||
'up': 1,
|
|
||||||
'down': 2
|
|
||||||
}
|
|
||||||
coil_map = {
|
|
||||||
# up , down
|
|
||||||
'EZ_G': [ 0x03, 0x04 , 0x03, 0x05 ],
|
|
||||||
'EZ_N': [ 0x03, 0x08 , 0x03, 0x06 ],
|
|
||||||
'WZ1': [ 0x00, 0x01 , 0x00, 0x01 ],
|
'WZ1': [ 0x00, 0x01 , 0x00, 0x01 ],
|
||||||
'WZ2': [ 0x00, 0x01 , 0x00, 0x01 ],
|
'WZ2': [ 0x00, 0x01 , 0x00, 0x01 ],
|
||||||
'WZ3': [ 0x00, 0x01 , 0x00, 0x01 ],
|
'WZ3': [ 0x00, 0x01 , 0x00, 0x01 ],
|
||||||
'WZ4': [ 0x00, 0x01 , 0x00, 0x01 ]
|
'WZ4': [ 0x00, 0x01 , 0x00, 0x01 ],
|
||||||
}
|
}
|
||||||
cmd_map = {
|
cmd_map = {
|
||||||
'off': 0,
|
'off': 0,
|
||||||
@ -75,45 +66,35 @@ def on_message(mcp_mqtt, userdata, msg):
|
|||||||
print("data Received topic: ", msg.topic)
|
print("data Received topic: ", msg.topic)
|
||||||
m_decode=str(msg.payload.decode("utf-8","ignore"))
|
m_decode=str(msg.payload.decode("utf-8","ignore"))
|
||||||
print("data Received",m_decode)
|
print("data Received",m_decode)
|
||||||
data=m_decode
|
msg_cmd=2
|
||||||
|
try:
|
||||||
|
value=int(m_decode)
|
||||||
|
except ValueError:
|
||||||
|
msg_cmd=cmd_map[m_decode]
|
||||||
|
|
||||||
sub=msg.topic[len(sub_topic)+1:]
|
sub=msg.topic[len(sub_topic)+1:]
|
||||||
event=event_map[data]
|
roll=aliases.get(sub,None)
|
||||||
coils={
|
if roll is None:
|
||||||
'up': [ coil_map[sub][0], coil_map[sub][1] ],
|
roll=sub
|
||||||
'down': [ coil_map[sub][2], coil_map[sub][3] ]
|
|
||||||
}
|
|
||||||
if event is not None: # it's 0,1,2
|
|
||||||
for key, value in coils.items():
|
|
||||||
msg_id=con(msg_dst=value[0],msg_cmd=0)
|
|
||||||
msg_data=[value[1]]
|
|
||||||
print("turning off: ",sub,value[0],value[1])
|
|
||||||
m = can.Message(arbitration_id=msg_id,
|
|
||||||
data=msg_data,
|
|
||||||
extended_id=True)
|
|
||||||
print("going to sent to CAN",m)
|
|
||||||
try:
|
|
||||||
local_bus.send(m)
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error sending can message {%s}: %s" % (m, e))
|
|
||||||
print("data sent to CAN",m)
|
|
||||||
if event is not 0:
|
|
||||||
addr = coils[data]
|
|
||||||
print("turning on: ",addr[0],addr[1])
|
|
||||||
msg_id=con(msg_dst=addr[0],msg_cmd=1)
|
|
||||||
msg_data=[addr[1]]
|
|
||||||
print(msg_data)
|
|
||||||
m = can.Message(arbitration_id=msg_id,
|
|
||||||
data=msg_data,
|
|
||||||
extended_id=True)
|
|
||||||
print("going to sent to CAN",m)
|
|
||||||
|
|
||||||
try:
|
|
||||||
local_bus.send(m)
|
|
||||||
except BaseException as e:
|
|
||||||
logging.error("Error sending can message {%s}: %s" % (m, e))
|
|
||||||
print("data sent to CAN",m)
|
|
||||||
|
|
||||||
|
|
||||||
|
print("substring: "+roll)
|
||||||
|
addr = light_map[light]
|
||||||
|
msg_id=con(msg_dst=addr[0],msg_cmd=msg_cmd)
|
||||||
|
msg_data=[addr[1]]
|
||||||
|
print(msg_data)
|
||||||
|
if msg_cmd == 2:
|
||||||
|
msg_data.append(value)
|
||||||
|
print(msg_data)
|
||||||
|
m = can.Message(arbitration_id=msg_id,
|
||||||
|
data=msg_data,
|
||||||
|
extended_id=True)
|
||||||
|
print("going to sent to CAN",m)
|
||||||
|
|
||||||
|
try:
|
||||||
|
local_bus.send(m)
|
||||||
|
except BaseException as e:
|
||||||
|
logging.error("Error sending can message {%s}: %s" % (m, e))
|
||||||
|
print("data sent to CAN",m)
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -138,8 +119,8 @@ def main():
|
|||||||
mcp_mqtt.connect("mcp", 1883, 60)
|
mcp_mqtt.connect("mcp", 1883, 60)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
mcp_mqtt.loop()
|
mcp_mqtt.loop_start()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|