Compare commits

...

13 Commits

Author SHA1 Message Date
Mark van Renswoude 3348cbd48a Implemented getSensors
Changed to Adafruit PWM Servo library for PCA9685
Finalized PCB design for manufacturing
2018-11-25 22:38:49 +01:00
Mark van Renswoude b635fce45d Fixed I2C bus not connected to SDA/SCL 2018-11-25 20:14:09 +01:00
Mark van Renswoude 4381f66b26 Fixed programming connector pinout 2018-11-25 16:57:06 +01:00
Mark van Renswoude 2090dfdca6 New board design 2018-11-25 16:36:34 +01:00
Mark van Renswoude da09f40443 Added mock master
Fixed communication bugs
2018-11-22 23:31:08 +01:00
Mark van Renswoude ff315ae20e Fixed communication 2018-11-22 20:30:31 +01:00
Mark van Renswoude 06b5a0e720 Implemented protocol and message handling 2018-11-20 21:55:31 +01:00
Mark van Renswoude a5eab1427d Ported to C++ for the ATMega328P
Added fancier display elements now that we've got room to spare
2018-11-19 21:03:04 +01:00
Mark van Renswoude 5f89b3efd2 First version of submodule implementation
Based on ATTiny2313 / ATTiny4313
2018-11-18 11:16:33 +01:00
Mark van Renswoude 3a8b22fc4a Merge tag '2.1' into develop
release 2.1 2.1
2018-04-29 11:06:33 +02:00
Mark van Renswoude a236588ebb Merge branch 'release/2.1'
# Conflicts:
#	src/assets/version.h
#	src/main.cpp
#	web/dist/bundle.js
2018-04-29 11:04:48 +02:00
Mark van Renswoude d0b62d38b0 Added automatic retry to frontend
Better support for iOS language detection?
2018-03-19 07:45:54 +01:00
Mark van Renswoude fb00c0baa2 Merge branch 'release/2.0' 2018-02-17 23:14:55 +01:00
55 changed files with 10766 additions and 2297 deletions

5
.gitignore vendored
View File

@ -3,4 +3,7 @@
bin
*.sublime-workspace
node_modules
src/secret.h
src/secret.h
/kicad/Stairs.kicad_pcb-bak
/kicad/Stairs.bak
kicad/output/*

View File

@ -1,3 +1,16 @@
<?php
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*
* Host this file somewhere on PHP enabled non-secure HTTP webhost
* and modify the config.h to proxy Maps API requests. Saves a ton
* of memory on the ESP8266.
*
* If you care about your API key being sent across plain HTTP,
* host this or a similar proxy on your LAN, perhaps on a Raspberry Pi.
*/
echo file_get_contents('https://maps.googleapis.com/maps/api/timezone/json?' . $_SERVER['QUERY_STRING']);
?>

422
kicad/Stairs-cache.lib Normal file
View File

@ -0,0 +1,422 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# AMS1117-5.0_AMS1117-5.0
#
DEF AMS1117-5.0_AMS1117-5.0 U 0 40 Y Y 1 L N
F0 "U" -400 220 50 H V L BNN
F1 "AMS1117-5.0_AMS1117-5.0" -401 -321 50 H V L BNN
F2 "SOT229P700X180-4N" 0 0 50 H I L BNN
F3 "Sot223/Pkg 1-Amp 5-Volt Low Drop Out Voltage Regulatator" 0 0 50 H I L BNN
F4 "Unavailable" 0 0 50 H I L BNN
F5 "Advanced Monolithic Systems" 0 0 50 H I L BNN
F6 "None" 0 0 50 H I L BNN
F7 "None" 0 0 50 H I L BNN
F8 "AMS1117-5.0" 0 0 50 H I L BNN
DRAW
S -400 200 400 -200 0 1 0 f
X ADJ/GND 1 600 -100 200 L 40 40 0 0 W
X VOUT 2 600 100 200 L 40 40 0 0 O
X VIN 3 -600 100 200 R 40 40 0 0 I
ENDDRAW
ENDDEF
#
# Connector_Generic_Conn_01x02
#
DEF Connector_Generic_Conn_01x02 J 0 40 Y N 1 F N
F0 "J" 0 100 50 H V C CNN
F1 "Connector_Generic_Conn_01x02" 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 50 50 -150 1 1 10 f
X Pin_1 1 -200 0 150 R 50 50 1 1 P
X Pin_2 2 -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_01x06
#
DEF Connector_Generic_Conn_01x06 J 0 40 Y N 1 F N
F0 "J" 0 300 50 H V C CNN
F1 "Connector_Generic_Conn_01x06" 0 -400 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 -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 250 50 -350 1 1 10 f
X Pin_1 1 -200 200 150 R 50 50 1 1 P
X Pin_2 2 -200 100 150 R 50 50 1 1 P
X Pin_3 3 -200 0 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 -200 150 R 50 50 1 1 P
X Pin_6 6 -200 -300 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
#
# Device_C
#
DEF Device_C C 0 10 N Y 1 F N
F0 "C" 25 100 50 H V L CNN
F1 "Device_C" 25 -100 50 H V L CNN
F2 "" 38 -150 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
C_*
$ENDFPLIST
DRAW
P 2 0 1 20 -80 -30 80 -30 N
P 2 0 1 20 -80 30 80 30 N
X ~ 1 0 150 110 D 50 50 1 1 P
X ~ 2 0 -150 110 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# Device_Crystal_Small
#
DEF Device_Crystal_Small Y 0 40 N N 1 F N
F0 "Y" 0 100 50 H V C CNN
F1 "Device_Crystal_Small" 0 -100 50 H V C CNN
F2 "" 0 0 50 H I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
Crystal*
$ENDFPLIST
DRAW
S -30 -60 30 60 0 1 0 N
P 2 0 1 15 -50 -30 -50 30 N
P 2 0 1 15 50 -30 50 30 N
X 1 1 -100 0 50 R 50 50 1 1 P
X 2 2 100 0 50 L 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 8 -50 -50 -50 50 N
P 2 0 1 0 -50 0 50 0 N
P 4 0 1 8 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
F0 "R" 80 0 50 V V C CNN
F1 "Device_R" 0 0 50 V V C CNN
F2 "" -70 0 50 V I C CNN
F3 "" 0 0 50 H I C CNN
$FPLIST
R_*
$ENDFPLIST
DRAW
S -40 -100 40 100 0 1 10 N
X ~ 1 0 150 50 D 50 50 1 1 P
X ~ 2 0 -150 50 U 50 50 1 1 P
ENDDRAW
ENDDEF
#
# MAX485_MAX485
#
DEF MAX485_MAX485 U 0 40 Y Y 1 L N
F0 "U" -401 301 50 H V L BNN
F1 "MAX485_MAX485" -401 -301 50 H V L BNN
F2 "" 0 0 50 H I C CNN
F3 "Maxim Integrated" 0 0 50 H I L BNN
F4 "None" 0 0 50 H I L BNN
F5 "Unavailable" 0 0 50 H I L BNN
F6 "None" 0 0 50 H I L BNN
F7 "MAX485" 0 0 50 H I L BNN
$FPLIST
DIL08
SO08
$ENDFPLIST
DRAW
S -400 300 400 -200 0 1 0 f
X RO 1 -600 200 200 R 40 40 0 0 B
X RE 2 -600 100 200 R 40 40 0 0 B I
X DE 3 -600 0 200 R 40 40 0 0 B
X DI 4 -600 -100 200 R 40 40 0 0 B
X GND 5 600 -100 200 L 40 40 0 0 W
X A 6 600 0 200 L 40 40 0 0 B
X B 7 600 100 200 L 40 40 0 0 B
X VCC 8 600 200 200 L 40 40 0 0 W
ENDDRAW
ENDDEF
#
# MCU_Microchip_ATmega_ATmega328-AU
#
DEF MCU_Microchip_ATmega_ATmega328-AU U 0 20 Y Y 1 F N
F0 "U" -500 1450 50 H V L BNN
F1 "MCU_Microchip_ATmega_ATmega328-AU" 100 -1450 50 H V L TNN
F2 "Package_QFP:TQFP-32_7x7mm_P0.8mm" 0 0 50 H I C CIN
F3 "" 0 0 50 H I C CNN
ALIAS ATmega48PA-AU ATmega88A-AU ATmega88PA-AU ATmega168A-AU ATmega168PA-AU ATmega328-AU ATmega328P-AU
$FPLIST
TQFP*7x7mm*P0.8mm*
$ENDFPLIST
DRAW
S -500 -1400 500 1400 0 1 10 f
X PD3 1 600 -800 100 L 50 50 1 1 T
X PD6 10 600 -1100 100 L 50 50 1 1 T
X PD7 11 600 -1200 100 L 50 50 1 1 T
X PB0 12 600 1200 100 L 50 50 1 1 T
X PB1 13 600 1100 100 L 50 50 1 1 T
X PB2 14 600 1000 100 L 50 50 1 1 T
X PB3 15 600 900 100 L 50 50 1 1 T
X PB4 16 600 800 100 L 50 50 1 1 T
X PB5 17 600 700 100 L 50 50 1 1 T
X AVCC 18 100 1500 100 D 50 50 1 1 W
X ADC6 19 -600 1000 100 R 50 50 1 1 I
X PD4 2 600 -900 100 L 50 50 1 1 T
X AREF 20 -600 1200 100 R 50 50 1 1 P
X GND 21 0 -1500 100 U 50 50 1 1 P N
X ADC7 22 -600 900 100 R 50 50 1 1 I
X PC0 23 600 300 100 L 50 50 1 1 T
X PC1 24 600 200 100 L 50 50 1 1 T
X PC2 25 600 100 100 L 50 50 1 1 T
X PC3 26 600 0 100 L 50 50 1 1 T
X PC4 27 600 -100 100 L 50 50 1 1 T
X PC5 28 600 -200 100 L 50 50 1 1 T
X ~RESET~/PC6 29 600 -300 100 L 50 50 1 1 T
X GND 3 0 -1500 100 U 50 50 1 1 W
X PD0 30 600 -500 100 L 50 50 1 1 T
X PD1 31 600 -600 100 L 50 50 1 1 T
X PD2 32 600 -700 100 L 50 50 1 1 T
X VCC 4 0 1500 100 D 50 50 1 1 W
X GND 5 0 -1500 100 U 50 50 1 1 P N
X VCC 6 0 1500 100 D 50 50 1 1 P N
X XTAL1/PB6 7 600 600 100 L 50 50 1 1 T
X XTAL2/PB7 8 600 500 100 L 50 50 1 1 T
X PD5 9 600 -1000 100 L 50 50 1 1 T
ENDDRAW
ENDDEF
#
# PCA9685-TSSOP_PCA9685-TSSOP
#
DEF PCA9685-TSSOP_PCA9685-TSSOP U 0 40 Y Y 1 F N
F0 "U" 0 -100 50 H V C CNN
F1 "PCA9685-TSSOP_PCA9685-TSSOP" 0 100 50 H V C CNN
F2 "MODULE" 0 0 50 H I C CNN
F3 "DOCUMENTATION" 0 0 50 H I C CNN
DRAW
S -450 -850 450 850 1 0 0 f
X A0 1 -750 650 300 R 50 50 1 1 I
X LED4 10 -750 -250 300 R 50 50 1 1 O
X LED5 11 -750 -350 300 R 50 50 1 1 O
X LED6 12 -750 -450 300 R 50 50 1 1 O
X LED7 13 -750 -550 300 R 50 50 1 1 O
X GND 14 -750 -650 300 R 50 50 1 1 I
X LED8 15 750 -650 300 L 50 50 1 1 O
X LED9 16 750 -550 300 L 50 50 1 1 O
X LED10 17 750 -450 300 L 50 50 1 1 O
X LED11 18 750 -350 300 L 50 50 1 1 O
X LED12 19 750 -250 300 L 50 50 1 1 O
X A1 2 -750 550 300 R 50 50 1 1 I
X LED13 20 750 -150 300 L 50 50 1 1 O
X LED14 21 750 -50 300 L 50 50 1 1 O
X LED15 22 750 50 300 L 50 50 1 1 O
X OE 23 750 150 300 L 50 50 1 1 I
X A5 24 750 250 300 L 50 50 1 1 I
X EXTCLK 25 750 350 300 L 50 50 1 1 I
X SCL 26 750 450 300 L 50 50 1 1 I
X SDA 27 750 550 300 L 50 50 1 1 B
X VCC 28 750 650 300 L 50 50 1 1 I
X A2 3 -750 450 300 R 50 50 1 1 I
X A3 4 -750 350 300 R 50 50 1 1 I
X A4 5 -750 250 300 R 50 50 1 1 I
X LED0 6 -750 150 300 R 50 50 1 1 O
X LED1 7 -750 50 300 R 50 50 1 1 O
X LED2 8 -750 -50 300 R 50 50 1 1 O
X LED3 9 -750 -150 300 R 50 50 1 1 O
ENDDRAW
ENDDEF
#
# Switch_SW_Push
#
DEF Switch_SW_Push SW 0 40 N N 1 F N
F0 "SW" 50 100 50 H V L CNN
F1 "Switch_SW_Push" 0 -60 50 H V C CNN
F2 "" 0 200 50 H I C CNN
F3 "" 0 200 50 H I C CNN
DRAW
C -80 0 20 0 1 0 N
C 80 0 20 0 1 0 N
P 2 0 1 0 0 50 0 120 N
P 2 0 1 0 100 50 -100 50 N
X 1 1 -200 0 100 R 50 50 0 1 P
X 2 2 200 0 100 L 50 50 0 1 P
ENDDRAW
ENDDEF
#
# Transistor_FET_IRLB8721PBF
#
DEF Transistor_FET_IRLB8721PBF Q 0 0 Y N 1 F N
F0 "Q" 250 75 50 H V L CNN
F1 "Transistor_FET_IRLB8721PBF" 250 0 50 H V L CNN
F2 "Package_TO_SOT_THT:TO-220-3_Vertical" 250 -75 50 H I L CIN
F3 "" 0 0 50 H I L CNN
ALIAS IRF3205 IRF540N IRF740 IRLB8721PBF IRLZ34N IRLZ44N
$FPLIST
TO?220*
$ENDFPLIST
DRAW
C 65 0 111 0 1 10 N
C 100 -70 11 0 1 0 F
C 100 70 11 0 1 0 F
P 2 0 1 0 10 0 -100 0 N
P 2 0 1 0 30 -70 100 -70 N
P 2 0 1 10 30 -50 30 -90 N
P 2 0 1 0 30 0 100 0 N
P 2 0 1 10 30 20 30 -20 N
P 2 0 1 0 30 70 100 70 N
P 2 0 1 10 30 90 30 50 N
P 2 0 1 0 100 -70 100 -100 N
P 2 0 1 0 100 -70 100 0 N
P 2 0 1 0 100 100 100 70 N
P 3 0 1 10 10 75 10 -75 10 -75 N
P 4 0 1 0 40 0 80 15 80 -15 40 0 F
P 4 0 1 0 100 -70 130 -70 130 70 100 70 N
P 4 0 1 0 110 20 115 15 145 15 150 10 N
P 4 0 1 0 130 15 115 -10 145 -10 130 15 N
X G 1 -200 0 100 R 50 50 1 1 I
X D 2 100 200 100 D 50 50 1 1 P
X S 3 100 -200 100 U 50 50 1 1 P
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_+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

2480
kicad/Stairs.kicad_pcb Normal file

File diff suppressed because it is too large Load Diff

665
kicad/Stairs.net Normal file
View File

@ -0,0 +1,665 @@
(export (version D)
(design
(source P:\Electronics\Stairs\kicad\Stairs.sch)
(date "25-11-2018 22:16:46")
(tool "Eeschema (5.0.1)-3")
(sheet (number 1) (name /) (tstamps /)
(title_block
(title "Stairs submodule")
(company "Mark van Renswoude")
(rev 1)
(date 2018-09-02)
(source Stairs.sch)
(comment (number 1) (value ""))
(comment (number 2) (value ""))
(comment (number 3) (value ""))
(comment (number 4) (value "")))))
(components
(comp (ref PCA9685)
(value PCA9685-TSSOP)
(footprint Housings_SSOP:TSSOP-28_4.4x9.7mm_Pitch0.65mm)
(datasheet DOCUMENTATION)
(libsource (lib PCA9685-TSSOP) (part PCA9685-TSSOP) (description ""))
(sheetpath (names /) (tstamps /))
(tstamp 5B8AD5C2))
(comp (ref U2)
(value MAX485)
(footprint MAX485-SO8:SO-8)
(datasheet "Maxim Integrated")
(fields
(field (name Field4) None)
(field (name Field5) Unavailable)
(field (name Field6) None)
(field (name Field7) MAX485))
(libsource (lib MAX485) (part MAX485) (description ""))
(sheetpath (names /) (tstamps /))
(tstamp 5B8AD72A))
(comp (ref P6)
(value PWR_IN)
(footprint Terminal_Blocks:TerminalBlock_bornier-2_P5.08mm)
(libsource (lib Connector_Generic) (part Conn_01x02) (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8AD8CA))
(comp (ref P5)
(value PWR_OUT)
(footprint Terminal_Blocks:TerminalBlock_bornier-2_P5.08mm)
(libsource (lib Connector_Generic) (part Conn_01x02) (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8ADA74))
(comp (ref P3)
(value SENSOR)
(footprint Terminal_Blocks:TerminalBlock_bornier-6_P5.08mm)
(libsource (lib Connector_Generic) (part Conn_01x06) (description "Generic connector, single row, 01x06, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8AE6A5))
(comp (ref P1)
(value DATA_IN)
(footprint Terminal_Blocks:TerminalBlock_bornier-2_P5.08mm)
(libsource (lib Connector_Generic) (part Conn_01x02) (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8AE987))
(comp (ref P2)
(value DATA_OUT)
(footprint Terminal_Blocks:TerminalBlock_bornier-2_P5.08mm)
(libsource (lib Connector_Generic) (part Conn_01x02) (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8AE9DD))
(comp (ref AMS1117)
(value AMS1117-5)
(footprint AMS1117-5.0:SOT229P700X180-4N)
(datasheet AMS1117-5.0)
(fields
(field (name Field4) None)
(field (name Field5) Unavailable)
(field (name Field6) "Sot223/Pkg 1-Amp 3.3-Volt Low Drop Out Voltage Regulatator")
(field (name Field7) "Advanced Monolithic Systems")
(field (name Field8) None))
(libsource (lib AMS1117-5.0) (part AMS1117-5.0) (description ""))
(sheetpath (names /) (tstamps /))
(tstamp 5B8AFB24))
(comp (ref C3)
(value 10µF)
(footprint Capacitors_Tantalum_SMD:CP_Tantalum_Case-D_EIA-7343-31_Reflow)
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8B090B))
(comp (ref C4)
(value 100nF)
(footprint Capacitors_SMD:C_1206)
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8B1267))
(comp (ref C2)
(value 33pF)
(footprint Capacitors_SMD:C_1206)
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8B93C9))
(comp (ref C1)
(value 33pF)
(footprint Capacitors_SMD:C_1206)
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8B9824))
(comp (ref XTAL1)
(value "16 Mhz")
(footprint Crystals:Crystal_HC49-U_Vertical)
(libsource (lib Device) (part Crystal_Small) (description "Two pin crystal, small symbol"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8B9A62))
(comp (ref R1)
(value 4.7K)
(footprint Resistors_SMD:R_0603)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5B8C2380))
(comp (ref P7)
(value SSD1306)
(footprint Pin_Headers:Pin_Header_Straight_1x04_Pitch2.54mm)
(libsource (lib Connector_Generic) (part Conn_01x04) (description "Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8C32B0))
(comp (ref Q1)
(value IRLB8721PBF)
(footprint TO_SOT_Packages_THT:TO-220-3_Vertical)
(libsource (lib Transistor_FET) (part IRLB8721PBF) (description "62A Id, 30V Vds, N-Channel MOSFET, TO-220"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8C8EA8))
(comp (ref R2)
(value 150)
(footprint Resistors_SMD:R_0603)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5B8CAD1E))
(comp (ref R3)
(value 150)
(footprint Resistors_SMD:R_0603)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5B8CAE68))
(comp (ref Q2)
(value IRLB8721PBF)
(footprint TO_SOT_Packages_THT:TO-220-3_Vertical)
(libsource (lib Transistor_FET) (part IRLB8721PBF) (description "62A Id, 30V Vds, N-Channel MOSFET, TO-220"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8CB00E))
(comp (ref P4)
(value LED)
(footprint Terminal_Blocks:TerminalBlock_bornier-4_P5.08mm)
(libsource (lib Connector_Generic) (part Conn_01x04) (description "Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5B8CBF27))
(comp (ref R4)
(value 10K)
(footprint Resistors_SMD:R_0603)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5B8C6BF9))
(comp (ref R5)
(value 10K)
(footprint Resistors_SMD:R_0603)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5B925FBE))
(comp (ref J1)
(value PROG)
(footprint Pin_Headers:Pin_Header_Straight_2x03_Pitch2.54mm)
(datasheet ~)
(libsource (lib Connector_Generic) (part Conn_02x03_Odd_Even) (description "Generic connector, double row, 02x03, odd/even pin numbering scheme (row 1 odd numbers, row 2 even numbers), script generated (kicad-library-utils/schlib/autogen/connector/)"))
(sheetpath (names /) (tstamps /))
(tstamp 5BEBD38C))
(comp (ref SW1)
(value Button)
(footprint SMD-BUTTON_4P-5.2X5.2X1.5MM-SKQGAKE010_:SW4-SMD-5.2X5.2X1.5MM)
(libsource (lib Switch) (part SW_Push) (description "Push button switch, generic, two pins"))
(sheetpath (names /) (tstamps /))
(tstamp 5BF329CF))
(comp (ref U1)
(value ATmega328-AU)
(footprint Housings_QFP:TQFP-32_7x7mm_Pitch0.8mm)
(datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega328_P%20AVR%20MCU%20with%20picoPower%20Technology%20Data%20Sheet%2040001984A.pdf)
(libsource (lib MCU_Microchip_ATmega) (part ATmega328-AU) (description "20MHz, 32kB Flash, 2kB SRAM, 1kB EEPROM, TQFP-32"))
(sheetpath (names /) (tstamps /))
(tstamp 5BF96964))
(comp (ref R6)
(value 4.7K)
(footprint Resistors_SMD:R_0603)
(libsource (lib Device) (part R) (description Resistor))
(sheetpath (names /) (tstamps /))
(tstamp 5C0CFA3C))
(comp (ref C5)
(value 100nF)
(footprint Capacitors_SMD:C_1206)
(libsource (lib Device) (part C) (description "Unpolarized capacitor"))
(sheetpath (names /) (tstamps /))
(tstamp 5C0DFCEB))
(comp (ref D1)
(value LED)
(footprint LEDs:LED_D5.0mm)
(datasheet ~)
(libsource (lib Device) (part LED) (description "Light emitting diode"))
(sheetpath (names /) (tstamps /))
(tstamp 5BFAB89C))
(comp (ref D2)
(value LED)
(footprint LEDs:LED_D5.0mm)
(datasheet ~)
(libsource (lib Device) (part LED) (description "Light emitting diode"))
(sheetpath (names /) (tstamps /))
(tstamp 5BFABDA6)))
(libparts
(libpart (lib AMS1117-5.0) (part AMS1117-5.0)
(fields
(field (name Reference) U)
(field (name Value) AMS1117-5.0)
(field (name Footprint) SOT229P700X180-4N)
(field (name Datasheet) "Sot223/Pkg 1-Amp 5-Volt Low Drop Out Voltage Regulatator")
(field (name Field4) Unavailable)
(field (name Field5) "Advanced Monolithic Systems")
(field (name Field6) None)
(field (name Field7) None)
(field (name Field8) AMS1117-5.0))
(pins
(pin (num 1) (name ADJ/GND) (type power_in))
(pin (num 2) (name VOUT) (type output))
(pin (num 3) (name VIN) (type input))))
(libpart (lib Connector_Generic) (part Conn_01x02)
(description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)")
(docs ~)
(footprints
(fp Connector*:*_1x??_*))
(fields
(field (name Reference) J)
(field (name Value) Conn_01x02))
(pins
(pin (num 1) (name Pin_1) (type passive))
(pin (num 2) (name Pin_2) (type passive))))
(libpart (lib Connector_Generic) (part Conn_01x04)
(description "Generic connector, single row, 01x04, script generated (kicad-library-utils/schlib/autogen/connector/)")
(docs ~)
(footprints
(fp Connector*:*_1x??_*))
(fields
(field (name Reference) J)
(field (name Value) Conn_01x04))
(pins
(pin (num 1) (name Pin_1) (type passive))
(pin (num 2) (name Pin_2) (type passive))
(pin (num 3) (name Pin_3) (type passive))
(pin (num 4) (name Pin_4) (type passive))))
(libpart (lib Connector_Generic) (part Conn_01x06)
(description "Generic connector, single row, 01x06, script generated (kicad-library-utils/schlib/autogen/connector/)")
(docs ~)
(footprints
(fp Connector*:*_1x??_*))
(fields
(field (name Reference) J)
(field (name Value) Conn_01x06))
(pins
(pin (num 1) (name Pin_1) (type passive))
(pin (num 2) (name Pin_2) (type passive))
(pin (num 3) (name Pin_3) (type passive))
(pin (num 4) (name Pin_4) (type passive))
(pin (num 5) (name Pin_5) (type passive))
(pin (num 6) (name Pin_6) (type passive))))
(libpart (lib Connector_Generic) (part Conn_02x03_Odd_Even)
(description "Generic connector, double row, 02x03, odd/even pin numbering scheme (row 1 odd numbers, row 2 even numbers), script generated (kicad-library-utils/schlib/autogen/connector/)")
(docs ~)
(footprints
(fp Connector*:*_2x??_*))
(fields
(field (name Reference) J)
(field (name Value) Conn_02x03_Odd_Even))
(pins
(pin (num 1) (name Pin_1) (type passive))
(pin (num 2) (name Pin_2) (type passive))
(pin (num 3) (name Pin_3) (type passive))
(pin (num 4) (name Pin_4) (type passive))
(pin (num 5) (name Pin_5) (type passive))
(pin (num 6) (name Pin_6) (type passive))))
(libpart (lib Device) (part C)
(description "Unpolarized capacitor")
(docs ~)
(footprints
(fp C_*))
(fields
(field (name Reference) C)
(field (name Value) C))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib Device) (part Crystal_Small)
(description "Two pin crystal, small symbol")
(docs ~)
(footprints
(fp Crystal*))
(fields
(field (name Reference) Y)
(field (name Value) Crystal_Small))
(pins
(pin (num 1) (name 1) (type passive))
(pin (num 2) (name 2) (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 ~)
(footprints
(fp R_*))
(fields
(field (name Reference) R)
(field (name Value) R))
(pins
(pin (num 1) (name ~) (type passive))
(pin (num 2) (name ~) (type passive))))
(libpart (lib MAX485) (part MAX485)
(footprints
(fp DIL08)
(fp SO08))
(fields
(field (name Reference) U)
(field (name Value) MAX485)
(field (name Datasheet) "Maxim Integrated")
(field (name Field4) None)
(field (name Field5) Unavailable)
(field (name Field6) None)
(field (name Field7) MAX485))
(pins
(pin (num 1) (name RO) (type BiDi))
(pin (num 2) (name RE) (type BiDi))
(pin (num 3) (name DE) (type BiDi))
(pin (num 4) (name DI) (type BiDi))
(pin (num 5) (name GND) (type power_in))
(pin (num 6) (name A) (type BiDi))
(pin (num 7) (name B) (type BiDi))
(pin (num 8) (name VCC) (type power_in))))
(libpart (lib MCU_Microchip_ATmega) (part ATmega48A-AU)
(aliases
(alias ATmega48PA-AU)
(alias ATmega88A-AU)
(alias ATmega88PA-AU)
(alias ATmega168A-AU)
(alias ATmega168PA-AU)
(alias ATmega328-AU)
(alias ATmega328P-AU))
(description "20MHz, 4kB Flash, 512B SRAM, 256B EEPROM, TQFP-32")
(docs http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A_88A_168A-Data-Sheet-40002007A.pdf)
(footprints
(fp TQFP*7x7mm*P0.8mm*))
(fields
(field (name Reference) U)
(field (name Value) ATmega48A-AU)
(field (name Footprint) Package_QFP:TQFP-32_7x7mm_P0.8mm))
(pins
(pin (num 1) (name PD3) (type 3state))
(pin (num 2) (name PD4) (type 3state))
(pin (num 3) (name GND) (type power_in))
(pin (num 4) (name VCC) (type power_in))
(pin (num 5) (name GND) (type passive))
(pin (num 6) (name VCC) (type passive))
(pin (num 7) (name XTAL1/PB6) (type 3state))
(pin (num 8) (name XTAL2/PB7) (type 3state))
(pin (num 9) (name PD5) (type 3state))
(pin (num 10) (name PD6) (type 3state))
(pin (num 11) (name PD7) (type 3state))
(pin (num 12) (name PB0) (type 3state))
(pin (num 13) (name PB1) (type 3state))
(pin (num 14) (name PB2) (type 3state))
(pin (num 15) (name PB3) (type 3state))
(pin (num 16) (name PB4) (type 3state))
(pin (num 17) (name PB5) (type 3state))
(pin (num 18) (name AVCC) (type power_in))
(pin (num 19) (name ADC6) (type input))
(pin (num 20) (name AREF) (type passive))
(pin (num 21) (name GND) (type passive))
(pin (num 22) (name ADC7) (type input))
(pin (num 23) (name PC0) (type 3state))
(pin (num 24) (name PC1) (type 3state))
(pin (num 25) (name PC2) (type 3state))
(pin (num 26) (name PC3) (type 3state))
(pin (num 27) (name PC4) (type 3state))
(pin (num 28) (name PC5) (type 3state))
(pin (num 29) (name ~RESET~/PC6) (type 3state))
(pin (num 30) (name PD0) (type 3state))
(pin (num 31) (name PD1) (type 3state))
(pin (num 32) (name PD2) (type 3state))))
(libpart (lib PCA9685-TSSOP) (part PCA9685-TSSOP)
(fields
(field (name Reference) U)
(field (name Value) PCA9685-TSSOP)
(field (name Footprint) MODULE)
(field (name Datasheet) DOCUMENTATION))
(pins
(pin (num 1) (name A0) (type input))
(pin (num 2) (name A1) (type input))
(pin (num 3) (name A2) (type input))
(pin (num 4) (name A3) (type input))
(pin (num 5) (name A4) (type input))
(pin (num 6) (name LED0) (type output))
(pin (num 7) (name LED1) (type output))
(pin (num 8) (name LED2) (type output))
(pin (num 9) (name LED3) (type output))
(pin (num 10) (name LED4) (type output))
(pin (num 11) (name LED5) (type output))
(pin (num 12) (name LED6) (type output))
(pin (num 13) (name LED7) (type output))
(pin (num 14) (name GND) (type input))
(pin (num 15) (name LED8) (type output))
(pin (num 16) (name LED9) (type output))
(pin (num 17) (name LED10) (type output))
(pin (num 18) (name LED11) (type output))
(pin (num 19) (name LED12) (type output))
(pin (num 20) (name LED13) (type output))
(pin (num 21) (name LED14) (type output))
(pin (num 22) (name LED15) (type output))
(pin (num 23) (name OE) (type input))
(pin (num 24) (name A5) (type input))
(pin (num 25) (name EXTCLK) (type input))
(pin (num 26) (name SCL) (type input))
(pin (num 27) (name SDA) (type BiDi))
(pin (num 28) (name VCC) (type input))))
(libpart (lib Switch) (part SW_Push)
(description "Push button switch, generic, two pins")
(fields
(field (name Reference) SW)
(field (name Value) SW_Push))
(pins
(pin (num 1) (name 1) (type passive))
(pin (num 2) (name 2) (type passive))))
(libpart (lib Transistor_FET) (part BUZ11)
(aliases
(alias IRF3205)
(alias IRF540N)
(alias IRF740)
(alias IRLB8721PBF)
(alias IRLZ34N)
(alias IRLZ44N))
(description "30A Id, 50V Vds, N-Channel Power MOSFET, TO-220")
(docs http://www.fairchildsemi.com/ds/BU/BUZ11.pdf)
(footprints
(fp TO?220*))
(fields
(field (name Reference) Q)
(field (name Value) BUZ11)
(field (name Footprint) Package_TO_SOT_THT:TO-220-3_Vertical))
(pins
(pin (num 1) (name G) (type input))
(pin (num 2) (name D) (type passive))
(pin (num 3) (name S) (type passive)))))
(libraries
(library (logical AMS1117-5.0)
(uri P:\Electronics\Stairs\kicad/libs/AMS1117-5.0.lib))
(library (logical Connector_Generic)
(uri "C:\\Program Files\\KiCad\\share\\kicad\\library/Connector_Generic.lib"))
(library (logical Device)
(uri "C:\\Program Files\\KiCad\\share\\kicad\\library/Device.lib"))
(library (logical MAX485)
(uri P:\Electronics\Stairs\kicad/libs/MAX485.lib))
(library (logical MCU_Microchip_ATmega)
(uri "C:\\Program Files\\KiCad\\share\\kicad\\library/MCU_Microchip_ATmega.lib"))
(library (logical PCA9685-TSSOP)
(uri P:\Electronics\Stairs\kicad/libs/PCA9685-TSSOP.lib))
(library (logical Switch)
(uri "C:\\Program Files\\KiCad\\share\\kicad\\library/Switch.lib"))
(library (logical Transistor_FET)
(uri "C:\\Program Files\\KiCad\\share\\kicad\\library/Transistor_FET.lib")))
(nets
(net (code 1) (name "Net-(Q1-Pad1)")
(node (ref R2) (pin 2))
(node (ref Q1) (pin 1)))
(net (code 2) (name "Net-(P3-Pad3)")
(node (ref U1) (pin 24))
(node (ref P3) (pin 3)))
(net (code 3) (name "Net-(P3-Pad6)")
(node (ref P3) (pin 6))
(node (ref U1) (pin 25)))
(net (code 4) (name GND)
(node (ref C5) (pin 2))
(node (ref U1) (pin 5))
(node (ref C4) (pin 1))
(node (ref C3) (pin 1))
(node (ref SW1) (pin 2))
(node (ref U1) (pin 3))
(node (ref D2) (pin 1))
(node (ref D1) (pin 1))
(node (ref U1) (pin 21))
(node (ref P7) (pin 4))
(node (ref Q1) (pin 3))
(node (ref Q2) (pin 3))
(node (ref AMS1117) (pin 1))
(node (ref C1) (pin 2))
(node (ref C2) (pin 2))
(node (ref PCA9685) (pin 14))
(node (ref P3) (pin 5))
(node (ref P3) (pin 2))
(node (ref P5) (pin 2))
(node (ref P6) (pin 1))
(node (ref U2) (pin 5))
(node (ref J1) (pin 6))
(node (ref R4) (pin 2)))
(net (code 5) (name +5V)
(node (ref C3) (pin 2))
(node (ref AMS1117) (pin 2))
(node (ref J1) (pin 2))
(node (ref C4) (pin 2))
(node (ref R6) (pin 1))
(node (ref U1) (pin 6))
(node (ref U1) (pin 4))
(node (ref R1) (pin 2))
(node (ref P7) (pin 3))
(node (ref U2) (pin 8))
(node (ref P3) (pin 1))
(node (ref P3) (pin 4))
(node (ref PCA9685) (pin 28))
(node (ref U1) (pin 18))
(node (ref R5) (pin 2)))
(net (code 6) (name "Net-(SW1-Pad1)")
(node (ref SW1) (pin 1))
(node (ref U1) (pin 12)))
(net (code 7) (name RST)
(node (ref U1) (pin 29))
(node (ref R5) (pin 1))
(node (ref J1) (pin 5)))
(net (code 8) (name /PD)
(node (ref PCA9685) (pin 2))
(node (ref PCA9685) (pin 4))
(node (ref R4) (pin 1))
(node (ref PCA9685) (pin 23))
(node (ref PCA9685) (pin 24))
(node (ref PCA9685) (pin 3))
(node (ref PCA9685) (pin 5))
(node (ref PCA9685) (pin 1)))
(net (code 9) (name +12V)
(node (ref AMS1117) (pin 3))
(node (ref P6) (pin 2))
(node (ref P4) (pin 2))
(node (ref P4) (pin 4))
(node (ref P5) (pin 1)))
(net (code 10) (name "Net-(U1-Pad9)")
(node (ref U1) (pin 9)))
(net (code 11) (name "Net-(U1-Pad2)")
(node (ref U1) (pin 2)))
(net (code 12) (name "Net-(U1-Pad14)")
(node (ref U1) (pin 14)))
(net (code 13) (name "Net-(U1-Pad13)")
(node (ref U1) (pin 13)))
(net (code 14) (name "Net-(D1-Pad2)")
(node (ref PCA9685) (pin 8))
(node (ref D1) (pin 2)))
(net (code 15) (name "Net-(D2-Pad2)")
(node (ref D2) (pin 2))
(node (ref PCA9685) (pin 9)))
(net (code 16) (name "Net-(U1-Pad11)")
(node (ref U1) (pin 11)))
(net (code 17) (name "Net-(U1-Pad22)")
(node (ref U1) (pin 22)))
(net (code 18) (name "Net-(U1-Pad19)")
(node (ref U1) (pin 19)))
(net (code 19) (name "Net-(C5-Pad1)")
(node (ref C5) (pin 1))
(node (ref U1) (pin 20)))
(net (code 20) (name "Net-(C1-Pad1)")
(node (ref U1) (pin 7))
(node (ref C1) (pin 1))
(node (ref XTAL1) (pin 2)))
(net (code 21) (name SCL)
(node (ref U1) (pin 28))
(node (ref R6) (pin 2))
(node (ref P7) (pin 2))
(node (ref PCA9685) (pin 26)))
(net (code 22) (name SDA)
(node (ref P7) (pin 1))
(node (ref PCA9685) (pin 27))
(node (ref U1) (pin 27))
(node (ref R1) (pin 1)))
(net (code 23) (name "Net-(U1-Pad26)")
(node (ref U1) (pin 26)))
(net (code 24) (name "Net-(U1-Pad23)")
(node (ref U1) (pin 23)))
(net (code 25) (name SCK)
(node (ref U1) (pin 17))
(node (ref J1) (pin 3)))
(net (code 26) (name MISO)
(node (ref U1) (pin 16))
(node (ref J1) (pin 1)))
(net (code 27) (name MOSI)
(node (ref U1) (pin 15))
(node (ref J1) (pin 4)))
(net (code 28) (name "Net-(U1-Pad10)")
(node (ref U1) (pin 10)))
(net (code 29) (name "Net-(U1-Pad1)")
(node (ref U1) (pin 1)))
(net (code 30) (name "Net-(C2-Pad1)")
(node (ref C2) (pin 1))
(node (ref XTAL1) (pin 1))
(node (ref U1) (pin 8)))
(net (code 31) (name "Net-(PCA9685-Pad20)")
(node (ref PCA9685) (pin 20)))
(net (code 32) (name "Net-(PCA9685-Pad6)")
(node (ref R2) (pin 1))
(node (ref PCA9685) (pin 6)))
(net (code 33) (name "Net-(PCA9685-Pad25)")
(node (ref PCA9685) (pin 25)))
(net (code 34) (name "Net-(PCA9685-Pad22)")
(node (ref PCA9685) (pin 22)))
(net (code 35) (name "Net-(PCA9685-Pad21)")
(node (ref PCA9685) (pin 21)))
(net (code 36) (name "Net-(PCA9685-Pad7)")
(node (ref R3) (pin 1))
(node (ref PCA9685) (pin 7)))
(net (code 37) (name "Net-(PCA9685-Pad19)")
(node (ref PCA9685) (pin 19)))
(net (code 38) (name "Net-(PCA9685-Pad18)")
(node (ref PCA9685) (pin 18)))
(net (code 39) (name "Net-(PCA9685-Pad17)")
(node (ref PCA9685) (pin 17)))
(net (code 40) (name "Net-(PCA9685-Pad16)")
(node (ref PCA9685) (pin 16)))
(net (code 41) (name "Net-(PCA9685-Pad15)")
(node (ref PCA9685) (pin 15)))
(net (code 42) (name "Net-(PCA9685-Pad13)")
(node (ref PCA9685) (pin 13)))
(net (code 43) (name "Net-(PCA9685-Pad12)")
(node (ref PCA9685) (pin 12)))
(net (code 44) (name "Net-(PCA9685-Pad11)")
(node (ref PCA9685) (pin 11)))
(net (code 45) (name "Net-(PCA9685-Pad10)")
(node (ref PCA9685) (pin 10)))
(net (code 46) (name "Net-(U1-Pad32)")
(node (ref U2) (pin 3))
(node (ref U2) (pin 2))
(node (ref U1) (pin 32)))
(net (code 47) (name "Net-(U1-Pad30)")
(node (ref U1) (pin 30))
(node (ref U2) (pin 1)))
(net (code 48) (name "Net-(Q2-Pad1)")
(node (ref Q2) (pin 1))
(node (ref R3) (pin 2)))
(net (code 49) (name "Net-(P4-Pad1)")
(node (ref P4) (pin 1))
(node (ref Q2) (pin 2)))
(net (code 50) (name "Net-(P4-Pad3)")
(node (ref P4) (pin 3))
(node (ref Q1) (pin 2)))
(net (code 51) (name "Net-(P1-Pad1)")
(node (ref P1) (pin 1))
(node (ref P2) (pin 2))
(node (ref U2) (pin 7)))
(net (code 52) (name "Net-(P1-Pad2)")
(node (ref U2) (pin 6))
(node (ref P1) (pin 2))
(node (ref P2) (pin 1)))
(net (code 53) (name "Net-(U1-Pad31)")
(node (ref U2) (pin 4))
(node (ref U1) (pin 31)))))

40
kicad/Stairs.pro Normal file
View File

@ -0,0 +1,40 @@
update=25-11-2018 18:30:03
version=1
last_client=kicad
[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
[general]
version=1
[eeschema]
version=1
LibDir=
[schematic_editor]
version=1
PageLayoutDescrFile=
PlotDirectoryName=
SubpartIdSeparator=0
SubpartFirstId=65
NetFmtName=
SpiceAjustPassiveValues=0
LabSize=50
ERC_TestSimilarLabels=1

1086
kicad/Stairs.sch Normal file

File diff suppressed because it is too large Load Diff

6
kicad/fp-lib-table Normal file
View File

@ -0,0 +1,6 @@
(fp_lib_table
(lib (name AMS1117-5.0)(type Legacy)(uri ${KIPRJMOD}/libs/AMS1117-5.0.mod)(options "")(descr ""))
(lib (name MAX485)(type Legacy)(uri ${KIPRJMOD}/libs/MAX485.mod)(options "")(descr ""))
(lib (name SMD-BUTTON_4P-5.2X5.2X1.5MM-SKQGAKE010_)(type Legacy)(uri ${KIPRJMOD}/libs/SMD-BUTTON_4P-5.2X5.2X1.5MM-SKQGAKE010_.mod)(options "")(descr ""))
(lib (name MAX485-SO8)(type KiCad)(uri ${KIPRJMOD}/libs/MAX485-SO8.pretty)(options "")(descr ""))
)

View File

@ -0,0 +1,29 @@
EESchema-LIBRARY Version 2.3
#encoding utf-8
#(c) SnapEDA 2016 (snapeda.com)
#This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
#
# AMS1117-5.0
#
DEF AMS1117-5.0 U 0 40 Y Y 1 L N
F0 "U" -400 220 50 H V L BNN
F1 "AMS1117-5.0" -401 -321 50 H V L BNN
F2 "SOT229P700X180-4N" 0 0 50 H I L BNN
F3 "Sot223/Pkg 1-Amp 5-Volt Low Drop Out Voltage Regulatator" 0 0 50 H I L BNN
F4 "Unavailable" 0 0 50 H I L BNN
F5 "Advanced Monolithic Systems" 0 0 50 H I L BNN
F6 "None" 0 0 50 H I L BNN
F7 "None" 0 0 50 H I L BNN
F8 "AMS1117-5.0" 0 0 50 H I L BNN
DRAW
P 2 0 0 10 -400 200 400 200 N
P 2 0 0 10 400 200 400 -200 N
P 2 0 0 10 400 -200 -400 -200 N
P 2 0 0 10 -400 -200 -400 200 N
X VIN 3 -600 100 200 R 40 40 0 0 I
X VOUT 2 600 100 200 L 40 40 0 0 O
X ADJ/GND 1 600 -100 200 L 40 40 0 0 W
ENDDRAW
ENDDEF
#
# End Library

View File

@ -0,0 +1,3 @@
EESchema-DOCLIB Version 2.0
#
#End Doc Library

View File

@ -0,0 +1,24 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# AMS1117-5.0
#
DEF AMS1117-5.0 U 0 40 Y Y 1 L N
F0 "U" -400 220 50 H V L BNN
F1 "AMS1117-5.0" -401 -321 50 H V L BNN
F2 "SOT229P700X180-4N" 0 0 50 H I L BNN
F3 "Sot223/Pkg 1-Amp 5-Volt Low Drop Out Voltage Regulatator" 0 0 50 H I L BNN
F4 "Unavailable" 0 0 50 H I L BNN
F5 "Advanced Monolithic Systems" 0 0 50 H I L BNN
F6 "None" 0 0 50 H I L BNN
F7 "None" 0 0 50 H I L BNN
F8 "AMS1117-5.0" 0 0 50 H I L BNN
DRAW
S -400 200 400 -200 0 1 0 f
X ADJ/GND 1 600 -100 200 L 40 40 0 0 W
X VOUT 2 600 100 200 L 40 40 0 0 O
X VIN 3 -600 100 200 R 40 40 0 0 I
ENDDRAW
ENDDEF
#
#End Library

View File

@ -0,0 +1,73 @@
PCBNEW-LibModule-V1
# encoding utf-8
Units mm
$INDEX
SOT229P700X180-4N
$EndINDEX
$MODULE SOT229P700X180-4N
Po 0 0 0 15 00000000 00000000 ~~
Li SOT229P700X180-4N
Cd
Sc 00000000
At SMD
Op 0 0 0
.SolderMask 0
.SolderPaste 0
T0 -1.15242 -5.14581 1.00211 1.00211 0 0.05 N V 21 "SOT229P700X180-4N"
T1 -0.516467 5.54073 1.00285 1.00285 0 0.05 N V 21 "VAL**"
DS -3.36 1.86 -3.36 -1.86 0.127 24
DS -3.36 -1.86 3.36 -1.86 0.127 24
DS 3.36 -1.86 3.36 1.86 0.127 24
DS 3.36 1.86 -3.36 1.86 0.127 24
DS -3.36 1.86 -3.36 -1.86 0.127 21
DS 3.36 1.86 3.36 -1.86 0.127 21
DS -3.36 1.86 -3.1 1.86 0.127 21
DS 3.11 1.86 3.36 1.86 0.127 21
DS 3.36 -1.86 1.87 -1.86 0.127 21
DS -1.76 -1.86 -3.36 -1.86 0.127 21
DC -2.29 4.373 -2.19 4.373 0.2 21
DS -3.61 -2.11 -3.61 2.11 0.05 26
DS -3.61 2.11 -3.01 2.11 0.05 26
DS -3.01 2.11 -3.01 4.25 0.05 26
DS -3.01 4.25 3.01 4.25 0.05 26
DS 3.01 4.25 3.01 2.11 0.05 26
DS 3.01 2.11 3.61 2.11 0.05 26
DS 3.61 2.11 3.61 -2.11 0.05 26
DS 3.61 -2.11 1.87 -2.11 0.05 26
DS 1.87 -2.11 1.87 -4.25 0.05 26
DS 1.87 -4.25 -1.87 -4.25 0.05 26
DS -1.87 -4.25 -1.87 -2.11 0.05 26
DS -1.87 -2.11 -3.61 -2.11 0.05 26
$PAD
Sh "1" R 0.93 1.31 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po -2.29 3.345
$EndPAD
$PAD
Sh "2" R 0.93 1.31 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 0 3.345
$EndPAD
$PAD
Sh "3" R 0.93 1.31 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 2.29 3.345
$EndPAD
$PAD
Sh "4" R 3.24 1.31 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 0 -3.345
$EndPAD
$EndMODULE SOT229P700X180-4N

View File

@ -0,0 +1,43 @@
(module SO-8 (layer F.Cu) (tedit 5BFB111F)
(descr "8-Lead Plastic Small Outline, 5.3x6.2mm Body (http://www.ti.com.cn/cn/lit/ds/symlink/tl7705a.pdf)")
(tags "SOIC 1.27")
(attr smd)
(fp_text reference REF** (at 0 -4.13) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value SO-8 (at 0 4.13) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -2.75 -2.55) (end -3.7 -2.55) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 3.205) (end 2.75 3.205) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 -3.205) (end 2.75 -3.205) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 3.205) (end -2.75 2.455) (layer F.SilkS) (width 0.15))
(fp_line (start 2.75 3.205) (end 2.75 2.455) (layer F.SilkS) (width 0.15))
(fp_line (start 2.75 -3.205) (end 2.75 -2.455) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 -3.205) (end -2.75 -2.55) (layer F.SilkS) (width 0.15))
(fp_line (start -3.9 3.35) (end 4.83 3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start -3.9 -3.35) (end 3.9 -3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start 3.9 -3.35) (end 3.9 3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start -3.9 -3.35) (end -3.9 3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start -2.65 -2.1) (end -1.65 -3.1) (layer F.Fab) (width 0.15))
(fp_line (start -2.65 3.1) (end -2.65 -2.1) (layer F.Fab) (width 0.15))
(fp_line (start 2.65 3.1) (end -2.65 3.1) (layer F.Fab) (width 0.15))
(fp_line (start 2.65 -3.1) (end 2.65 3.1) (layer F.Fab) (width 0.15))
(fp_line (start -1.65 -3.1) (end 2.65 -3.1) (layer F.Fab) (width 0.15))
(fp_text user %R (at 0 0) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad 8 smd rect (at 3.2 -1.905) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(pad 7 smd rect (at 3.2 -0.635) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(pad 6 smd rect (at 3.2 0.635) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(pad 5 smd rect (at 3.2 1.905) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(pad 4 smd rect (at -3.2 1.905) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(pad 3 smd rect (at -3.2 0.635) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(pad 2 smd rect (at -3.2 -0.635) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(pad 1 smd rect (at -3.2 -1.9) (size 1 0.55) (layers F.Cu F.Paste F.Mask))
(model ${KISYS3DMOD}/Housings_SOIC.3dshapes/SO-8_5.3x6.2mm_Pitch1.27mm.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)

View File

@ -0,0 +1,43 @@
(module Housings_SOIC:SO-8_5.3x6.2mm_Pitch1.27mm (layer F.Cu) (tedit 59920130)
(descr "8-Lead Plastic Small Outline, 5.3x6.2mm Body (http://www.ti.com.cn/cn/lit/ds/symlink/tl7705a.pdf)")
(tags "SOIC 1.27")
(attr smd)
(fp_text reference REF** (at 0 -4.13) (layer F.SilkS)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value SO-8_5.3x6.2mm_Pitch1.27mm (at 0 4.13) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -2.75 -2.55) (end -4.5 -2.55) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 3.205) (end 2.75 3.205) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 -3.205) (end 2.75 -3.205) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 3.205) (end -2.75 2.455) (layer F.SilkS) (width 0.15))
(fp_line (start 2.75 3.205) (end 2.75 2.455) (layer F.SilkS) (width 0.15))
(fp_line (start 2.75 -3.205) (end 2.75 -2.455) (layer F.SilkS) (width 0.15))
(fp_line (start -2.75 -3.205) (end -2.75 -2.55) (layer F.SilkS) (width 0.15))
(fp_line (start -4.83 3.35) (end 4.83 3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start -4.83 -3.35) (end 4.83 -3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start 4.83 -3.35) (end 4.83 3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start -4.83 -3.35) (end -4.83 3.35) (layer F.CrtYd) (width 0.05))
(fp_line (start -2.65 -2.1) (end -1.65 -3.1) (layer F.Fab) (width 0.15))
(fp_line (start -2.65 3.1) (end -2.65 -2.1) (layer F.Fab) (width 0.15))
(fp_line (start 2.65 3.1) (end -2.65 3.1) (layer F.Fab) (width 0.15))
(fp_line (start 2.65 -3.1) (end 2.65 3.1) (layer F.Fab) (width 0.15))
(fp_line (start -1.65 -3.1) (end 2.65 -3.1) (layer F.Fab) (width 0.15))
(fp_text user %R (at 0 0) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad 8 smd rect (at 3.7 -1.905) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(pad 7 smd rect (at 3.7 -0.635) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(pad 6 smd rect (at 3.7 0.635) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(pad 5 smd rect (at 3.7 1.905) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(pad 4 smd rect (at -3.7 1.905) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(pad 3 smd rect (at -3.7 0.635) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(pad 2 smd rect (at -3.7 -0.635) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(pad 1 smd rect (at -3.7 -1.905) (size 1.75 0.55) (layers F.Cu F.Paste F.Mask))
(model ${KISYS3DMOD}/Housings_SOIC.3dshapes/SO-8_5.3x6.2mm_Pitch1.27mm.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)

3
kicad/libs/MAX485.bck Normal file
View File

@ -0,0 +1,3 @@
EESchema-DOCLIB Version 2.0
#
#End Doc Library

3
kicad/libs/MAX485.dcm Normal file
View File

@ -0,0 +1,3 @@
EESchema-DOCLIB Version 2.0
#
#End Doc Library

32
kicad/libs/MAX485.lib Normal file
View File

@ -0,0 +1,32 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# MAX485
#
DEF MAX485 U 0 40 Y Y 1 L N
F0 "U" -401 301 50 H V L BNN
F1 "MAX485" -401 -301 50 H V L BNN
F2 "" 0 0 50 H I C CNN
F3 "Maxim Integrated" 0 0 50 H I L BNN
F4 "None" 0 0 50 H I L BNN
F5 "Unavailable" 0 0 50 H I L BNN
F6 "None" 0 0 50 H I L BNN
F7 "MAX485" 0 0 50 H I L BNN
$FPLIST
DIL08
SO08
$ENDFPLIST
DRAW
S -400 300 400 -200 0 1 0 f
X RO 1 -600 200 200 R 40 40 0 0 B
X RE 2 -600 100 200 R 40 40 0 0 B I
X DE 3 -600 0 200 R 40 40 0 0 B
X DI 4 -600 -100 200 R 40 40 0 0 B
X GND 5 600 -100 200 L 40 40 0 0 W
X A 6 600 0 200 L 40 40 0 0 B
X B 7 600 100 200 L 40 40 0 0 B
X VCC 8 600 200 200 L 40 40 0 0 W
ENDDRAW
ENDDEF
#
#End Library

214
kicad/libs/MAX485.mod Normal file
View File

@ -0,0 +1,214 @@
PCBNEW-LibModule-V1
# encoding utf-8
Units mm
$INDEX
DIL08
SO08
$EndINDEX
$MODULE DIL08
Po 0 0 0 15 00000000 00000000 ~~
Li DIL08
Cd <b>Dual In Line</b>
Sc 00000000
At STD
Op 0 0 0
.SolderMask 0
.SolderPaste 0
T0 -6.35758 1.27152 1.00119 1.00119 900 0.05 N V 21 "DIL08"
T1 5.00698e-06 -2.00279e-06 1.00244 1.00244 0 0.05 N V 21 "VAL**"
DS 5.08 -5.08 -5.08 -5.08 0.1524 21
DS -5.08 5.08 5.08 5.08 0.1524 21
DS 5.08 -5.08 5.08 -2.54 0.1524 21
DS -5.08 -5.08 -5.08 -2.54 0.1524 21
DS -5.08 5.08 -5.08 2.54 0.1524 21
DA -5.08 0 -5.08 -1.016 1800 0.1524 21
DS -5.08 -2.54 5.08 -2.54 0.1524 21
DS -5.08 -2.54 -5.08 -1.016 0.2032 21
DS 5.08 -2.54 5.08 2.54 0.1524 21
DS -5.08 2.54 5.08 2.54 0.1524 21
DS -5.08 2.54 -5.08 1.016 0.1524 21
DS 5.08 2.54 5.08 5.08 0.1524 21
$PAD
Sh "1" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po -3.81 3.81
$EndPAD
$PAD
Sh "2" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po -1.27 3.81
$EndPAD
$PAD
Sh "3" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po 1.27 3.81
$EndPAD
$PAD
Sh "4" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po 3.81 3.81
$EndPAD
$PAD
Sh "5" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po 3.81 -3.81
$EndPAD
$PAD
Sh "6" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po 1.27 -3.81
$EndPAD
$PAD
Sh "7" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po -1.27 -3.81
$EndPAD
$PAD
Sh "8" C 1.6002 1.6002 0 0 0
Dr 0.8128 0 0
At STD N 00C0FFFF
.SolderMask 0
Ne 0 ""
Po -3.81 -3.81
$EndPAD
$EndMODULE DIL08
$MODULE SO08
Po 0 0 0 15 00000000 00000000 ~~
Li SO08
Cd <b>Small Outline Package</b> Fits JEDEC packages (narrow SOIC-8)
Sc 00000000
At SMD
Op 0 0 0
.SolderMask 0
.SolderPaste 0
T0 -0.45744 -0.203305 0.320166 0.320166 0 0.05 N V 21 "SO08"
T1 -0.254561 0.432759 0.32071 0.32071 0 0.05 N V 21 "VAL**"
DS -2.362 1.803 2.362 1.803 0.1524 24
DS 2.362 -1.803 -2.362 -1.803 0.1524 24
DC -1.8034 0.9906 -1.6598 0.9906 0.2032 21
DP 0 0 0 0 4 0 24
Dl -2.08797 1.8542
Dl -1.7272 1.8542
Dl -1.7272 2.87731
Dl -2.08797 2.87731
DP 0 0 0 0 4 0 24
Dl -0.813844 1.8542
Dl -0.4572 1.8542
Dl -0.4572 2.87389
Dl -0.813844 2.87389
DP 0 0 0 0 4 0 24
Dl 0.458097 1.8542
Dl 0.8128 1.8542
Dl 0.8128 2.87584
Dl 0.458097 2.87584
DP 0 0 0 0 4 0 24
Dl 1.72892 1.8542
Dl 2.0828 1.8542
Dl 2.0828 2.87306
Dl 1.72892 2.87306
DP 0 0 0 0 4 0 24
Dl -2.08675 -2.8702
Dl -1.7272 -2.8702
Dl -1.7272 -1.85772
Dl -2.08675 -1.85772
DP 0 0 0 0 4 0 24
Dl -0.813701 -2.8702
Dl -0.4572 -2.8702
Dl -0.4572 -1.85626
Dl -0.813701 -1.85626
DP 0 0 0 0 4 0 24
Dl 0.458322 -2.8702
Dl 0.8128 -2.8702
Dl 0.8128 -1.85875
Dl 0.458322 -1.85875
DP 0 0 0 0 4 0 24
Dl 1.73057 -2.8702
Dl 2.0828 -2.8702
Dl 2.0828 -1.85782
Dl 1.73057 -1.85782
$PAD
Sh "1" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po -1.905 2.6162
$EndPAD
$PAD
Sh "2" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po -0.635 2.6162
$EndPAD
$PAD
Sh "3" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 0.635 2.6162
$EndPAD
$PAD
Sh "4" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 1.905 2.6162
$EndPAD
$PAD
Sh "5" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 1.905 -2.6162
$EndPAD
$PAD
Sh "6" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 0.635 -2.6162
$EndPAD
$PAD
Sh "7" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po -0.635 -2.6162
$EndPAD
$PAD
Sh "8" R 0.6096 2.2098 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po -1.905 -2.6162
$EndPAD
$EndMODULE SO08

View File

@ -0,0 +1,43 @@
EESchema-LIBRARY Version 2.2 Date: 04/05/2014-04:12:59
#
# PCA9685-TSSOP
#
DEF PCA9685-TSSOP U 0 40 Y Y 1 0 N
F0 "U" 0 -100 50 H V C C
F1 "PCA9685-TSSOP" 0 100 50 H V C C
F2 "MODULE" 0 0 50 H I C C
F3 "DOCUMENTATION" 0 0 50 H I C C
DRAW
S -450 -850 450 850 1 0 0 N
X A0 1 -750 650 300 R 50 50 1 1 I
X A1 2 -750 550 300 R 50 50 1 1 I
X A2 3 -750 450 300 R 50 50 1 1 I
X A3 4 -750 350 300 R 50 50 1 1 I
X A4 5 -750 250 300 R 50 50 1 1 I
X LED0 6 -750 150 300 R 50 50 1 1 O
X LED1 7 -750 50 300 R 50 50 1 1 O
X LED2 8 -750 -50 300 R 50 50 1 1 O
X LED3 9 -750 -150 300 R 50 50 1 1 O
X LED4 10 -750 -250 300 R 50 50 1 1 O
X LED5 11 -750 -350 300 R 50 50 1 1 O
X LED6 12 -750 -450 300 R 50 50 1 1 O
X LED7 13 -750 -550 300 R 50 50 1 1 O
X GND 14 -750 -650 300 R 50 50 1 1 I
X LED8 15 750 -650 300 L 50 50 1 1 O
X LED9 16 750 -550 300 L 50 50 1 1 O
X LED10 17 750 -450 300 L 50 50 1 1 O
X LED11 18 750 -350 300 L 50 50 1 1 O
X LED12 19 750 -250 300 L 50 50 1 1 O
X LED13 20 750 -150 300 L 50 50 1 1 O
X LED14 21 750 -50 300 L 50 50 1 1 O
X LED15 22 750 50 300 L 50 50 1 1 O
X OE 23 750 150 300 L 50 50 1 1 I
X A5 24 750 250 300 L 50 50 1 1 I
X EXTCLK 25 750 350 300 L 50 50 1 1 I
X SCL 26 750 450 300 L 50 50 1 1 I
X SDA 27 750 550 300 L 50 50 1 1 B
X VCC 28 750 650 300 L 50 50 1 1 I
ENDDRAW
ENDDEF
#
#End Library

View File

@ -0,0 +1,3 @@
EESchema-DOCLIB Version 2.0
#
#End Doc Library

View File

@ -0,0 +1,44 @@
EESchema-LIBRARY Version 2.4
#encoding utf-8
#
# PCA9685-TSSOP
#
DEF PCA9685-TSSOP U 0 40 Y Y 1 F N
F0 "U" 0 -100 50 H V C CNN
F1 "PCA9685-TSSOP" 0 100 50 H V C CNN
F2 "MODULE" 0 0 50 H I C CNN
F3 "DOCUMENTATION" 0 0 50 H I C CNN
DRAW
S -450 -850 450 850 1 0 0 f
X A0 1 -750 650 300 R 50 50 1 1 I
X LED4 10 -750 -250 300 R 50 50 1 1 O
X LED5 11 -750 -350 300 R 50 50 1 1 O
X LED6 12 -750 -450 300 R 50 50 1 1 O
X LED7 13 -750 -550 300 R 50 50 1 1 O
X GND 14 -750 -650 300 R 50 50 1 1 I
X LED8 15 750 -650 300 L 50 50 1 1 O
X LED9 16 750 -550 300 L 50 50 1 1 O
X LED10 17 750 -450 300 L 50 50 1 1 O
X LED11 18 750 -350 300 L 50 50 1 1 O
X LED12 19 750 -250 300 L 50 50 1 1 O
X A1 2 -750 550 300 R 50 50 1 1 I
X LED13 20 750 -150 300 L 50 50 1 1 O
X LED14 21 750 -50 300 L 50 50 1 1 O
X LED15 22 750 50 300 L 50 50 1 1 O
X OE 23 750 150 300 L 50 50 1 1 I
X A5 24 750 250 300 L 50 50 1 1 I
X EXTCLK 25 750 350 300 L 50 50 1 1 I
X SCL 26 750 450 300 L 50 50 1 1 I
X SDA 27 750 550 300 L 50 50 1 1 B
X VCC 28 750 650 300 L 50 50 1 1 I
X A2 3 -750 450 300 R 50 50 1 1 I
X A3 4 -750 350 300 R 50 50 1 1 I
X A4 5 -750 250 300 R 50 50 1 1 I
X LED0 6 -750 150 300 R 50 50 1 1 O
X LED1 7 -750 50 300 R 50 50 1 1 O
X LED2 8 -750 -50 300 R 50 50 1 1 O
X LED3 9 -750 -150 300 R 50 50 1 1 O
ENDDRAW
ENDDEF
#
#End Library

View File

@ -0,0 +1,47 @@
EESchema-LIBRARY Version 2.3
#encoding utf-8
#(c) SnapEDA 2016 (snapeda.com)
#This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA) with Design Exception 1.0
#
# SMD-BUTTON(4P-5.2X5.2X1.5MM-SKQGAKE010)
#
DEF SMD-BUTTON(4P-5.2X5.2X1.5MM-SKQGAKE010) SW 0 40 Y Y 1 L N
F0 "SW" -201 201 50 H V L BNN
F1 "SMD-BUTTON(4P-5.2X5.2X1.5MM-SKQGAKE010)" -200 -250 50 H V L BNN
F2 "SW4-SMD-5.2X5.2X1.5MM" 0 0 50 H I L BNN
F3 "None" 0 0 50 H I L BNN
F4 "SKQGAKE010" 0 0 50 H I L BNN
F5 "None" 0 0 50 H I L BNN
F6 "Unavailable" 0 0 50 H I L BNN
F7 "ALPS" 0 0 50 H I L BNN
F8 "Switch Tactile N.O. SPST Button Gull Wing 0.05A 12VDC 3.43N SMD T/R" 0 0 50 H I L BNN
DRAW
P 2 0 0 10 -200 200 200 200 N
P 2 0 0 10 200 200 200 100 N
P 2 0 0 10 200 100 200 -100 N
P 2 0 0 10 200 -100 200 -200 N
P 2 0 0 10 200 -200 -200 -200 N
P 2 0 0 10 -200 -200 -200 -100 N
P 2 0 0 10 -200 -100 -200 100 N
P 2 0 0 10 -200 100 -200 200 N
P 2 0 0 6 -200 100 0 100 N
P 2 0 0 6 0 100 200 100 N
P 2 0 0 6 0 100 0 50 N
P 2 0 0 6 0 50 -50 -30 N
P 2 0 0 6 0 -50 0 -100 N
P 2 0 0 6 0 -100 200 -100 N
P 2 0 0 6 0 -100 -200 -100 N
P 2 0 0 6 -250 100 -200 100 N
P 2 0 0 6 -250 -100 -200 -100 N
P 2 0 0 6 250 -100 200 -100 N
P 2 0 0 6 250 100 200 100 N
C -50 -30 6 0 0 0 N
C 0 -50 6 0 0 0 N
X A0 1 -350 100 100 R 40 40 0 0 B
X A1 2 350 100 100 L 40 40 0 0 B
X B0 3 -350 -100 100 R 40 40 0 0 B
X B1 4 350 -100 100 L 40 40 0 0 B
ENDDRAW
ENDDEF
#
# End Library

View File

@ -0,0 +1,67 @@
PCBNEW-LibModule-V1
# encoding utf-8
Units mm
$INDEX
SW4-SMD-5.2X5.2X1.5MM
$EndINDEX
$MODULE SW4-SMD-5.2X5.2X1.5MM
Po 0 0 0 15 00000000 00000000 ~~
Li SW4-SMD-5.2X5.2X1.5MM
Cd
Sc 00000000
At SMD
Op 0 0 0
.SolderMask 0
.SolderPaste 0
T0 -0.523383 -3.25313 0.701862 0.701862 0 0.05 N V 21 "SW4-SMD-5.2X5.2X1.5MM"
T1 -0.112861 -0.218191 0.501589 0.501589 0 0.05 N V 21 "VAL**"
DS 2.6 1.46863 1.46863 2.6 0.127 24
DS 1.5 2.6 -1.1 2.6 0.127 21
DS -1.1 2.6 -1.45982 2.6 0.127 21
DS -1.45982 2.6 -2.6 1.45982 0.127 24
DS -2.6 -1.39584 -1.39584 -2.6 0.127 24
DS -1.4 -2.6 1.5 -2.6 0.127 21
DS 1.43381 -2.6 2.6 -1.43381 0.127 24
DP 0 0 0 0 4 0 26
Dl -2.50464 -2.6
Dl 2.6 -2.6
Dl 2.6 2.60484
Dl -2.50464 2.60484
DS -1.4 -2.6 -2.4 -1.6 0.127 21
DS 1.5 -2.6 2.4 -1.7 0.127 21
DS 1.5 2.6 2.4 1.7 0.127 21
DS -1.45982 2.6 -1.5 2.6 0.127 21
DS -1.5 2.6 -2.4 1.7 0.127 21
$PAD
Sh "1" R 1 0.7 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po -3 -1.85
$EndPAD
$PAD
Sh "2" R 1 0.7 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 3 -1.85
$EndPAD
$PAD
Sh "3" R 1 0.7 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po -3 1.85
$EndPAD
$PAD
Sh "4" R 1 0.7 0 0 0
At SMD N 00888000
.SolderMask 0
.SolderPaste 0
Ne 0 ""
Po 3 1.85
$EndPAD
$EndMODULE SW4-SMD-5.2X5.2X1.5MM

6
kicad/sym-lib-table Normal file
View File

@ -0,0 +1,6 @@
(sym_lib_table
(lib (name PCA9685-TSSOP)(type Legacy)(uri ${KIPRJMOD}/libs/PCA9685-TSSOP.lib)(options "")(descr ""))
(lib (name MAX485)(type Legacy)(uri ${KIPRJMOD}/libs/MAX485.lib)(options "")(descr ""))
(lib (name AMS1117-5.0)(type Legacy)(uri ${KIPRJMOD}/libs/AMS1117-5.0.lib)(options "")(descr ""))
(lib (name SMD-BUTTON_4P-5.2X5.2X1.5MM-SKQGAKE010_)(type Legacy)(uri ${KIPRJMOD}/libs/SMD-BUTTON_4P-5.2X5.2X1.5MM-SKQGAKE010_.lib)(options "")(descr ""))
)

1
module/build.bat Normal file
View File

@ -0,0 +1 @@
@pio run

7
module/fuses.bat Normal file
View File

@ -0,0 +1,7 @@
@Echo Off
REM Internal 8 Mhz oscillator, no clock division
REM http://www.engbedded.com/fusecalc/
REM avrdude -c usbtiny -p m328p -e -U lfuse:w:0xE2:m -U hfuse:w:0xd9:m -U efuse:w:0x07:m
REM External 8+ Mhz oscillator, no clock division
avrdude -c usbtiny -p m328p -e -U lfuse:w:0xcf:m -U hfuse:w:0xd9:m -U efuse:w:0x07:m

View File

@ -0,0 +1,283 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#include <RS485_non_blocking.h>
#include <SoftwareSerial.h>
#define SERIAL_COMMANDS_DEBUG
#include <SerialCommands.h>
#include "protocol.h"
const uint8_t PinRS485Receive = 2;
const uint8_t PinRS485Transmit = 3;
const uint8_t PinRS485WriteEnable = 4;
const uint32_t RS485BaudRate = 76800;
/*
* RS485 communication
*/
SoftwareSerial rs485(PinRS485Receive, PinRS485Transmit);
size_t doWrite(const byte what)
{
return rs485.write (what);
}
int doAvailable()
{
return rs485.available ();
}
int doRead()
{
return rs485.read ();
}
RS485 comm(doRead, doAvailable, doWrite, 20);
/*
* Serial communication (user input)
*/
SerialCommand cmdPing("ping", handlePingCommand);
SerialCommand cmdDisplay("display", handleDisplayCommand);
SerialCommand cmdLink("link", handleLinkCommand);
SerialCommand cmdLinkAssign("assign", handleLinkAssignCommand);
SerialCommand cmdLinkStop("stop", handleLinkStopCommand);
SerialCommand cmdSetPWM("setPWM", handlesetPWMCommand);
SerialCommand cmdGetSensors("getSensors", handlegetSensorsCommand);
char commandBuffer[32];
SerialCommands serialCommands(&Serial, commandBuffer, sizeof(commandBuffer), "\r\n", " ");
void cmdUnrecognized(SerialCommands* sender, const char* cmd)
{
sender->GetSerial()->print("ERROR: Unrecognized command [");
sender->GetSerial()->print(cmd);
sender->GetSerial()->println("]");
}
bool inLink = false;
void showCommands()
{
Serial.println("");
Serial.println("Available commands:");
Serial.println(" ping [moduleIndex]");
Serial.println(" display");
Serial.println(" link");
Serial.println(" setPWM [moduleIndex] [flags] [value1] [value2]");
Serial.println(" getSensors [moduleIndex]");
Serial.println("");
}
void setup()
{
pinMode(PinRS485WriteEnable, OUTPUT);
rs485.begin(RS485BaudRate);
comm.begin();
Serial.begin(115200);
serialCommands.AddCommand(&cmdPing);
serialCommands.AddCommand(&cmdDisplay);
serialCommands.AddCommand(&cmdLink);
serialCommands.AddCommand(&cmdLinkAssign);
serialCommands.AddCommand(&cmdLinkStop);
serialCommands.AddCommand(&cmdSetPWM);
serialCommands.AddCommand(&cmdGetSensors);
serialCommands.SetDefaultHandler(&cmdUnrecognized);
Serial.println("Stairs module Mock Master ready");
showCommands();
}
void loop ()
{
serialCommands.ReadSerial();
if (comm.update())
handleCommMessage();
}
void sendCommMessage(const byte* data, size_t len)
{
Serial.print("Raw out: ");
byte* ptr = data;
for (size_t i = 0; i < len; i++, ptr++)
{
Serial.print(*ptr, HEX);
Serial.print(' ');
}
Serial.println("");
digitalWrite(PinRS485WriteEnable, HIGH);
comm.sendMsg(data, len);
digitalWrite(PinRS485WriteEnable, LOW);
}
void handlePingCommand(SerialCommands* sender)
{
if (inLink) return;
int moduleIndex = atoi(sender->Next());
sender->GetSerial()->println("> Ping");
const byte msg[] = { CommandPing, moduleIndex };
sendCommMessage(msg, sizeof(msg));
}
void handleDisplayCommand(SerialCommands* sender)
{
if (inLink) return;
sender->GetSerial()->println("> DisplayModuleIndex");
const byte msg[] = { CommandDisplayModuleIndex };
sendCommMessage(msg, sizeof(msg));
}
void handleLinkCommand(SerialCommands* sender)
{
if (inLink) return;
sender->GetSerial()->println("> Link");
const byte msg[] = { CommandStartLink };
sendCommMessage(msg, sizeof(msg));
sender->GetSerial()->println("");
sender->GetSerial()->println("Available commands:");
sender->GetSerial()->println(" assign [moduleIndex]");
sender->GetSerial()->println(" stop");
sender->GetSerial()->println("");
inLink = true;
}
void handleLinkAssignCommand(SerialCommands* sender)
{
if (!inLink) return;
int moduleIndex = atoi(sender->Next());
sender->GetSerial()->println("> LinkRequest response");
const byte msg[] = { ResponseRequestLink, moduleIndex };
sendCommMessage(msg, sizeof(msg));
}
void handleLinkStopCommand(SerialCommands* sender)
{
if (!inLink) return;
sender->GetSerial()->println("> StopLink");
const byte msg[] = { CommandStopLink };
sendCommMessage(msg, sizeof(msg));
inLink = false;
showCommands();
}
void handlesetPWMCommand(SerialCommands* sender)
{
if (inLink) return;
int moduleIndex = atoi(sender->Next());
int flags = atoi(sender->Next());
int value1 = atoi(sender->Next());
int value2 = atoi(sender->Next());
sender->GetSerial()->println("> SetPWM");
const byte msg[] = { CommandSetPWM, moduleIndex, flags, lowByte(value1), highByte(value1), lowByte(value2), highByte(value2) };
sendCommMessage(msg, sizeof(msg));
}
void handlegetSensorsCommand(SerialCommands* sender)
{
if (inLink) return;
int moduleIndex = atoi(sender->Next());
sender->GetSerial()->println("> GetSensors");
const byte msg[] = { CommandGetSensors, moduleIndex };
sendCommMessage(msg, sizeof(msg));
}
void handleCommMessage()
{
uint8_t* data = comm.getData();
uint8_t length = comm.getLength();
Serial.print("Raw in: ");
byte* ptr = data;
for (size_t i = 0; i < length; i++, ptr++)
{
Serial.print(*ptr, HEX);
Serial.print(' ');
}
Serial.println("");
if (length == 0)
return;
uint8_t command = *data; data++; length--;
switch (command)
{
case ResponsePing:
if (length > 0)
Serial.println("< Ping response, module index = " + String(*data));
else
Serial.println("< Ping response, module index = <missing>");
break;
case CommandRequestLink:
Serial.println("< Request link");
break;
case ResponseSetPWM:
Serial.println("< Set PWM response, module index = " + String(*data));
break;
case ResponseGetSensors:
Serial.println("< Get sensors response, module index = " + String(*data)); data++; length--;
if (length >= 2)
{
Serial.println(" Sensor 1 value: " + String(*reinterpret_cast<uint16_t*>(data))); data+=2; length-=2;
}
else
Serial.println(" Sensor 1 value: <missing>");
if (length >= 2)
{
Serial.println(" Sensor 2 value: " + String(*reinterpret_cast<uint16_t*>(data))); data+=2; length-=2;
}
else
Serial.println(" Sensor 2 value: <missing>");
break;
case ResponseUhmWhat:
Serial.println("< Uhm, what? module index = " + String(*data));
break;
}
}

View File

@ -0,0 +1,155 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __protocol
#define __protocol
#include <stdint.h>
/*
* There are three classes of messages, these masks provide a way to identify
* unknown messages if the protocol ever changes.
*
* MaskBroadcastCommand: commands which do not expect a response
* MaskModuleCommand: commands which do expect a command. respond with ResponseUhmWhat to satisfy the response requirement.
* MaskResponse: responses to commands
*/
const uint8_t MaskMessageType = 0b11000000;
const uint8_t MaskBroadcastCommand = 0b10000000;
const uint8_t MaskModuleCommand = 0b11000000;
const uint8_t MaskResponse = 0b01000000;
const uint8_t ResponseUhmWhat = 0x00 | MaskResponse;
/*
* Ping:
* Aimed at a specific module, which must respond with a
* ResponsePing message.
*
* Request:
* [0] CommandPing
* [1] Module index
*
* Response:
* [0] ResponsePing
* [1] Module index
*/
const uint8_t BasePing = 0x01;
const uint8_t CommandPing = BasePing | MaskModuleCommand;
const uint8_t ResponsePing = BasePing | MaskResponse;
/*
* Display module index:
* Broadcast to all modules which should turn on their display
* and show the current settings. No response is expected.
*
* Request:
* [0] CommandDisplayModuleIndex
*/
const uint8_t CommandDisplayModuleIndex = 0x02 | MaskBroadcastCommand;
/*
* Start linking:
* Broadcast to all modules which should change to link mode.
* During link mode the master will disable all other communication,
* allowing the module to respond at will in response to user input.
*
* Each module should send a CommandRequestLink message when user input
* is provided.
*
* Request:
* [0] CommandStartLink
*
* Response (eventually):
* See CommandRequestLink
*/
const uint8_t CommandStartLink = 0x10 | MaskBroadcastCommand;
/*
* Request link:
* Sent by a module when user input is provided to link this module
* as the next in line. All other modules should disable sending this
* message until the currently requesting module receives a response.
*
* The master must respond with the new module index, which the
* module must apply and store immediately.
*
* Request:
* [0] CommandRequestLink
*
* Response:
* [0] ResponseRequestLink
* [1] New module index
*/
const uint8_t BaseRequestLink = 0x11;
const uint8_t CommandRequestLink = BaseRequestLink | MaskBroadcastCommand;
const uint8_t ResponseRequestLink = BaseRequestLink | MaskResponse;
/*
* Stop linking:
* Broadcast to all modules when the master takes back control
* over the communication line. No response is expected.
*
* Request:
* [0] CommandStopLink
*/
const uint8_t CommandStopLink = 0x12 | MaskBroadcastCommand;
/*
* Set PWM value:
* Aimed at a specific module, which must apply the specified
* PWM values to the LED strips and respond with a
* ResponseSetPWM message.
*
* Request:
* [0] CommandSetPWM
* [1] Module index
* [2] Flags, see below
* [3,4] PWM value for step 1 (0-4095, uint16_t)
* [5,6] PWM value for step 2 (0-4095, uint16_t)
*
* Response:
* [0] ResponseSetPWM
* [1] Module index
*/
const uint8_t BaseSetPWM = 0x20;
const uint8_t CommandSetPWM = BaseSetPWM | MaskModuleCommand;
const uint8_t ResponseSetPWM = BaseSetPWM | MaskResponse;
// If included, the on-board verification LEDs should light up with
// the specified PWM values as well. Otherwise they should be off.
const uint8_t SetPWMFlagModuleLEDs = 0x01;
/*
* Get sensor values:
* Aimed at a specific module, which must response with a
* ResponseGetSensors message containing the current sensor states.
*
* Request:
* [0] CommandGetSensors
* [1] Module index
*
* Response:
* [0] ResponseGetSensors
* [1] Module index
* [2] Analog (0-255) or digital (0, 255) value for sensor 1
* [3] Analog (0-255) or digital (0, 255) value for sensor 2
*/
const uint8_t BaseGetSensors = 0x30;
const uint8_t CommandGetSensors = BaseGetSensors | MaskModuleCommand;
const uint8_t ResponseGetSensors = BaseGetSensors | MaskResponse;
#endif

24
module/platformio.ini Normal file
View File

@ -0,0 +1,24 @@
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[platformio]
env_default = board
[env:board]
platform = atmelavr
framework = arduino
board = 328p8m
board_build.f_cpu = 16000000L
upload_speed = 115200
upload_protocol = usbtiny
lib_deps =
Adafruit GFX Library
Adafruit PWM Servo Driver Library

BIN
module/res/CommIcon.psd Normal file

Binary file not shown.

BIN
module/res/WaitCursor.psd Normal file

Binary file not shown.

50
module/src/config.h Normal file
View File

@ -0,0 +1,50 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __config
#define __config
#include <stdint.h>
// Baud rate for the RS485 communication
// At 16 Mhz we pick a baud rate with a very acceptable 0.2% error rate
// Source: http://www.robotroom.com/Asynchronous-Serial-Communication-2.html
const uint32_t CommBaudRate = 76800;
// Arduino pin number connected to the MAX485's Receiver and Driver Output Enable pins
const uint8_t CommWriteEnablePin = 2;
// How long since the last packet before the communication icon shows
// as 'off'. Note that if a module is not configured for sensors and
// the light doesn't change either there will be no communication,
// so no need to panic immediately.
const uint32_t CommIdleTimeout = 1000;
// How long the display should stay on once it's idle and showing the
// current step numbers.
const uint32_t DisplayIdleTimeout = 5000;
// I2C address of the PCA9685 PWM driver
const uint8_t PWMDriverAddress = 0x40;
// Frequency of the PCA9685 PWM driver
const uint16_t PWMDriverFrequency = 1600;
// Arduino analog pin number connected to the sensors
const uint8_t PinSensor1 = 1;
const uint8_t PinSensor2 = 2;
// Arduino digital pin number connected to the push button.
const uint8_t PinButton = 8;
// Debounce time for the push button. Since it is not used for fast operations, this can be relatively high.
const uint32_t ButtonDebounceTime = 500;
#endif

257
module/src/display.cpp Normal file
View File

@ -0,0 +1,257 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#include "display.h"
#include <Fonts/FreeSans12pt7b.h>
#include "config.h"
#include "icons.h"
#include "global.h"
const uint8_t WaitAnimationInterval = 150;
void Display::init()
{
mDisplay = new Adafruit_SSD1306(128, 32, &Wire, -1);
mDisplay->begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void Display::update()
{
// TODO invalidate when comm state changes
switch (state)
{
case State::WaitingForComm:
drawWaitingForComm();
break;
case State::Linking:
case State::LinkingRequest:
drawLinking();
break;
case State::LinkingSet:
drawModuleIndex();
break;
case State::DisplayModuleIndex:
if (mLastDrawnState == state && currentTime - mLastStateChange >= DisplayIdleTimeout)
{
state = State::DisplayOff;
off();
}
else
drawModuleIndex();
break;
case State::DisplayOff:
off();
break;
}
setLastDrawnState();
}
void Display::drawWaitingForComm()
{
if (mLastDrawnState == State::WaitingForComm && currentTime - mLastWaiting < WaitAnimationInterval)
return;
checkOn();
mDisplay->clearDisplay();
drawTitle("Waiting for signal");
uint8_t xOffset = (mWaitAnimationStep == 1 || mWaitAnimationStep == 2) ? WaitCursorSegmentWidth : 0;
uint8_t yOffset = (mWaitAnimationStep == 2 || mWaitAnimationStep == 3) ? WaitCursorSegmentHeight : 0;
drawRotatedBitmap(xOffset, mDisplay->height() - (WaitCursorSegmentHeight * 2) + yOffset, WaitCursorSegment, WaitCursorSegmentWidth, WaitCursorSegmentHeight, mWaitAnimationStep);
mDisplay->display();
mWaitAnimationStep++;
if (mWaitAnimationStep > 3)
mWaitAnimationStep = 0;
mLastWaiting = currentTime;
}
void Display::drawModuleIndex()
{
uint8_t moduleIndex = settings.getModuleIndex();
if (mLastDrawnState == State::DisplayModuleIndex && mLastModuleIndex == moduleIndex)
return;
checkOn();
mDisplay->clearDisplay();
drawTitle("Steps");
drawCommIcon();
mDisplay->setFont(&FreeSans12pt7b);
mDisplay->setCursor(0, mDisplay->height() - 1);
if (moduleIndex == ModuleIndexUndefined)
{
mDisplay->print("Not set");
}
else
{
uint8_t firstStep = (moduleIndex * 2) + 1;
mDisplay->print(firstStep);
mDisplay->print(" - ");
mDisplay->print(firstStep + 1);
}
mDisplay->display();
}
void Display::drawLinking()
{
if (mLastDrawnState == State::Linking)
return;
checkOn();
mDisplay->clearDisplay();
drawTitle("Steps");
drawCommIcon();
mDisplay->setFont(&FreeSans12pt7b);
mDisplay->setCursor(0, mDisplay->height() - 1);
mDisplay->print("Click to set");
mDisplay->display();
}
void Display::setLastDrawnState()
{
if (state != mLastDrawnState)
{
mLastDrawnState = state;
mLastStateChange = currentTime;
}
}
void Display::off()
{
if (mLastDrawnState != State::DisplayOff)
{
// I've had trouble waking the display up again, so just clear it for now
mDisplay->ssd1306_command(SSD1306_DISPLAYOFF);
mDisplay->ssd1306_command(SSD1306_CHARGEPUMP);
mDisplay->ssd1306_command(0x10); // disable charge pump
//mDisplay->clearDisplay();
//mDisplay->display();
}
}
void Display::checkOn()
{
if (mLastDrawnState == State::DisplayOff)
{
mDisplay->ssd1306_command(SSD1306_CHARGEPUMP);
mDisplay->ssd1306_command(0x14); // enable charge pump
mDisplay->ssd1306_command(SSD1306_DISPLAYON);
}
}
void Display::drawTitle(const char* title)
{
mDisplay->setTextSize(1);
mDisplay->setTextColor(WHITE);
mDisplay->setFont(NULL);
mDisplay->setCursor(0, 0);
mDisplay->print(title);
}
void Display::drawCommIcon()
{
mDisplay->drawBitmap(mDisplay->width() - IconCommWidth, 0,
currentTime - comm.getPacketStartTime() <= CommIdleTimeout ? IconCommOn : IconCommOff,
IconCommWidth, IconCommHeight, 1);
}
typedef void (*WritePixelProc)(Adafruit_SSD1306* display, int8_t boundsX, int8_t boundsY, int8_t boundsW, int8_t boundsH, int8_t relativeX, int8_t relativeY);
void writePixel0(Adafruit_SSD1306* display, int8_t boundsX, int8_t boundsY, int8_t boundsW, int8_t boundsH, int8_t relativeX, int8_t relativeY)
{
display->writePixel(boundsX + relativeX, boundsY + relativeY, 1);
}
void writePixel90(Adafruit_SSD1306* display, int8_t boundsX, int8_t boundsY, int8_t boundsW, int8_t boundsH, int8_t relativeX, int8_t relativeY)
{
display->writePixel(boundsX + boundsW - relativeY, boundsY + relativeX, 1);
}
void writePixel180(Adafruit_SSD1306* display, int8_t boundsX, int8_t boundsY, int8_t boundsW, int8_t boundsH, int8_t relativeX, int8_t relativeY)
{
display->writePixel(boundsX + boundsW - relativeX, boundsY + boundsH - relativeY, 1);
}
void writePixel270(Adafruit_SSD1306* display, int8_t boundsX, int8_t boundsY, int8_t boundsW, int8_t boundsH, int8_t relativeX, int8_t relativeY)
{
display->writePixel(boundsX + relativeY, boundsY + boundsH - relativeX, 1);
}
void Display::drawRotatedBitmap(int8_t x, int8_t y, const uint8_t bitmap[], int8_t w, int8_t h, uint8_t rotation)
{
int16_t byteWidth = (w + 7) / 8;
int8_t byte = 0;
mDisplay->startWrite();
WritePixelProc writePixel;
switch (rotation)
{
case 1: // 90 degrees
writePixel = writePixel90;
break;
case 2: // 180 degrees
writePixel = writePixel180;
break;
case 3: // 270 degrees
writePixel = writePixel270;
break;
default: // 0 degrees
writePixel = writePixel0;
break;
}
for(int8_t relativeY = 0; relativeY < h; relativeY++)
{
for(int8_t relativeX = 0; relativeX < w; relativeX++)
{
if(relativeX & 7)
byte <<= 1;
else
byte = pgm_read_byte(&bitmap[relativeY * byteWidth + relativeX / 8]);
if (byte & 0x80)
writePixel(mDisplay, x, y, w, h, relativeX, relativeY);
}
}
mDisplay->endWrite();
}

44
module/src/display.h Normal file
View File

@ -0,0 +1,44 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __display
#define __display
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include "lib/Adafruit_SSD1306.h"
#include "state.h"
class Display
{
private:
Adafruit_SSD1306* mDisplay;
State mLastDrawnState = State::DisplayOff;
uint32_t mLastStateChange;
uint8_t mLastModuleIndex;
uint32_t mLastWaiting;
uint8_t mWaitAnimationStep = 0;
void drawRotatedBitmap(int8_t x, int8_t y, const uint8_t bitmap[], int8_t w, int8_t h, uint8_t rotation);
void checkOn();
void drawTitle(const char* title);
void drawCommIcon();
void drawWaitingForComm();
void drawModuleIndex();
void drawLinking();
void off();
void setLastDrawnState();
public:
void init();
void update();
};
#endif

32
module/src/global.cpp Normal file
View File

@ -0,0 +1,32 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#include "global.h"
#include "config.h"
int serialRead()
{
return Serial.read();
}
int serialAvailable()
{
return Serial.available();
}
size_t serialWrite(const byte what)
{
return Serial.write(what);
}
Settings settings;
Display display;
RS485 comm(serialRead, serialAvailable, serialWrite, 20);
Adafruit_PWMServoDriver pwmDriver(PWMDriverAddress);
State state = State::WaitingForComm;
uint32_t currentTime;

23
module/src/global.h Normal file
View File

@ -0,0 +1,23 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __global
#define __global
#include "lib/RS485_non_blocking.h"
#include "Adafruit_PWMServoDriver.h"
#include "settings.h"
#include "display.h"
#include "state.h"
extern Settings settings;
extern Display display;
extern RS485 comm;
extern Adafruit_PWMServoDriver pwmDriver;
extern State state;
extern uint32_t currentTime;
#endif

28
module/src/icons.h Normal file
View File

@ -0,0 +1,28 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
// http://javl.github.io/image2cpp/
// Draw mode: horizontal
const uint8_t IconCommWidth = 12;
const uint8_t IconCommHeight = 8;
const uint8_t PROGMEM IconCommOff[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t PROGMEM IconCommOn[] = {
0x40, 0x20, 0x40, 0x20, 0x90, 0x90, 0xa6, 0x50, 0xa6, 0x50, 0x90, 0x90, 0x40, 0x20, 0x40, 0x20
};
const uint8_t WaitCursorSegmentWidth = 10;
const uint8_t WaitCursorSegmentHeight = 10;
const uint8_t PROGMEM WaitCursorSegment[] = {
0x07, 0x80, 0x1f, 0x80, 0x3e, 0x00, 0x78, 0x00, 0x70, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xc0, 0x00,
0xc0, 0x00, 0x00, 0x00
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,185 @@
/*!
* @file Adafruit_SSD1306.h
*
* This is part of for Adafruit's SSD1306 library for monochrome
* OLED displays: http://www.adafruit.com/category/63_98
*
* These displays use I2C or SPI to communicate. I2C requires 2 pins
* (SCL+SDA) and optionally a RESET pin. SPI requires 4 pins (MOSI, SCK,
* select, data/command) and optionally a reset pin. Hardware SPI or
* 'bitbang' software SPI are both supported.
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Written by Limor Fried/Ladyada for Adafruit Industries, with
* contributions from the open source community.
*
* BSD license, all text above, and the splash screen header file,
* must be included in any redistribution.
*
*/
/*
Modifications for Stairs project:
- Removed the Adafruit splash screen. I'm not going to show it anyways, so all it
does is take up valuable program space.
*/
#ifndef _Adafruit_SSD1306_H_
#define _Adafruit_SSD1306_H_
// ONE of the following three lines must be #defined:
//#define SSD1306_128_64 ///< DEPRECTAED: old way to specify 128x64 screen
#define SSD1306_128_32 ///< DEPRECATED: old way to specify 128x32 screen
//#define SSD1306_96_16 ///< DEPRECATED: old way to specify 96x16 screen
// This establishes the screen dimensions in old Adafruit_SSD1306 sketches
// (NEW CODE SHOULD IGNORE THIS, USE THE CONSTRUCTORS THAT ACCEPT WIDTH
// AND HEIGHT ARGUMENTS).
#if defined(ARDUINO_STM32_FEATHER)
typedef class HardwareSPI SPIClass;
#endif
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#if defined(__AVR__)
typedef volatile uint8_t PortReg;
typedef uint8_t PortMask;
#define HAVE_PORTREG
#elif defined(__SAM3X8E__)
typedef volatile RwReg PortReg;
typedef uint32_t PortMask;
#define HAVE_PORTREG
#elif defined(__arm__) || defined(ARDUINO_FEATHER52)
typedef volatile uint32_t PortReg;
typedef uint32_t PortMask;
#define HAVE_PORTREG
#endif
#define BLACK 0 ///< Draw 'off' pixels
#define WHITE 1 ///< Draw 'on' pixels
#define INVERSE 2 ///< Invert pixels
#define SSD1306_MEMORYMODE 0x20 ///< See datasheet
#define SSD1306_COLUMNADDR 0x21 ///< See datasheet
#define SSD1306_PAGEADDR 0x22 ///< See datasheet
#define SSD1306_SETCONTRAST 0x81 ///< See datasheet
#define SSD1306_CHARGEPUMP 0x8D ///< See datasheet
#define SSD1306_SEGREMAP 0xA0 ///< See datasheet
#define SSD1306_DISPLAYALLON_RESUME 0xA4 ///< See datasheet
#define SSD1306_DISPLAYALLON 0xA5 ///< Not currently used
#define SSD1306_NORMALDISPLAY 0xA6 ///< See datasheet
#define SSD1306_INVERTDISPLAY 0xA7 ///< See datasheet
#define SSD1306_SETMULTIPLEX 0xA8 ///< See datasheet
#define SSD1306_DISPLAYOFF 0xAE ///< See datasheet
#define SSD1306_DISPLAYON 0xAF ///< See datasheet
#define SSD1306_COMSCANINC 0xC0 ///< Not currently used
#define SSD1306_COMSCANDEC 0xC8 ///< See datasheet
#define SSD1306_SETDISPLAYOFFSET 0xD3 ///< See datasheet
#define SSD1306_SETDISPLAYCLOCKDIV 0xD5 ///< See datasheet
#define SSD1306_SETPRECHARGE 0xD9 ///< See datasheet
#define SSD1306_SETCOMPINS 0xDA ///< See datasheet
#define SSD1306_SETVCOMDETECT 0xDB ///< See datasheet
#define SSD1306_SETLOWCOLUMN 0x00 ///< Not currently used
#define SSD1306_SETHIGHCOLUMN 0x10 ///< Not currently used
#define SSD1306_SETSTARTLINE 0x40 ///< See datasheet
#define SSD1306_EXTERNALVCC 0x01 ///< External display voltage source
#define SSD1306_SWITCHCAPVCC 0x02 ///< Gen. display voltage from 3.3V
#define SSD1306_RIGHT_HORIZONTAL_SCROLL 0x26 ///< Init rt scroll
#define SSD1306_LEFT_HORIZONTAL_SCROLL 0x27 ///< Init left scroll
#define SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL 0x29 ///< Init diag scroll
#define SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL 0x2A ///< Init diag scroll
#define SSD1306_DEACTIVATE_SCROLL 0x2E ///< Stop scroll
#define SSD1306_ACTIVATE_SCROLL 0x2F ///< Start scroll
#define SSD1306_SET_VERTICAL_SCROLL_AREA 0xA3 ///< Set scroll range
// Deprecated size stuff for backwards compatibility with old sketches
#if defined SSD1306_128_64
#define SSD1306_LCDWIDTH 128 ///< DEPRECATED: width w/SSD1306_128_64 defined
#define SSD1306_LCDHEIGHT 64 ///< DEPRECATED: height w/SSD1306_128_64 defined
#endif
#if defined SSD1306_128_32
#define SSD1306_LCDWIDTH 128 ///< DEPRECATED: width w/SSD1306_128_32 defined
#define SSD1306_LCDHEIGHT 32 ///< DEPRECATED: height w/SSD1306_128_32 defined
#endif
#if defined SSD1306_96_16
#define SSD1306_LCDWIDTH 96 ///< DEPRECATED: width w/SSD1306_96_16 defined
#define SSD1306_LCDHEIGHT 16 ///< DEPRECATED: height w/SSD1306_96_16 defined
#endif
/*!
@brief Class that stores state and functions for interacting with
SSD1306 OLED displays.
*/
class Adafruit_SSD1306 : public Adafruit_GFX {
public:
// NEW CONSTRUCTORS -- recommended for new projects
Adafruit_SSD1306(uint8_t w, uint8_t h, TwoWire *twi=&Wire, int8_t rst_pin=-1,
uint32_t clkDuring=400000UL, uint32_t clkAfter=100000UL);
Adafruit_SSD1306(uint8_t w, uint8_t h, int8_t mosi_pin, int8_t sclk_pin,
int8_t dc_pin, int8_t rst_pin, int8_t cs_pin);
Adafruit_SSD1306(uint8_t w, uint8_t h, SPIClass *spi,
int8_t dc_pin, int8_t rst_pin, int8_t cs_pin, uint32_t bitrate=8000000UL);
// DEPRECATED CONSTRUCTORS - for back compatibility, avoid in new projects
Adafruit_SSD1306(int8_t mosi_pin, int8_t sclk_pin, int8_t dc_pin,
int8_t rst_pin, int8_t cs_pin);
Adafruit_SSD1306(int8_t dc_pin, int8_t rst_pin, int8_t cs_pin);
Adafruit_SSD1306(int8_t rst_pin = -1);
~Adafruit_SSD1306(void);
boolean begin(uint8_t switchvcc=SSD1306_SWITCHCAPVCC,
uint8_t i2caddr=0, boolean reset=true,
boolean periphBegin=true);
void display(void);
void clearDisplay(void);
void invertDisplay(boolean i);
void dim(boolean dim);
void drawPixel(int16_t x, int16_t y, uint16_t color);
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
void startscrollright(uint8_t start, uint8_t stop);
void startscrollleft(uint8_t start, uint8_t stop);
void startscrolldiagright(uint8_t start, uint8_t stop);
void startscrolldiagleft(uint8_t start, uint8_t stop);
void stopscroll(void);
void ssd1306_command(uint8_t c);
boolean getPixel(int16_t x, int16_t y);
uint8_t *getBuffer(void);
private:
inline void SPIwrite(uint8_t d) __attribute__((always_inline));
void drawFastHLineInternal(int16_t x, int16_t y, int16_t w,
uint16_t color);
void drawFastVLineInternal(int16_t x, int16_t y, int16_t h,
uint16_t color);
void ssd1306_command1(uint8_t c);
void ssd1306_commandList(const uint8_t *c, uint8_t n);
SPIClass *spi;
TwoWire *wire;
uint8_t *buffer;
int8_t i2caddr, vccstate, page_end;
int8_t mosiPin , clkPin , dcPin , csPin, rstPin;
#ifdef HAVE_PORTREG
PortReg *mosiPort , *clkPort , *dcPort , *csPort;
PortMask mosiPinMask, clkPinMask, dcPinMask, csPinMask;
#endif
#if defined(SPI_HAS_TRANSACTION)
SPISettings spiSettings;
#endif
#if ARDUINO >= 157
uint32_t wireClk; // Wire speed for SSD1306 transfers
uint32_t restoreClk; // Wire speed following SSD1306 transfers
#endif
};
#endif // _Adafruit_SSD1306_H_

View File

@ -0,0 +1,232 @@
/*
RS485 protocol library - non-blocking.
Devised and written by Nick Gammon.
Date: 4 December 2012
Version: 1.0
Can send from 1 to 255 bytes from one node to another with:
* Packet start indicator (STX)
* Each data byte is doubled and inverted to check validity
* Packet end indicator (ETX)
* Packet CRC (checksum)
To allow flexibility with hardware (eg. Serial, SoftwareSerial, I2C)
you provide three "callback" functions which send or receive data. Examples are:
size_t fWrite (const byte what)
{
return Serial.write (what);
}
int fAvailable ()
{
return Serial.available ();
}
int fRead ()
{
return Serial.read ();
}
PERMISSION TO DISTRIBUTE
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
LIMITATION OF LIABILITY
The software is provided "as is", without warranty of any kind, express or implied,
including but not limited to the warranties of merchantability, fitness for a particular
purpose and noninfringement. In no event shall the authors or copyright holders be liable
for any claim, damages or other liability, whether in an action of contract,
tort or otherwise, arising from, out of or in connection with the software
or the use or other dealings in the software.
*/
#include "RS485_non_blocking.h"
// allocate the requested buffer size
void RS485::begin ()
{
data_ = (byte *) malloc (bufferSize_);
reset ();
errorCount_ = 0;
} // end of RS485::begin
// get rid of the buffer
void RS485::stop ()
{
reset ();
free (data_);
data_ = NULL;
} // end of RS485::stop
// called after an error to return to "not in a packet"
void RS485::reset ()
{
haveSTX_ = false;
available_ = false;
inputPos_ = 0;
startTime_ = 0;
} // end of RS485::reset
// calculate 8-bit CRC
byte RS485::crc8 (const byte *addr, byte len)
{
byte crc = 0;
while (len--)
{
byte inbyte = *addr++;
for (byte i = 8; i; i--)
{
byte mix = (crc ^ inbyte) & 0x01;
crc >>= 1;
if (mix)
crc ^= 0x8C;
inbyte >>= 1;
} // end of for
} // end of while
return crc;
} // end of RS485::crc8
// send a byte complemented, repeated
// only values sent would be (in hex):
// 0F, 1E, 2D, 3C, 4B, 5A, 69, 78, 87, 96, A5, B4, C3, D2, E1, F0
void RS485::sendComplemented (const byte what)
{
byte c;
// first nibble
c = what >> 4;
fWriteCallback_ ((c << 4) | (c ^ 0x0F));
// second nibble
c = what & 0x0F;
fWriteCallback_ ((c << 4) | (c ^ 0x0F));
} // end of RS485::sendComplemented
// send a message of "length" bytes (max 255) to other end
// put STX at start, ETX at end, and add CRC
void RS485::sendMsg (const byte * data, const byte length)
{
// no callback? Can't send
if (fWriteCallback_ == NULL)
return;
fWriteCallback_ (STX); // STX
for (byte i = 0; i < length; i++)
sendComplemented (data [i]);
fWriteCallback_ (ETX); // ETX
sendComplemented (crc8 (data, length));
} // end of RS485::sendMsg
// called periodically from main loop to process data and
// assemble the finished packet in 'data_'
// returns true if packet received.
// You could implement a timeout by seeing if isPacketStarted() returns
// true, and if too much time has passed since getPacketStartTime() time.
bool RS485::update ()
{
// no data? can't go ahead (eg. begin() not called)
if (data_ == NULL)
return false;
// no callbacks? Can't read
if (fAvailableCallback_ == NULL || fReadCallback_ == NULL)
return false;
while (fAvailableCallback_ () > 0)
{
byte inByte = fReadCallback_ ();
switch (inByte)
{
case STX: // start of text
haveSTX_ = true;
haveETX_ = false;
inputPos_ = 0;
firstNibble_ = true;
startTime_ = millis ();
break;
case ETX: // end of text (now expect the CRC check)
haveETX_ = true;
break;
default:
// wait until packet officially starts
if (!haveSTX_)
break;
// check byte is in valid form (4 bits followed by 4 bits complemented)
if ((inByte >> 4) != ((inByte & 0x0F) ^ 0x0F) )
{
reset ();
errorCount_++;
break; // bad character
} // end if bad byte
// convert back
inByte >>= 4;
// high-order nibble?
if (firstNibble_)
{
currentByte_ = inByte;
firstNibble_ = false;
break;
} // end of first nibble
// low-order nibble
currentByte_ <<= 4;
currentByte_ |= inByte;
firstNibble_ = true;
// if we have the ETX this must be the CRC
if (haveETX_)
{
if (crc8 (data_, inputPos_) != currentByte_)
{
reset ();
errorCount_++;
break; // bad crc
} // end of bad CRC
available_ = true;
return true; // show data ready
} // end if have ETX already
// keep adding if not full
if (inputPos_ < bufferSize_)
data_ [inputPos_++] = currentByte_;
else
{
reset (); // overflow, start again
errorCount_++;
}
break;
} // end of switch
} // end of while incoming data
return false; // not ready yet
} // end of RS485::update

View File

@ -0,0 +1,107 @@
/*
RS485 protocol library - non-blocking.
Devised and written by Nick Gammon.
Date: 4 December 2012
Version: 1.0
Licence: Released for public use.
*/
#include "Arduino.h"
class RS485
{
typedef size_t (*WriteCallback) (const byte what); // send a byte to serial port
typedef int (*AvailableCallback) (); // return number of bytes available
typedef int (*ReadCallback) (); // read a byte from serial port
enum {
STX = '\2', // start of text
ETX = '\3' // end of text
}; // end of enum
// callback functions to do reading/writing
ReadCallback fReadCallback_;
AvailableCallback fAvailableCallback_;
WriteCallback fWriteCallback_;
// where we save incoming stuff
byte * data_;
// how much data is in the buffer
const int bufferSize_;
// this is true once we have valid data in buf
bool available_;
// an STX (start of text) signals a packet start
bool haveSTX_;
// count of errors
unsigned long errorCount_;
// variables below are set when we get an STX
bool haveETX_;
byte inputPos_;
byte currentByte_;
bool firstNibble_;
unsigned long startTime_;
// helper private functions
byte crc8 (const byte *addr, byte len);
void sendComplemented (const byte what);
public:
// constructor
RS485 (ReadCallback fReadCallback,
AvailableCallback fAvailableCallback,
WriteCallback fWriteCallback,
const byte bufferSize) :
fReadCallback_ (fReadCallback),
fAvailableCallback_ (fAvailableCallback),
fWriteCallback_ (fWriteCallback),
data_ (NULL),
bufferSize_ (bufferSize)
{}
// destructor - frees memory used
~RS485 () { stop (); }
// allocate memory for buf_
void begin ();
// free memory in buf_
void stop ();
// handle incoming data, return true if packet ready
bool update ();
// reset to no incoming data (eg. after a timeout)
void reset ();
// send data
void sendMsg (const byte * data, const byte length);
// returns true if packet available
bool available () const { return available_; };
// once available, returns the address of the current message
byte * getData () const { return data_; }
byte getLength () const { return inputPos_; }
// return how many errors we have had
unsigned long getErrorCount () const { return errorCount_; }
// return when last packet started
unsigned long getPacketStartTime () const { return startTime_; }
// return true if a packet has started to be received
bool isPacketStarted () const { return haveSTX_; }
}; // end of class RS485

226
module/src/main.cpp Normal file
View File

@ -0,0 +1,226 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#include <Arduino.h>
#include <Wire.h>
#include "global.h"
#include "config.h"
#include "display.h"
#include "protocol.h"
void setup()
{
settings.init();
// Set up I2C devices: the SSD1306 OLED display and PCA9685 LED PWM driver
Wire.begin();
display.init();
pwmDriver.begin();
pwmDriver.setPWMFreq(PWMDriverFrequency);
// At 16 Mhz we pick a baud rate with a very acceptable 0.2% error rate
// Source: http://www.robotroom.com/Asynchronous-Serial-Communication-2.html
Serial.begin(CommBaudRate);
pinMode(CommWriteEnablePin, OUTPUT);
comm.begin();
pinMode(PinButton, INPUT_PULLUP);
pinMode(5, OUTPUT);
}
// Forward declarations
void handleCommMessage();
void handlePing(uint8_t* data, uint8_t length);
void handleDisplayModuleIndex(uint8_t* data, uint8_t length);
void handleStartLink(uint8_t* data, uint8_t length);
void handleRequestLinkResponse(uint8_t* data, uint8_t length);
void handleStopLink(uint8_t* data, uint8_t length);
void handleSetPWM(uint8_t* data, uint8_t length);
void handleGetSensors(uint8_t* data, uint8_t length);
void checkButtonPress();
void loop()
{
currentTime = millis();
if (comm.update())
handleCommMessage();
checkButtonPress();
display.update();
}
void sendCommMessage(const uint8_t* data, uint8_t size)
{
digitalWrite(CommWriteEnablePin, HIGH);
comm.sendMsg(data, size);
// Wait for the hardware buffer to clear before turning
// off the write enable pin, or we'll cut off the message too early
// Straight from: http://www.gammon.com.au/forum/?id=11428
while (!(UCSR0A & (1 << UDRE0))) // Wait for empty transmit buffer
UCSR0A |= 1 << TXC0; // mark transmission not complete
while (!(UCSR0A & (1 << TXC0))); // Wait for the transmission to complete
digitalWrite(CommWriteEnablePin, LOW);
}
void handleCommMessage()
{
uint8_t* data = comm.getData();
uint8_t length = comm.getLength();
if (length == 0)
return;
if (state == State::WaitingForComm)
state = State::DisplayModuleIndex;
uint8_t command = *data; data++; length--;
uint8_t moduleIndex = ModuleIndexUndefined;
if ((command & MaskMessageType) == MaskModuleCommand)
{
if (!settings.hasModuleIndex())
// We're not linked yet
return;
moduleIndex = *data; data++; length--;
if (settings.getModuleIndex() != moduleIndex)
// This message is meant for another module
return;
}
switch (command)
{
case CommandPing: handlePing(data, length); break;
case CommandDisplayModuleIndex: handleDisplayModuleIndex(data, length); break;
case CommandStartLink: handleStartLink(data, length); break;
case ResponseRequestLink: handleRequestLinkResponse(data, length); break;
case CommandStopLink: handleStopLink(data, length); break;
case CommandSetPWM: handleSetPWM(data, length); break;
case CommandGetSensors: handleGetSensors(data, length); break;
default:
if ((command & MaskMessageType) == MaskModuleCommand)
{
// Sender expects a response from us
const uint8_t msg[] = { ResponseUhmWhat, moduleIndex };
sendCommMessage(msg, sizeof(msg));
}
}
}
void handlePing(uint8_t* data, uint8_t length)
{
const uint8_t msg[] = { ResponsePing, settings.getModuleIndex() };
sendCommMessage(msg, sizeof(msg));
}
void handleDisplayModuleIndex(uint8_t* data, uint8_t length)
{
if (state == State::DisplayOff)
state = State::DisplayModuleIndex;
}
void handleStartLink(uint8_t* data, uint8_t length)
{
state = State::Linking;
}
void handleRequestLinkResponse(uint8_t* data, uint8_t length)
{
if (length == 0)
return;
if (state != State::LinkingRequest)
return;
settings.setModuleIndex(*data);
state = State::LinkingSet;
}
void handleStopLink(uint8_t* data, uint8_t length)
{
if (state == State::Linking || state == State::LinkingRequest || state == State::LinkingSet)
state = State::DisplayModuleIndex;
}
void handleSetPWM(uint8_t* data, uint8_t length)
{
if (length < 5)
return;
uint8_t flags = *data; data++;
uint16_t value1 = *(reinterpret_cast<uint16_t*>(data)); data += 2;
uint16_t value2 = *(reinterpret_cast<uint16_t*>(data)); data += 2;
pwmDriver.setPin(0, value1);
pwmDriver.setPin(1, value2);
if ((flags & SetPWMFlagModuleLEDs) == SetPWMFlagModuleLEDs)
{
pwmDriver.setPin(2, value1);
pwmDriver.setPin(3, value2);
}
else
{
pwmDriver.setPin(2, 0);
pwmDriver.setPin(3, 0);
}
const uint8_t msg[] = { ResponseSetPWM, settings.getModuleIndex() };
sendCommMessage(msg, sizeof(msg));
}
void handleGetSensors(uint8_t* data, uint8_t length)
{
uint16_t value1 = analogRead(PinSensor1);
uint16_t value2 = analogRead(PinSensor2);
const uint8_t msg[] = { ResponseGetSensors, settings.getModuleIndex(), lowByte(value1), highByte(value1), lowByte(value2), highByte(value2) };
sendCommMessage(msg, sizeof(msg));
}
uint32_t lastButtonPress = 0;
void checkButtonPress()
{
if ((state == State::Linking || state == State::LinkingRequest) &&
digitalRead(PinButton) == HIGH &&
currentTime - lastButtonPress >= ButtonDebounceTime)
{
state = State::LinkingRequest;
const uint8_t msg[] = { CommandRequestLink };
sendCommMessage(msg, sizeof(msg));
lastButtonPress = currentTime;
}
}

155
module/src/protocol.h Normal file
View File

@ -0,0 +1,155 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __protocol
#define __protocol
#include <stdint.h>
/*
* There are three classes of messages, these masks provide a way to identify
* unknown messages if the protocol ever changes.
*
* MaskBroadcastCommand: commands which do not expect a response
* MaskModuleCommand: commands which do expect a command. respond with ResponseUhmWhat to satisfy the response requirement.
* MaskResponse: responses to commands
*/
const uint8_t MaskMessageType = 0b11000000;
const uint8_t MaskBroadcastCommand = 0b10000000;
const uint8_t MaskModuleCommand = 0b11000000;
const uint8_t MaskResponse = 0b01000000;
const uint8_t ResponseUhmWhat = 0x00 | MaskResponse;
/*
* Ping:
* Aimed at a specific module, which must respond with a
* ResponsePing message.
*
* Request:
* [0] CommandPing
* [1] Module index
*
* Response:
* [0] ResponsePing
* [1] Module index
*/
const uint8_t BasePing = 0x01;
const uint8_t CommandPing = BasePing | MaskModuleCommand;
const uint8_t ResponsePing = BasePing | MaskResponse;
/*
* Display module index:
* Broadcast to all modules which should turn on their display
* and show the current settings. No response is expected.
*
* Request:
* [0] CommandDisplayModuleIndex
*/
const uint8_t CommandDisplayModuleIndex = 0x02 | MaskBroadcastCommand;
/*
* Start linking:
* Broadcast to all modules which should change to link mode.
* During link mode the master will disable all other communication,
* allowing the module to respond at will in response to user input.
*
* Each module should send a CommandRequestLink message when user input
* is provided.
*
* Request:
* [0] CommandStartLink
*
* Response (eventually):
* See CommandRequestLink
*/
const uint8_t CommandStartLink = 0x10 | MaskBroadcastCommand;
/*
* Request link:
* Sent by a module when user input is provided to link this module
* as the next in line. All other modules should disable sending this
* message until the currently requesting module receives a response.
*
* The master must respond with the new module index, which the
* module must apply and store immediately.
*
* Request:
* [0] CommandRequestLink
*
* Response:
* [0] ResponseRequestLink
* [1] New module index
*/
const uint8_t BaseRequestLink = 0x11;
const uint8_t CommandRequestLink = BaseRequestLink | MaskBroadcastCommand;
const uint8_t ResponseRequestLink = BaseRequestLink | MaskResponse;
/*
* Stop linking:
* Broadcast to all modules when the master takes back control
* over the communication line. No response is expected.
*
* Request:
* [0] CommandStopLink
*/
const uint8_t CommandStopLink = 0x12 | MaskBroadcastCommand;
/*
* Set PWM value:
* Aimed at a specific module, which must apply the specified
* PWM values to the LED strips and respond with a
* ResponseSetPWM message.
*
* Request:
* [0] CommandSetPWM
* [1] Module index
* [2] Flags, see below
* [3,4] PWM value for step 1 (0-4095, uint16_t)
* [5,6] PWM value for step 2 (0-4095, uint16_t)
*
* Response:
* [0] ResponseSetPWM
* [1] Module index
*/
const uint8_t BaseSetPWM = 0x20;
const uint8_t CommandSetPWM = BaseSetPWM | MaskModuleCommand;
const uint8_t ResponseSetPWM = BaseSetPWM | MaskResponse;
// If included, the on-board verification LEDs should light up with
// the specified PWM values as well. Otherwise they should be off.
const uint8_t SetPWMFlagModuleLEDs = 0x01;
/*
* Get sensor values:
* Aimed at a specific module, which must response with a
* ResponseGetSensors message containing the current sensor states.
*
* Request:
* [0] CommandGetSensors
* [1] Module index
*
* Response:
* [0] ResponseGetSensors
* [1] Module index
* [2,3] Analog (0-1023) or digital (0, 1023) value for sensor 1 (uint16_t)
* [4,5] Analog (0-1024) or digital (0, 1023) value for sensor 2 (uint16_t)
*/
const uint8_t BaseGetSensors = 0x30;
const uint8_t CommandGetSensors = BaseGetSensors | MaskModuleCommand;
const uint8_t ResponseGetSensors = BaseGetSensors | MaskResponse;
#endif

58
module/src/settings.cpp Normal file
View File

@ -0,0 +1,58 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#include "settings.h"
#include <EEPROM.h>
// First byte is 0xAA to recognize uninitialised EEPROM
const uint8_t EEPROMHeader = 0xAA;
const uint8_t EEPROMCurrentVersion = 1;
const uint8_t EEPROMAddressHeader = 0;
const uint8_t EEPROMAddressVersion = 1;
const uint8_t EEPROMAddressModuleIndex = 2;
void Settings::init()
{
if (EEPROM.read(EEPROMAddressHeader) != EEPROMHeader)
{
EEPROM.put(EEPROMAddressHeader, EEPROMHeader);
EEPROM.put(EEPROMAddressVersion, EEPROMCurrentVersion);
EEPROM.put(EEPROMAddressModuleIndex, mModuleIndex);
}
else
{
uint8_t version = EEPROM.read(EEPROMAddressVersion);
if (version >= 1)
{
mModuleIndex = EEPROM.read(EEPROMAddressModuleIndex);
}
}
}
bool Settings::hasModuleIndex()
{
return mModuleIndex != ModuleIndexUndefined;
}
uint8_t Settings::getModuleIndex(void)
{
return mModuleIndex;
}
void Settings::setModuleIndex(uint8_t index)
{
if (index == mModuleIndex)
return;
mModuleIndex = index;
EEPROM.put(EEPROMAddressModuleIndex, mModuleIndex);
}

29
module/src/settings.h Normal file
View File

@ -0,0 +1,29 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __settings
#define __settings
#include <stdint.h>
#include <stdbool.h>
const uint8_t ModuleIndexUndefined = 0xff;
class Settings
{
private:
uint8_t mModuleIndex = ModuleIndexUndefined;
public:
void init();
bool hasModuleIndex();
uint8_t getModuleIndex();
void setModuleIndex(uint8_t index);
};
#endif

20
module/src/state.h Normal file
View File

@ -0,0 +1,20 @@
/*
* Stairs lighting
* Copyright 2017 (c) Mark van Renswoude
*
* https://git.x2software.net/pub/Stairs
*/
#ifndef __state
#define __state
enum struct State: uint8_t
{
WaitingForComm,
Linking,
LinkingRequest,
LinkingSet,
DisplayModuleIndex,
DisplayOff
};
#endif

1
module/upload.bat Normal file
View File

@ -0,0 +1 @@
@pio run -t program

View File

@ -4,181 +4,181 @@
#include <pgmspace.h>
const uint8_t EmbeddedIndex[] PROGMEM = {
0x1f,0x8b,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,0xed,0x5b,0x6b,0x57,0xe3,0x38,0x12,0xfd,0x2b,0xee,
0xcc,0xee,0x40,0x6f,0x0f,0x8f,0x00,0xcd,0x34,0x0c,0xb0,0x13,0xf2,0x80,0x00,0x09,0x21,0x09,0xcf,0x2f,
0x7b,0x14,0x5b,0x89,0x05,0x8e,0x6d,0x24,0x3b,0x21,0x3d,0xd3,0xff,0x7d,0xf5,0xf0,0x43,0xb6,0x65,0xc7,
0x61,0x7b,0x4f,0xcf,0x9e,0xb3,0xfd,0xa1,0x83,0x55,0xa5,0xab,0xab,0x52,0xa9,0x54,0x92,0xe5,0xa3,0x0f,
0x8d,0xeb,0xfa,0xf0,0xb1,0xd7,0xd4,0x4c,0x6f,0x6a,0x9d,0x1c,0x05,0xff,0x43,0x60,0x9c,0x1c,0x4d,0xa1,
0x07,0x34,0xdd,0x04,0x98,0x40,0xef,0xb8,0x72,0x3b,0x6c,0x6d,0x7c,0xa9,0x9c,0x1c,0x79,0xc8,0xb3,0xe0,
0xc9,0xd1,0x56,0xf0,0xcb,0x95,0x6c,0x30,0x85,0xc7,0x15,0xcf,0x84,0x53,0xb8,0xa1,0x3b,0x96,0x83,0x2b,
0x9a,0xee,0xd8,0x1e,0xb4,0x69,0xbd,0x9f,0xb6,0xf9,0xbf,0x4a,0x42,0x75,0x86,0xe0,0xdc,0x75,0xb0,0x27,
0xe9,0xcd,0x91,0xe1,0x99,0xc7,0x06,0x9c,0x21,0x1d,0x6e,0xf0,0x87,0x5f,0x90,0x8d,0x3c,0x04,0xac,0x0d,
0xa2,0x03,0x0b,0x1e,0x57,0x29,0x84,0x85,0xec,0x17,0x0d,0x43,0xeb,0xb8,0x42,0xbc,0x85,0x05,0x89,0x09,
0x21,0xc5,0x30,0x31,0x1c,0x1f,0x57,0x46,0xbe,0x6d,0x58,0x70,0x53,0x27,0x84,0x2a,0x12,0x1d,0x23,0xd7,
0xd3,0x08,0xd6,0x23,0xc1,0x33,0x2b,0xdf,0x12,0x02,0xfa,0x87,0xe8,0xe3,0xc8,0x31,0x16,0x27,0x47,0x06,
0x9a,0x69,0xc8,0x38,0xae,0x00,0xd7,0xad,0x88,0xa7,0xd9,0x86,0x6e,0x39,0xe0,0x45,0x3c,0xe8,0x16,0x20,
0xe4,0xb8,0x62,0x3b,0x1e,0x1a,0x23,0x1d,0x78,0xc8,0xb1,0xeb,0x94,0x36,0x40,0x36,0xc4,0x95,0x5c,0x95,
0x8a,0x76,0x18,0x94,0xfe,0xa1,0x41,0x8c,0x1d,0x7c,0xa8,0xc9,0x62,0xed,0xc3,0xb1,0x66,0xfb,0x96,0xa5,
0xfd,0xfc,0x73,0xa2,0x7c,0x93,0xeb,0x6a,0xdf,0x2a,0x94,0x03,0x1a,0x27,0x21,0xc3,0x3a,0x15,0xed,0x77,
0xdd,0x42,0xfa,0xcb,0xa6,0x8b,0xe1,0x8c,0x5b,0xcf,0x44,0x06,0xec,0xca,0x8d,0x53,0x13,0xb8,0xc0,0x0e,
0x79,0x4d,0x21,0x21,0x60,0x02,0x2b,0x27,0x7f,0xfc,0x91,0x6c,0x2c,0x10,0x68,0xdf,0xbe,0x51,0xd3,0xd0,
0x0a,0xd4,0x30,0xb4,0x3b,0xe1,0xff,0xa1,0x5d,0x74,0x75,0x6f,0x99,0x09,0x79,0x19,0x9a,0x4e,0x84,0xa9,
0x0d,0xe0,0x81,0x43,0x34,0xa5,0x88,0x5b,0xae,0x3d,0xf9,0x6d,0x04,0x08,0xdc,0xdf,0xfb,0x05,0xdd,0x9d,
0x5e,0xf7,0xe7,0xdb,0x97,0x67,0x13,0xa7,0x46,0xff,0x75,0x07,0xb7,0x66,0xf3,0x76,0x42,0xff,0x6a,0xb0,
0xc7,0xda,0xbc,0x5e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58,0x01,0x26,0xa5,
0xc1,0x2b,0x06,0xa6,0x8e,0xe2,0xc6,0x7b,0x7b,0x3f,0x81,0xde,0x3d,0x6a,0xf1,0x96,0x68,0x25,0xd1,0xe0,
0xfa,0xc7,0xfc,0xfe,0x11,0xa1,0x38,0x75,0x0c,0x98,0xea,0x9f,0x0a,0x69,0x08,0xdf,0xbc,0xf5,0x77,0x33,
0x4d,0x10,0x95,0xed,0x9f,0xa2,0x27,0x56,0xb1,0x21,0x9a,0x0a,0x32,0x82,0x4b,0x23,0x2a,0x8c,0x9b,0x4f,
0x07,0x5b,0x11,0xf2,0xe9,0xca,0x63,0x20,0x7b,0x52,0x09,0x19,0x84,0xcf,0x21,0x7c,0xf0,0x1c,0x75,0x34,
0x78,0x6e,0x87,0x44,0x93,0xdd,0x13,0x98,0x1f,0x02,0x25,0xb6,0xdc,0xd0,0xe5,0x14,0x8d,0xb0,0x58,0x51,
0x8e,0x83,0x09,0x90,0xec,0xf3,0x1c,0x60,0x9b,0x33,0x10,0x95,0x4d,0x40,0xfa,0x90,0x66,0x01,0x4d,0xb6,
0x34,0x51,0x4d,0x37,0x64,0xc2,0xd7,0xaa,0x4d,0x1c,0xc9,0x02,0x27,0x70,0xa9,0x4a,0x08,0xc5,0x85,0x7d,
0x08,0x08,0xb3,0x6b,0xb6,0x9a,0x90,0x6c,0x4a,0x13,0x4d,0x2a,0x96,0xd0,0x04,0x11,0x12,0x8d,0xb9,0xfe,
0x32,0xc4,0x40,0x87,0x29,0xc8,0x58,0x10,0x33,0x89,0x6d,0xa0,0xa8,0x7d,0x04,0x42,0x9e,0x23,0xdf,0xf3,
0xa8,0x3d,0xc4,0xcf,0x86,0x8b,0xe9,0x2a,0x86,0x17,0x61,0x6e,0xb1,0x05,0x5c,0xb4,0xc5,0xeb,0x79,0xac,
0xde,0x16,0x1d,0xce,0xdc,0x96,0x1b,0xce,0xdc,0x66,0xc6,0x0e,0x18,0x80,0x13,0x2d,0xdd,0x48,0xb8,0x7c,
0x53,0x1f,0x82,0x16,0xf4,0xe0,0x60,0x79,0x77,0x1a,0x5c,0x31,0x82,0xcc,0x38,0x4e,0x98,0x7f,0x80,0x19,
0x9a,0x88,0x81,0xf5,0xc0,0x88,0x64,0xfb,0x27,0x27,0x25,0x6b,0x80,0x7a,0xfb,0x0c,0xd2,0x30,0x27,0xfe,
0x18,0x82,0x11,0x75,0x07,0x6d,0x4d,0x98,0x69,0x8d,0xa5,0x20,0x21,0x4f,0x49,0x21,0x92,0x47,0x5c,0x03,
0xb3,0xd2,0x06,0x87,0x52,0xcc,0x05,0xef,0x6a,0xdb,0xc3,0x68,0x32,0x81,0xb8,0xa0,0xf5,0x48,0x23,0x6a,
0x3f,0x2c,0xf9,0x3e,0x0c,0xe2,0x30,0x90,0xcf,0x41,0xd2,0x89,0x58,0xc4,0x65,0xdf,0x87,0x87,0x58,0x6f,
0x0a,0x46,0x41,0xc8,0xe3,0x51,0xe0,0xcf,0x8a,0xb6,0xd3,0x91,0x40,0x39,0xd8,0x6c,0xe9,0xdc,0x4d,0x0f,
0xa8,0xbc,0x82,0xee,0x72,0x88,0x93,0x23,0x4c,0xa3,0x88,0xa3,0x1d,0x72,0xd9,0x71,0x45,0xd2,0x06,0x96,
0x35,0xf0,0xa0,0x4b,0x86,0xd8,0xa7,0x95,0x58,0xe4,0x60,0x21,0x99,0x66,0xea,0xa1,0x80,0x76,0x9a,0xe5,
0x92,0x1e,0x95,0xb3,0x70,0xc9,0x81,0x24,0x76,0x25,0xa0,0x5b,0xc0,0x22,0x85,0xd8,0x63,0xa6,0xa0,0x02,
0x0f,0xcd,0x4f,0x2c,0x9a,0x27,0xe3,0xd4,0x02,0x4d,0xed,0xe6,0x86,0x91,0x2e,0x02,0x4c,0xe6,0xcf,0x33,
0x60,0xf9,0x62,0x72,0x76,0x80,0x67,0x6e,0x8e,0x2d,0xc7,0xc1,0xeb,0xa1,0xee,0x1d,0x13,0x6a,0x5b,0xda,
0xce,0xe7,0xcf,0xda,0x3f,0x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xb5,0x00,0x0f,0x99,0xeb,0xac,0xfc,0x17,0x8d,0xaf,0xcc,0xef,0x63,0x8f,
0xa1,0x05,0x78,0xbc,0x56,0x77,0x80,0xce,0x59,0x98,0xc7,0x53,0xae,0x5a,0x9a,0x2a,0x4b,0x50,0x72,0x98,
0xca,0x01,0x15,0xc2,0x17,0x03,0x2c,0xc8,0xf2,0xd9,0x37,0x75,0x6c,0xaa,0x58,0x30,0xf9,0x3a,0x5c,0x21,
0x31,0xe9,0x96,0x40,0x7a,0x3e,0x24,0xc5,0x98,0x43,0xa1,0xb1,0x0a,0xe8,0x1c,0x1a,0xf6,0x32,0xd8,0xfb,
0x50,0x67,0x25,0xb6,0xa6,0x8f,0x97,0xd1,0x0d,0x54,0x56,0x81,0x1d,0x63,0x54,0x0c,0xda,0xe2,0x0a,0xab,
0x40,0x12,0xba,0xc6,0xe1,0x62,0xd0,0x41,0xa0,0xb2,0x12,0xac,0xbf,0xc4,0x03,0x06,0x7e,0xc6,0x03,0xd4,
0xf9,0x5b,0x89,0x7c,0x2c,0x6c,0x74,0x44,0x7f,0x4d,0x8f,0x8e,0x16,0xf9,0x71,0x79,0x59,0x96,0x4b,0x41,
0x7e,0x26,0x67,0x69,0x6c,0x52,0xc7,0x67,0xea,0xec,0xd8,0x45,0x1d,0x16,0xbb,0x4e,0x83,0xca,0x72,0x8e,
0x9e,0xc4,0x5e,0x8b,0x35,0x19,0xec,0xed,0x0f,0xc3,0xb3,0x2a,0xca,0x98,0x6e,0x94,0x59,0x3a,0x94,0x5e,
0xbc,0x80,0x61,0x48,0x2b,0x97,0xba,0xd1,0x9a,0x11,0xee,0xed,0x05,0x6e,0xee,0xd2,0x14,0x13,0x90,0x8d,
0x29,0xb2,0xcb,0x8a,0x8a,0x4d,0x18,0xa0,0xc4,0x73,0x70,0x26,0xc9,0xb3,0xcf,0x53,0x0e,0x35,0xe0,0xe5,
0xb4,0xf1,0xc3,0xb4,0x64,0xed,0x63,0x6c,0x59,0x96,0xc4,0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0x72,0xd3,0x06,0x8b,0x34,0x54,0x2b,
0x44,0x3e,0x3d,0x09,0x39,0x97,0x64,0xa4,0x93,0x59,0x13,0x72,0x03,0x78,0x44,0xa7,0x2b,0xfd,0x0d,0xac,
0xf7,0x45,0xee,0x08,0x60,0xe8,0xb8,0xec,0xc5,0x45,0x21,0x8a,0xe2,0xe4,0x27,0x85,0x72,0xea,0xd0,0x64,
0x64,0x7a,0xeb,0x16,0x04,0xfd,0xff,0xe7,0xb3,0x39,0xf9,0xac,0x30,0xe5,0x7f,0x23,0xa3,0x4d,0x44,0x87,
0xbc,0x86,0xff,0x37,0xb2,0xda,0xe2,0xa3,0xdc,0xc4,0x7b,0x99,0xa2,0x0c,0xb8,0x2e,0xbf,0xeb,0x8d,0xb3,
0x5f,0xf9,0x1d,0x4e,0xb9,0xcc,0x57,0xaa,0x21,0xbd,0x14,0x4f,0x46,0x7f,0xb5,0x4e,0x6e,0xd8,0x37,0x19,
0x80,0x82,0x91,0x54,0xf7,0x9c,0xd7,0x97,0x2e,0xed,0x2c,0x67,0x17,0x9c,0xe3,0xe6,0x32,0x93,0x5e,0xa3,
0xaf,0xcc,0x4c,0xaa,0x9b,0x61,0x26,0xa5,0x1f,0x84,0x20,0x43,0x59,0x9d,0x96,0xe7,0x2f,0x03,0x1e,0x7c,
0xf3,0x44,0xc2,0xc1,0xeb,0xc7,0x19,0x79,0x0a,0x21,0xe1,0x7a,0x1f,0x14,0x3d,0x4f,0x70,0x71,0x69,0x87,
0xe6,0x0e,0x56,0xf2,0x09,0x65,0xf9,0x9c,0xa2,0xda,0x9c,0x57,0xfc,0xa4,0xe2,0x16,0x4b,0x97,0xf2,0x5b,
0x3e,0x8a,0x86,0xa9,0xbb,0x4b,0x81,0xf2,0x86,0x98,0x55,0x66,0x6f,0xcf,0x82,0xd1,0x64,0xd3,0x63,0x83,
0x45,0x48,0xec,0x58,0x2b,0x0e,0x38,0x43,0xca,0x8c,0xb4,0x1c,0x7d,0xfd,0x91,0x08,0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,0x03,0x0e,
0xa0,0xf2,0x10,0xdb,0x73,0xd3,0x56,0xf8,0xe1,0x2f,0x9e,0xe5,0x4b,0xca,0x0e,0x46,0x5f,0xd9,0x3e,0xc0,
0x4a,0x86,0x4d,0x4a,0x7b,0x00,0xf1,0x4c,0x4a,0x88,0xe3,0xfe,0x08,0x41,0x99,0xb0,0x19,0xa3,0xc4,0x01,
0x25,0x8d,0x53,0x51,0x24,0xd1,0x05,0xac,0x78,0x7f,0x66,0x4c,0x90,0xe1,0x15,0x8a,0xca,0x1d,0xd0,0xc8,
0x58,0x2a,0x76,0x71,0x43,0xe5,0xf9,0x59,0x20,0xe3,0xd2,0x14,0xe9,0x0a,0x78,0x65,0x8c,0xc5,0x2a,0x67,
0x88,0x70,0xc4,0x15,0x08,0x48,0xf7,0x20,0x25,0x02,0xc1,0x6d,0xc8,0x65,0x04,0x84,0x23,0xa6,0x08,0x30,
0x44,0xc5,0xfb,0x96,0x9c,0x1c,0xc6,0x72,0xc2,0xeb,0xfd,0xe1,0xed,0x4c,0x26,0xdb,0x08,0x5f,0x23,0x67,
0xa9,0x05,0xfa,0xa5,0xf8,0x45,0xd8,0x11,0xc9,0xa8,0xe8,0x44,0x0b,0x37,0x7d,0x99,0x49,0x0f,0x01,0xd6,
0xcd,0xab,0xa8,0xae,0x1c,0x4c,0xb9,0x88,0xce,0xbf,0x48,0x9a,0x4f,0x70,0xc0,0x75,0x95,0x7b,0xc0,0xcc,
0x9c,0x77,0x91,0x4d,0x0a,0x26,0x7d,0xde,0xe0,0xd1,0x6a,0x57,0xcd,0x46,0xad,0x97,0x66,0x11,0x96,0x97,
0xf3,0xeb,0x08,0x25,0x7b,0x0f,0x28,0x66,0xb7,0x49,0xfb,0xcf,0x1a,0x2a,0xef,0x59,0x02,0x76,0x30,0xac,
0xa9,0xd9,0x51,0xc1,0x2a,0xf4,0x18,0xce,0x32,0x7e,0xbc,0xad,0x95,0x08,0xd6,0x7a,0x22,0x70,0x2b,0x28,
0x86,0xa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3d,0xd3,0x50,0x53,0xc5,0x12,0x48,0xd1,0x05,0x0d,0x74,0x87,0x2c,0x10,0x20,0x21,0x24,0x61,0xfd,0x32,
0x47,0xb1,0x15,0x5b,0xe0,0xd8,0x46,0xb2,0x13,0x52,0xdd,0xf5,0xdf,0x47,0x8b,0x17,0x79,0x8d,0xc3,0xd4,
0x9c,0xea,0x3e,0x67,0xea,0x43,0x05,0xeb,0x3d,0x5d,0x5d,0x3d,0x3d,0x3d,0x3d,0xc9,0xf2,0xd1,0x5a,0xf3,
0xba,0x31,0x7a,0xec,0xb7,0x14,0xc3,0x9d,0x9a,0x27,0x47,0xfe,0xff,0x10,0x68,0x27,0x47,0x53,0xe8,0x02,
0x45,0x35,0x00,0x26,0xd0,0x3d,0xae,0xdc,0x8e,0xda,0x9b,0x5f,0x2a,0x27,0x47,0x2e,0x72,0x4d,0x78,0x72,
0xb4,0xed,0xff,0x72,0x25,0x0b,0x4c,0xe1,0x71,0xc5,0x35,0xe0,0x14,0x6e,0xaa,0xb6,0x69,0xe3,0x8a,0xa2,
0xda,0x96,0x0b,0x2d,0x5a,0xef,0xa7,0x1d,0xfe,0xaf,0x12,0x53,0x9d,0x21,0x38,0x77,0x6c,0xec,0x4a,0x7a,
0x73,0xa4,0xb9,0xc6,0xb1,0x06,0x67,0x48,0x85,0x9b,0xfc,0xe1,0x13,0xb2,0x90,0x8b,0x80,0xb9,0x49,0x54,
0x60,0xc2,0xe3,0x2a,0x85,0x30,0x91,0xf5,0xa2,0x60,0x68,0x1e,0x57,0x88,0xbb,0x30,0x21,0x31,0x20,0xa4,
0x18,0x06,0x86,0x93,0xe3,0xca,0xd8,0xb3,0x34,0x13,0x6e,0xa9,0x84,0x50,0x45,0xa2,0x62,0xe4,0xb8,0x0a,
0xc1,0x6a,0x28,0x78,0x66,0xe5,0xdb,0x42,0x40,0xff,0x10,0x7d,0x1c,0xdb,0xda,0xe2,0xe4,0x48,0x43,0x33,
0x05,0x69,0xc7,0x15,0xe0,0x38,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d0,
0xee,0x37,0x6b,0x07,0x6f,0xb5,0x21,0xa6,0xce,0x71,0xf0,0xda,0xb7,0x6a,0xd0,0x9e,0x35,0xba,0xdc,0x7b,
0x5a,0x66,0x7b,0xf4,0x32,0xf4,0x6e,0xa6,0x8d,0x06,0xf5,0x44,0xa3,0xca,0x5c,0xfc,0x1f,0xee,0xc6,0x3a,
0x8f,0x4f,0xeb,0x1f,0xb8,0x67,0xd3,0xd2,0x23,0x63,0x97,0x49,0x88,0x0b,0x5c,0x8f,0x6c,0x91,0x05,0x71,
0xe1,0xb4,0xd3,0xa4,0x13,0xca,0x9f,0x85,0xbf,0xf1,0x4a,0x41,0x39,0xad,0xf7,0x51,0x59,0x3f,0x54,0xd6,
0xe9,0x4f,0xb2,0x0a,0x2d,0x5d,0x17,0xa8,0xbb,0xb1,0xd9,0x30,0xa7,0xb3,0x4a,0xe8,0xc6,0x67,0x09,0x9d,
0x3c,0x16,0x54,0xfd,0x49,0x29,0x95,0x23,0x4b,0x63,0xb3,0x90,0x05,0xcb,0x43,0x36,0x6f,0x36,0x45,0x65,
0x01,0x34,0x14,0x8d,0x02,0x67,0x0b,0x5a,0x60,0x6c,0x42,0x8d,0x12,0x5c,0xf7,0x91,0xa0,0xb6,0xce,0x48,
0x68,0x88,0x44,0x05,0x15,0x7f,0xca,0xfa,0x9d,0x97,0x21,0x54,0x95,0xce,0x71,0xc7,0x46,0x96,0xbb,0x15,
0xd9,0x44,0xa1,0x8a,0x79,0xed,0xc4,0xcb,0x91,0x43,0x1b,0x2b,0xc0,0xa4,0x34,0x78,0x45,0xdf,0xd4,0x61,
0xdc,0x78,0x6f,0xef,0x75,0xe8,0xde,0xa3,0x36,0x6f,0x89,0x56,0x12,0x0d,0x6e,0x7c,0xc8,0xef,0x1f,0x11,
0x8a,0x53,0x5b,0x83,0x89,0xfe,0x65,0x21,0x8d,0xe0,0x9b,0xbb,0xf1,0x6e,0xa6,0x31,0xa2,0xb2,0xfd,0x13,
0xf4,0xc4,0x2a,0x36,0x42,0x53,0x41,0x46,0x70,0x69,0x86,0x85,0x51,0xf3,0xc9,0x60,0x2b,0x42,0x3e,0x5d,
0x79,0x34,0x64,0xe9,0x95,0x80,0x41,0xf0,0x1c,0xc0,0xfb,0xcf,0x61,0x47,0xfd,0xe7,0x4e,0x40,0x34,0xde,
0x3d,0x81,0xb9,0xe6,0x2b,0xb1,0xe5,0x86,0x2e,0xa7,0x68,0x8c,0xc5,0x8a,0x72,0xec,0x4f,0x80,0x78,0x9f,
0xe7,0x00,0x5b,0x9c,0x81,0xa8,0x6c,0x00,0x32,0x80,0x34,0x0b,0x68,0xb1,0xa5,0x89,0x6a,0x3a,0x01,0x13,
0xbe,0x56,0x6d,0xe1,0x50,0xe6,0x3b,0x81,0x43,0x55,0x02,0x28,0x2e,0x1c,0x40,0x40,0x98,0x5d,0xd3,0xd5,
0x84,0x64,0x4b,0x9a,0x68,0x52,0xb1,0x84,0x26,0x88,0x90,0x70,0xcc,0xd5,0x97,0x11,0x06,0x2a,0x4c,0x40,
0x46,0x82,0x88,0x09,0x08,0x98,0x8c,0x3d,0xd7,0xa5,0x3d,0x16,0x3f,0x9b,0x0e,0xa6,0xeb,0x14,0x5e,0x04,
0xd9,0xc3,0x36,0x70,0xd0,0x36,0xaf,0xee,0xb2,0xea,0xdb,0x3a,0x4b,0x2c,0x56,0x6d,0xb4,0x69,0xcf,0x2d,
0x66,0x67,0xbf,0x71,0x70,0xa2,0x24,0x5b,0x0f,0x56,0x6e,0xea,0x3e,0xd0,0x84,0x2e,0x1c,0x96,0x00,0xe5,
0x8a,0x21,0x64,0xda,0x71,0x2d,0x30,0x43,0xba,0x18,0x4d,0x17,0x8c,0x59,0xf4,0x49,0x35,0x1a,0x65,0x22,
0xeb,0x80,0xba,0xf8,0x0c,0xd2,0xd8,0x26,0xfe,0x18,0x81,0x31,0xf5,0x01,0x65,0x5d,0x74,0x72,0x9d,0xe5,
0x1d,0x01,0x43,0x49,0x21,0x94,0x87,0x2c,0x7d,0xa3,0xd0,0x06,0x47,0x52,0xa0,0x05,0xef,0x6a,0xdb,0xc5,
0x48,0xd7,0x21,0x2e,0x68,0x3d,0xd4,0x08,0xdb,0x0f,0x4a,0xbe,0x0f,0x83,0x68,0xee,0xe7,0x73,0x90,0x74,
0x42,0x16,0x51,0xd9,0xf7,0xe1,0x21,0x16,0x99,0x82,0x51,0x10,0xf2,0x68,0x14,0xf8,0x73,0x46,0xdb,0xc9,
0xe9,0x9f,0x39,0xd8,0x6c,0xbd,0xdc,0x4b,0x0e,0xa8,0xbc,0x6c,0xee,0x71,0x88,0x93,0x23,0x4c,0x43,0x87,
0xad,0x1c,0x72,0xd9,0x71,0x45,0xd2,0x06,0xa6,0x39,0x74,0xa1,0x43,0x46,0xd8,0xa3,0x95,0xd8,0x84,0x61,
0x71,0x98,0xa6,0xe7,0x81,0x80,0x76,0x9a,0x25,0x90,0x2e,0x95,0xb3,0x18,0xc9,0x81,0x24,0x76,0x25,0xa0,
0xdb,0xc0,0x24,0x85,0xd8,0x13,0xa6,0x90,0x05,0x1e,0x98,0x9f,0x98,0x34,0x39,0xc6,0x89,0x55,0x99,0xda,
0xcd,0x09,0x26,0x78,0x08,0x18,0x4f,0x9a,0x67,0xc0,0xf4,0xc4,0xb4,0xec,0x02,0xd7,0xd8,0x9a,0x98,0xb6,
0x8d,0x37,0x02,0xdd,0x3b,0x26,0x54,0xb6,0x95,0xdd,0xcf,0x9f,0x95,0x7f,0x29,0xd5,0x9d,0x1d,0x66,0xb2,
0x7f,0x06,0x49,0x74,0xaa,0x75,0x39,0x83,0x46,0x96,0xe3,0xb9,0x8a,0xbb,0x70,0x68,0x87,0x31,0xb0,0x68,
0x5a,0xae,0x4c,0x91,0x75,0x5c,0xd9,0xa1,0xbf,0xe0,0xed,0xb8,0x42,0x21,0x2b,0xf1,0xda,0x61,0xe7,0xb7,
0x2c,0x6f,0x3a,0x86,0x38,0xa2,0x7c,0x27,0x38,0xa6,0x16,0x92,0x8c,0x5e,0xae,0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x91,
0xd0,0x58,0x05,0x74,0x0e,0x35,0x6b,0x19,0xec,0x7d,0xa0,0xb3,0x12,0x5b,0xc3,0xc3,0xcb,0xe8,0xfa,0x2a,
0xab,0xc0,0x4e,0x30,0x2a,0x06,0x6d,0x73,0x85,0x55,0x20,0x09,0x5d,0xe3,0x70,0x31,0xe8,0xd0,0x57,0x59,
0x09,0xd6,0x5b,0xe2,0x01,0x43,0x2f,0xe5,0x01,0xd9,0xf9,0x5b,0x89,0x7c,0x2c,0x68,0x74,0x4c,0x7f,0x0d,
0x97,0x8e,0x16,0xf9,0x71,0x79,0x59,0x9a,0x4b,0x41,0x7e,0x26,0x67,0x69,0x6c,0x52,0x47,0x07,0xe9,0xec,
0xac,0x25,0x3b,0x2c,0xf6,0xec,0x26,0x95,0xe5,0x9c,0x37,0x89,0xbd,0x16,0x6b,0xd2,0xdf,0xee,0x1f,0x06,
0x07,0x54,0x94,0x31,0xdd,0x28,0xb3,0x74,0x28,0xb9,0x78,0x01,0x4d,0x93,0x56,0xae,0xec,0x46,0xeb,0x5a,
0xb0,0xab,0x17,0xb8,0xb9,0x4b,0x53,0x44,0x40,0x36,0xa6,0xc8,0x2e,0x2b,0x59,0x6c,0x82,0x00,0x25,0x9e,
0xfd,0x83,0x48,0x9e,0x7d,0x9e,0x72,0xa8,0x21,0x2f,0xa7,0x8d,0x1f,0x26,0x25,0xeb,0x1f,0x22,0xcb,0xb2,
0x24,0xb6,0x30,0x95,0xed,0xda,0x3c,0xf3,0x29,0x4c,0x66,0xa7,0x42,0x67,0xc5,0x74,0x56,0xd4,0x5a,0x92,
0x70,0x08,0xa5,0x92,0x29,0x6d,0x02,0x31,0x96,0x53,0xc6,0x80,0x9a,0x1e,0xa6,0xb6,0x29,0x1c,0xbc,0x62,
0xfd,0x78,0xae,0x19,0x5f,0x94,0x72,0x09,0xa5,0x5b,0xe5,0x19,0xe9,0x32,0x66,0xcb,0x93,0x8d,0x62,0x84,
0x1e,0x1d,0x4e,0xbc,0x6a,0x0a,0x52,0x0c,0x59,0x37,0xe7,0x74,0x39,0x5b,0x35,0x37,0x29,0xc6,0xbc,0xb6,
0xcc,0x45,0x5e,0xce,0xc2,0x7d,0x75,0x35,0x7f,0x12,0xf8,0x4d,0x1e,0x4a,0xa3,0xc9,0x53,0x76,0x64,0x58,
0x4a,0xb3,0x5b,0xc6,0x25,0xc3,0x66,0x32,0x02,0x72,0xca,0xfb,0x96,0xed,0x69,0xb2,0xb4,0xca,0xed,0x6a,
0x32,0xf1,0xf3,0xf7,0x35,0x7e,0xef,0x53,0x3b,0x9b,0x14,0x63,0x9a,0x71,0x53,0x0b,0xe6,0x10,0xe5,0xc2,
0x55,0xf8,0x09,0xb4,0xa5,0xb4,0x34,0xd1,0x68,0x89,0x7d,0x56,0xd8,0x8f,0xf7,0xee,0xb4,0x12,0x00,0x7f,
0xa9,0xbd,0xd6,0x54,0x8e,0xbc,0xdf,0x71,0xb7,0x15,0x8b,0xe8,0xb9,0xfb,0xad,0x70,0xc4,0xbe,0xe3,0x8e,
0x4b,0xb8,0xd7,0x21,0x1f,0x96,0x75,0xd1,0x00,0x3b,0xc0,0xe7,0x14,0xd8,0x8b,0xb3,0x7f,0x3b,0xc8,0xca,
0x38,0xaa,0x15,0x9a,0x7d,0x2a,0x5b,0xea,0x6b,0xfc,0x64,0x2f,0x1f,0x3a,0x37,0xe9,0xa0,0xd2,0x32,0xfc,
0x34,0x84,0x93,0x47,0xb9,0x49,0x83,0x85,0x1a,0x59,0x2b,0x44,0x3e,0x3d,0x09,0x39,0x97,0x64,0xa8,0x93,
0x5a,0x13,0x72,0x03,0x78,0x48,0xa7,0x27,0xfd,0x0d,0xcc,0xf7,0x45,0xee,0x10,0x60,0x64,0x3b,0xec,0x95,
0x45,0x21,0x4a,0xc6,0xc9,0x4f,0x02,0xe5,0xd4,0xa6,0xc9,0xc8,0xf4,0xd6,0x29,0x08,0xfa,0xff,0xcf,0x67,
0x73,0xf2,0x59,0x61,0xca,0xff,0x45,0x46,0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45,0x65,0x08,0x07,0x28,0x99,0x6c,0x43,0xe1,0x7b,0xa8,
0xa6,0x36,0x4e,0x86,0x4d,0x5c,0x76,0xf7,0x33,0x8b,0x71,0x20,0x5b,0x46,0xf9,0xd0,0x31,0x81,0x0a,0x0d,
0xdb,0xd4,0xd8,0xba,0x9c,0x03,0xd2,0x8f,0x74,0x98,0xdf,0xb3,0x6e,0x86,0x6d,0x67,0xf6,0x33,0x92,0x2e,
0x9d,0xab,0x7f,0x8f,0x05,0x31,0xbc,0x24,0x90,0xb3,0x18,0x7a,0x0e,0xbb,0xa3,0xd2,0x46,0x78,0x3a,0x07,
0x18,0xc6,0x2f,0x01,0x88,0xfb,0x04,0x13,0x5f,0x96,0x3c,0x09,0x92,0xbb,0x3a,0x41,0x26,0x14,0xe6,0x0d,
0xb4,0xdb,0xac,0xe4,0x2f,0x60,0xa4,0xc8,0x2e,0xa2,0xa7,0x7d,0x6c,0xeb,0x2c,0xd2,0xf0,0xcb,0x7e,0xfe,
0x6d,0x01,0xda,0xdf,0x84,0x90,0xa7,0x94,0xb2,0x91,0x53,0x56,0x09,0xae,0x4d,0xa5,0xcc,0x92,0x1b,0x3d,
0x93,0x15,0x8b,0xc2,0x67,0x64,0xab,0x65,0x17,0x96,0x92,0xc9,0x1e,0xf5,0x4f,0xec,0x36,0xa2,0x3b,0x5d,
0xb9,0xcd,0x07,0x96,0x8a,0x5f,0x12,0x29,0xc8,0x98,0x86,0x1c,0x20,0xcb,0x43,0x2c,0xd7,0x49,0x5a,0xe1,
0x87,0xbf,0x78,0x96,0x6f,0x26,0xdb,0x18,0x7d,0x65,0xfb,0x00,0x33,0x1e,0x36,0x29,0xed,0x21,0xc4,0x33,
0x29,0x21,0x8e,0xfa,0x23,0x04,0x65,0xc2,0x66,0x84,0x12,0x05,0x94,0x24,0x4e,0x25,0x23,0x89,0x2e,0x60,
0xc5,0xfb,0x33,0x63,0x82,0x14,0xaf,0x40,0x54,0xee,0x80,0x46,0xc6,0xca,0x62,0x17,0x35,0x54,0x9e,0x9f,
0x09,0x52,0x2e,0x4d,0x91,0xae,0x80,0x5b,0xc6,0x58,0xac,0x72,0x8a,0x08,0x47,0x5c,0x81,0x80,0x74,0xf9,
0x51,0x22,0xe0,0x5f,0x81,0x5c,0x46,0x40,0x38,0x62,0x82,0x00,0x43,0xcc,0x78,0xdf,0x92,0x93,0xc3,0x98,
0x76,0x70,0xa7,0x3f,0xb8,0x92,0xc9,0x64,0x9b,0xc1,0x6b,0xe4,0x34,0x35,0x5f,0xbf,0x14,0xbf,0x10,0x3b,
0x24,0x19,0x16,0x9d,0x28,0xc1,0xa6,0x2f,0x35,0xe9,0x21,0xc0,0xaa,0x71,0x15,0xd6,0x95,0x83,0x29,0x17,
0xd1,0xf9,0x17,0x4a,0xf3,0x09,0x0e,0xb9,0x6e,0xe6,0x1e,0x30,0x35,0xe7,0x1d,0x64,0x91,0x82,0x49,0x9f,
0x37,0x78,0xb4,0xda,0x55,0xab,0x59,0xef,0x27,0x59,0x04,0xe5,0xe5,0xfc,0x3a,0x44,0x49,0xdf,0x03,0x8a,
0xd8,0x6d,0xd1,0xfe,0xb3,0x86,0xca,0x7b,0x96,0x80,0x1d,0x8e,0xea,0xd9,0xec,0xa8,0x60,0x15,0x7a,0x0c,
0x67,0x19,0x3f,0xde,0xd6,0x4a,0x04,0xeb,0x7d,0x11,0xb8,0x33,0x28,0x06,0xa2,0xd2,0x24,0x43,0xac,0x42,
0x9a,0xc0,0x09,0x5a,0x5c,0x89,0x68,0xff,0xbe,0xdb,0xc4,0x34,0x11,0xc1,0xc3,0x66,0x96,0x3d,0x65,0x71,
0x69,0xc2,0x31,0xcc,0x42,0xd2,0xce,0x7c,0xca,0xdb,0x7d,0x27,0xe5,0xc6,0x55,0x21,0xe5,0xc6,0xd5,0x3b,
0x28,0x53,0xcc,0xa5,0x94,0x59,0xbb,0x2b,0x50,0x9e,0x4f,0xeb,0x62,0xdf,0x94,0x62,0x1b,0x4a,0x4a,0x12,
0x8d,0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xbc,0x40,0xd9,0xe6,0xc5,0x25,0x4e,0xeb,0x57,0xdd,0x4b,0x5a,0x34,0x8c,0x49,0xd3,0x6a,0xc8,
0x9b,0x13,0xdd,0x34,0x00,0xe9,0xa5,0xa5,0x1b,0x1f,0xf8,0x97,0x69,0x12,0x75,0x06,0xe1,0xcf,0x36,0xf6,
0x99,0x5a,0xcc,0x61,0xe4,0x18,0x12,0x9f,0x89,0xe9,0xcf,0xb1,0xd8,0xfb,0xc8,0x09,0x7a,0xcb,0x7f,0x25,
0x49,0x57,0x58,0x22,0x67,0xb7,0xaa,0xed,0x2c,0xf8,0x3b,0x1a,0x81,0x3d,0xc6,0xd2,0x07,0x7f,0xbe,0x6e,
0xf2,0x7b,0xbf,0xe0,0xe8,0xe2,0x4e,0x88,0xf9,0x67,0x7f,0x89,0x1a,0xe1,0xe7,0x7e,0xa9,0xb7,0x3c,0xfe,
0x37,0xc6,0x26,0x1d,0x0a,0x0f,0xe8,0xd4,0x97,0x9e,0xc1,0x0c,0x88,0xc2,0xca,0x09,0xdf,0x94,0xd7,0x1d,
0x6a,0x1f,0xe9,0x9b,0x63,0xf1,0xb5,0xf1,0x36,0xff,0xc8,0xfa,0x3f,0xf2,0xaa,0x5e,0xb3,0x7a,0x3d,0x00,
0x00};
#endif

File diff suppressed because it is too large Load Diff

View File

@ -2,12 +2,12 @@
#define __assets_version
const uint8_t VersionMajor = 2;
const uint8_t VersionMinor = 1;
const uint8_t VersionMinor = 2;
const uint8_t VersionPatch = 0;
const uint8_t VersionMetadata = 2;
const char VersionBranch[] = "release/2.1";
const char VersionSemVer[] = "2.1.0-beta.1";
const char VersionFullSemVer[] = "2.1.0-beta.1+2";
const uint8_t VersionMetadata = 0;
const char VersionBranch[] = "develop";
const char VersionSemVer[] = "2.2.0-unstable.1";
const char VersionFullSemVer[] = "2.2.0-unstable.1";
const char VersionCommitDate[] = "2018-04-29";
#endif

View File

@ -304,6 +304,13 @@ bool lastMotion = false;
void updateMotionTrigger()
{
if (motionTriggerSettingsChanged)
{
initMotionPins();
activeMotionStart = 0;
}
if (!motionTriggerSettings->enabled() || !motionTriggerSettings->triggerCount())
{
activeMotionStart = 0;
@ -378,6 +385,12 @@ void checkTriggers()
bool motionChanged = inMotionTrigger != lastMotion;
lastMotion = inMotionTrigger;
if (motionTriggerSettingsChanged)
{
motionChanged = true;
motionTriggerSettingsChanged = false;
}
if (!motionChanged && !timeTriggerChanged)
return;

View File

@ -1,5 +1,36 @@
function startApp()
{
// Source: https://github.com/axios/axios/issues/164
axios.interceptors.response.use(undefined, function axiosRetryInterceptor(err) {
var config = err.config;
// If config does not exist or the retry option is not set, reject
if(!config || !config.retry) return Promise.reject(err);
// Set the variable for keeping track of the retry count
config.__retryCount = config.__retryCount || 0;
// Check if we've maxed out the total number of retries
if(config.__retryCount >= config.retry) {
// Reject with the error
return Promise.reject(err);
}
// Increase the retry count
config.__retryCount += 1;
// Create new promise to handle exponential backoff
var backoff = new Promise(function(resolve) {
setTimeout(function() {
resolve();
}, config.retryDelay || 1);
});
// Return the promise in which recalls axios to retry the request
return backoff.then(function() {
return axios(config);
});
});
Vue.component('check', {
template: '<div class="check" :class="{ checked: value, disabled: disabled }" @keydown="handleKeyDown" @click="handleClick" tabindex="0"><div class="control"><div class="inner"></div></div><div class="label">{{ title }}</div></div>',
props: {
@ -119,7 +150,7 @@ function startApp()
});
var i18n = new VueI18n({
locale: navigator.language,
locale: navigator.language.split('-')[0],
fallbackLocale: 'en',
messages: messages
});
@ -338,7 +369,7 @@ function startApp()
loadStatus: function()
{
var self = this;
return axios.get('/api/status')
return axios.get('/api/status', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (typeof response.data == 'object')
@ -350,7 +381,7 @@ function startApp()
loadConnection: function()
{
var self = this;
return axios.get('/api/connection')
return axios.get('/api/connection', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (typeof response.data == 'object')
@ -362,7 +393,7 @@ function startApp()
loadSystem: function()
{
var self = this;
return axios.get('/api/system')
return axios.get('/api/system', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (typeof response.data == 'object')
@ -374,7 +405,7 @@ function startApp()
loadTimeTriggers: function()
{
var self = this;
return axios.get('/api/triggers/time')
return axios.get('/api/triggers/time', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (typeof response.data == 'object')
@ -419,7 +450,7 @@ function startApp()
loadMotionTriggers: function()
{
var self = this;
return axios.get('/api/triggers/motion')
return axios.get('/api/triggers/motion', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (typeof response.data == 'object')
@ -431,7 +462,7 @@ function startApp()
loadSteps: function()
{
var self = this;
return axios.get('/api/steps/values')
return axios.get('/api/steps/values', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (Array.isArray(response.data))
@ -481,7 +512,7 @@ function startApp()
ip: self.connection.ip,
subnetmask: self.connection.subnetmask,
gateway: self.connection.gateway,
})
}, { retry: 10, retryDelay: 1000 })
.then(function(response)
{
})
@ -499,7 +530,7 @@ function startApp()
self.saving = true;
axios.post('/api/system', self.system)
axios.post('/api/system', self.system, { retry: 10, retryDelay: 1000 })
.then(function(response)
{
self.showNotification(i18n.t('rebootPending'));
@ -595,7 +626,7 @@ function startApp()
var self = this;
if (!self.saving)
{
axios.get('/api/connection/status')
axios.get('/api/connection/status', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (typeof response.data == 'object')
@ -693,7 +724,9 @@ function startApp()
axios.post('/api/steps/values', {
transitionTime: 1000,
values: steps
values: steps,
retry: 10,
retryDelay: 1000
})
.then(function(response)
{
@ -761,7 +794,7 @@ function startApp()
});
}
axios.post('/api/triggers/time', timeSettings)
axios.post('/api/triggers/time', timeSettings, { retry: 10, retryDelay: 1000 })
.then(function(response)
{
})
@ -806,7 +839,7 @@ function startApp()
self.saving = true;
axios.post('/api/triggers/motion', self.triggers.motion)
axios.post('/api/triggers/motion', self.triggers.motion, { retry: 10, retryDelay: 1000 })
.then(function(response)
{
})
@ -857,7 +890,7 @@ function startApp()
{
var self = this;
axios.get('/api/steps')
axios.get('/api/steps', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
if (typeof response.data == 'object')
@ -945,7 +978,7 @@ function startApp()
count: self.calibration.count,
useCurve: self.calibration.useCurve,
ranges: self.calibration.ranges
})
}, { retry: 10, retryDelay: 1000 })
.then(function(response)
{
})
@ -960,7 +993,7 @@ function startApp()
{
var self = this;
return axios.get('/api/stacktrace/delete')
return axios.get('/api/stacktrace/delete', { retry: 10, retryDelay: 1000 })
.then(function(response)
{
self.status.resetReason = 0;

2
web/dist/bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@ -54,10 +54,8 @@
{{ $t('error.stackTrace') }}
</p>
<div v-if="status.stackTrace">
<a class="button button-primary" href="/api/stacktrace/get">{{ $t('error.stackTraceDownload') }}</a>
<a class="button" @click="deleteStackTrace">{{ $t('error.stackTraceDelete') }}</a>
</div>
<a class="button button-primary" href="/api/stacktrace/get" v-if="status.stackTrace">{{ $t('error.stackTraceDownload') }}</a>
<a class="button" @click="deleteStackTrace">{{ $t('error.stackTraceDelete') }}</a>
</div>

View File

@ -168,7 +168,7 @@ var messages = {
},
stackTrace: 'A stack trace is available. Please send it to your nearest developer and/or delete it from this Stairs device to remove this message.',
stackTraceDownload: 'Download',
stackTraceDelete: 'Remove',
stackTraceDelete: 'Hide',
stackTraceDeleteError: 'Could not remove stack trace'
},
@ -354,7 +354,7 @@ var messages = {
},
stackTrace: 'Een stack trace is beschikbaar. Stuur het naar de dichtsbijzijnde ontwikkelaar en/of verwijder het van deze Trap module om dit bericht te verbergen.',
stackTraceDownload: 'Downloaden',
stackTraceDelete: 'Verwijderen',
stackTraceDelete: 'Verbergen',
stackTraceDeleteError: 'Kan stack trace niet verwijderen'
},