Commit b206573f authored by c_arpino's avatar c_arpino

modificación preliminar de la placa

parent e3602e01
EESchema Schematic File Version 4
LIBS:placa_1-cache
EELAYER 26 0
EELAYER END
$Descr A4 11693 8268
encoding utf-8
Sheet 1 1
Title ""
Date ""
Rev ""
Comp ""
Comment1 ""
Comment2 ""
Comment3 ""
Comment4 ""
$EndDescr
$Comp
L Sensor_Temperature:DS1822 Sensor_Temp1
U 1 1 5D419D78
P 2050 1450
F 0 "Sensor_Temp1" H 1820 1496 50 0000 R CNN
F 1 "DS1822" H 1820 1405 50 0000 R CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical" H 1050 1200 50 0001 C CNN
F 3 "http://datasheets.maximintegrated.com/en/ds/DS1822.pdf" H 1900 1700 50 0001 C CNN
1 2050 1450
1 0 0 -1
$EndComp
Wire Wire Line
2050 1150 2500 1150
Wire Wire Line
2350 1450 2500 1450
$Comp
L Connector_Generic:Conn_01x04 J1
U 1 1 5D41A80D
P 3700 1400
F 0 "J1" H 3950 1400 50 0000 L CNN
F 1 "Sensor_CO2" V 3850 1150 50 0000 L CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical" H 3700 1400 50 0001 C CNN
F 3 "~" H 3700 1400 50 0001 C CNN
1 3700 1400
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0101
U 1 1 5D41A89D
P 2050 1750
F 0 "#PWR0101" H 2050 1500 50 0001 C CNN
F 1 "GND" H 2055 1577 50 0000 C CNN
F 2 "" H 2050 1750 50 0001 C CNN
F 3 "" H 2050 1750 50 0001 C CNN
1 2050 1750
1 0 0 -1
$EndComp
$Comp
L power:+3.3V #PWR0102
U 1 1 5D41A990
P 2500 1150
F 0 "#PWR0102" H 2500 1000 50 0001 C CNN
F 1 "+3.3V" H 2515 1323 50 0000 C CNN
F 2 "" H 2500 1150 50 0001 C CNN
F 3 "" H 2500 1150 50 0001 C CNN
1 2500 1150
1 0 0 -1
$EndComp
Text GLabel 2650 1450 2 50 Input ~ 0
Temp
$Comp
L power:GND #PWR0103
U 1 1 5D41AAB1
P 3500 1300
F 0 "#PWR0103" H 3500 1050 50 0001 C CNN
F 1 "GND" V 3505 1172 50 0000 R CNN
F 2 "" H 3500 1300 50 0001 C CNN
F 3 "" H 3500 1300 50 0001 C CNN
1 3500 1300
0 1 1 0
$EndComp
Text GLabel 3500 1400 0 50 Input ~ 0
Vin
Text GLabel 3500 1500 0 50 Input ~ 0
TX1
Text GLabel 3500 1600 0 50 Input ~ 0
RX1
$Comp
L Connector:AudioJack3 J2
U 1 1 5D41B862
P 4900 1400
F 0 "J2" H 4880 1725 50 0000 C CNN
F 1 "AudioJack3" H 4880 1634 50 0000 C CNN
F 2 "Personal:AudioJack" H 4900 1400 50 0001 C CNN
F 3 "~" H 4900 1400 50 0001 C CNN
1 4900 1400
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR0104
U 1 1 5D41B936
P 5100 1300
F 0 "#PWR0104" H 5100 1050 50 0001 C CNN
F 1 "GND" V 5105 1172 50 0000 R CNN
F 2 "" H 5100 1300 50 0001 C CNN
F 3 "" H 5100 1300 50 0001 C CNN
1 5100 1300
0 -1 -1 0
$EndComp
Text GLabel 5100 1500 2 50 Input ~ 0
Audio
$Comp
L Device:LED D1
U 1 1 5D41C581
P 6150 2400
F 0 "D1" V 6095 2478 50 0000 L CNN
F 1 "LED" V 6186 2478 50 0000 L CNN
F 2 "LED_THT:LED_D3.0mm_IRBlack" H 6150 2400 50 0001 C CNN
F 3 "~" H 6150 2400 50 0001 C CNN
1 6150 2400
0 1 1 0
$EndComp
$Comp
L power:GND #PWR0105
U 1 1 5D41C5F3
P 6150 2550
F 0 "#PWR0105" H 6150 2300 50 0001 C CNN
F 1 "GND" H 6155 2377 50 0000 C CNN
F 2 "" H 6150 2550 50 0001 C CNN
F 3 "" H 6150 2550 50 0001 C CNN
1 6150 2550
1 0 0 -1
$EndComp
$Comp
L teensy:Teensy3.2 U2
U 1 1 5D41C6BD
P 7800 2300
F 0 "U2" H 7800 3887 60 0000 C CNN
F 1 "Teensy3.2" H 7800 3781 60 0000 C CNN
F 2 "teensy_library-master:Teensy30_31_32_LC" H 7800 1500 60 0001 C CNN
F 3 "" H 7800 1500 60 0000 C CNN
1 7800 2300
1 0 0 -1
$EndComp
Text GLabel 6800 2800 0 50 Input ~ 0
Audio
Text GLabel 8800 3100 2 50 Input ~ 0
Vin
$Comp
L Switch:SW_Push_Dual button1
U 1 1 5D41C854
P 4800 2200
F 0 "button1" H 4800 2485 50 0000 C CNN
F 1 "SW_Push_Dual" H 4800 2394 50 0000 C CNN
F 2 "Button_Switch_THT:SW_PUSH_6mm" H 4800 2400 50 0001 C CNN
F 3 "" H 4800 2400 50 0001 C CNN
1 4800 2200
1 0 0 -1
$EndComp
$Comp
L Switch:SW_Push_Dual button2
U 1 1 5D41C8F8
P 4800 2850
F 0 "button2" H 4800 3135 50 0000 C CNN
F 1 "SW_Push_Dual" H 4800 3044 50 0000 C CNN
F 2 "Button_Switch_THT:SW_PUSH_6mm" H 4800 3050 50 0001 C CNN
F 3 "" H 4800 3050 50 0001 C CNN
1 4800 2850
1 0 0 -1
$EndComp
$Comp
L Personal:OLED U1
U 1 1 5D41CABA
P 2650 2750
F 0 "U1" H 2978 2928 50 0000 L CNN
F 1 "OLED" H 2978 2837 50 0000 L CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical" H 2650 2750 50 0001 C CNN
F 3 "" H 2650 2750 50 0001 C CNN
1 2650 2750
1 0 0 -1
$EndComp
Wire Wire Line
6800 2200 6150 2200
Wire Wire Line
6150 2200 6150 2250
$Comp
L power:GND #PWR0107
U 1 1 5D41CCB4
P 2450 2300
F 0 "#PWR0107" H 2450 2050 50 0001 C CNN
F 1 "GND" H 2455 2127 50 0000 C CNN
F 2 "" H 2450 2300 50 0001 C CNN
F 3 "" H 2450 2300 50 0001 C CNN
1 2450 2300
-1 0 0 1
$EndComp
Text GLabel 2600 2300 1 50 Input ~ 0
Vin
Text GLabel 2750 2300 1 50 Input ~ 0
SCL
Text GLabel 2900 2300 1 50 Input ~ 0
SDA
$Comp
L Device:R R1
U 1 1 5D41CF41
P 2500 1300
F 0 "R1" H 2570 1346 50 0000 L CNN
F 1 "4.7K" H 2570 1255 50 0000 L CNN
F 2 "Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal" V 2430 1300 50 0001 C CNN
F 3 "~" H 2500 1300 50 0001 C CNN
1 2500 1300
1 0 0 -1
$EndComp
Connection ~ 2500 1150
Wire Wire Line
2650 1450 2500 1450
Connection ~ 2500 1450
$Comp
L power:+3.3V #PWR0108
U 1 1 5D41D04D
P 8800 3300
F 0 "#PWR0108" H 8800 3150 50 0001 C CNN
F 1 "+3.3V" V 8815 3428 50 0000 L CNN
F 2 "" H 8800 3300 50 0001 C CNN
F 3 "" H 8800 3300 50 0001 C CNN
1 8800 3300
0 1 1 0
$EndComp
$Comp
L power:GND #PWR0106
U 1 1 5D41E04B
P 4600 2200
F 0 "#PWR0106" H 4600 1950 50 0001 C CNN
F 1 "GND" V 4605 2072 50 0000 R CNN
F 2 "" H 4600 2200 50 0001 C CNN
F 3 "" H 4600 2200 50 0001 C CNN
1 4600 2200
0 1 1 0
$EndComp
$Comp
L power:GND #PWR0109
U 1 1 5D41E078
P 4600 2850
F 0 "#PWR0109" H 4600 2600 50 0001 C CNN
F 1 "GND" V 4605 2722 50 0000 R CNN
F 2 "" H 4600 2850 50 0001 C CNN
F 3 "" H 4600 2850 50 0001 C CNN
1 4600 2850
0 1 1 0
$EndComp
Text GLabel 5000 2200 2 50 Input ~ 0
but1
Text GLabel 5000 2850 2 50 Input ~ 0
but2
Text GLabel 6800 1800 0 50 Input ~ 0
but2
Text GLabel 6800 1900 0 50 Input ~ 0
but1
Text GLabel 6800 3500 0 50 Input ~ 0
SCL
Text GLabel 6800 3400 0 50 Input ~ 0
SDA
Text GLabel 6800 1200 0 50 Input ~ 0
TX1
Text GLabel 6800 1100 0 50 Input ~ 0
RX1
Text GLabel 6800 1000 0 50 Input ~ 0
GND
$Comp
L Personal:BT U3
U 1 1 5D429FBD
P 1800 2300
F 0 "U3" V 2065 2994 50 0000 C CNN
F 1 "BT" V 1974 2994 50 0000 C CNN
F 2 "Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_Vertical" H 1650 3200 50 0001 C CNN
F 3 "" H 1650 3200 50 0001 C CNN
1 1800 2300
0 -1 -1 0
$EndComp
$Comp
L power:+3.3V #PWR0110
U 1 1 5D42A1E3
P 1550 2750
F 0 "#PWR0110" H 1550 2600 50 0001 C CNN
F 1 "+3.3V" V 1565 2878 50 0000 L CNN
F 2 "" H 1550 2750 50 0001 C CNN
F 3 "" H 1550 2750 50 0001 C CNN
1 1550 2750
0 1 1 0
$EndComp
Text GLabel 1550 2650 2 50 Input ~ 0
Vin
$Comp
L power:GND #PWR0111
U 1 1 5D42A233
P 1550 2550
F 0 "#PWR0111" H 1550 2300 50 0001 C CNN
F 1 "GND" V 1555 2422 50 0000 R CNN
F 2 "" H 1550 2550 50 0001 C CNN
F 3 "" H 1550 2550 50 0001 C CNN
1 1550 2550
0 -1 -1 0
$EndComp
Text GLabel 1550 2450 2 50 Input ~ 0
RX2
Text GLabel 1550 2350 2 50 Input ~ 0
TX2
Text GLabel 6800 2100 0 50 Input ~ 0
TX2
Text GLabel 6800 2000 0 50 Input ~ 0
RX2
NoConn ~ 8800 1000
NoConn ~ 8800 1100
NoConn ~ 8800 1200
NoConn ~ 8800 1300
NoConn ~ 8800 1400
NoConn ~ 8800 1500
NoConn ~ 8800 1600
NoConn ~ 8800 1700
NoConn ~ 8800 1800
NoConn ~ 8800 1900
NoConn ~ 8800 2000
NoConn ~ 8800 2100
NoConn ~ 8800 2200
NoConn ~ 8800 2300
NoConn ~ 8800 2400
NoConn ~ 8800 2500
NoConn ~ 8800 2600
NoConn ~ 8800 2700
NoConn ~ 8800 2800
NoConn ~ 8800 2900
NoConn ~ 8800 3000
NoConn ~ 8800 3200
NoConn ~ 8800 3400
NoConn ~ 8800 3500
NoConn ~ 8800 3600
NoConn ~ 6800 3600
NoConn ~ 6800 3300
NoConn ~ 6800 3200
NoConn ~ 6800 3100
NoConn ~ 6800 3000
NoConn ~ 6800 2900
NoConn ~ 6800 2700
NoConn ~ 6800 2600
NoConn ~ 6800 2500
NoConn ~ 6800 2400
NoConn ~ 6800 2300
NoConn ~ 6800 1700
NoConn ~ 6800 1600
NoConn ~ 6800 1500
NoConn ~ 6800 1400
NoConn ~ 6800 1300
NoConn ~ 5100 1400
NoConn ~ 1550 2250
NoConn ~ 4600 3050
NoConn ~ 4600 2400
NoConn ~ 5000 2400
NoConn ~ 5000 3050
$Comp
L Connector:Jack-DC J2
U 1 1 5D483462
P 2000 4200
F 0 "J2" H 2055 4525 50 0000 C CNN
F 1 "Jack-DC" H 2055 4434 50 0000 C CNN
F 2 "" H 2050 4160 50 0001 C CNN
F 3 "~" H 2050 4160 50 0001 C CNN
1 2000 4200
1 0 0 -1
$EndComp
$Comp
L power:GND #PWR?
U 1 1 5D4836B8
P 2300 4300
F 0 "#PWR?" H 2300 4050 50 0001 C CNN
F 1 "GND" V 2305 4172 50 0000 R CNN
F 2 "" H 2300 4300 50 0001 C CNN
F 3 "" H 2300 4300 50 0001 C CNN
1 2300 4300
0 -1 -1 0
$EndComp
Text GLabel 2300 4100 2 50 Input ~ 0
Vin
$EndSCHEMATC
......@@ -68,7 +68,6 @@
(usegerberattributes false)
(usegerberadvancedattributes false)
(creategerberjobfile false)
(gerberprecision 5)
(excludeedgelayer true)
(linewidth 0.100000)
(plotframeref false)
......@@ -877,7 +876,7 @@
(segment (start 166.37 99.06) (end 160.02 92.71) (width 0.5) (layer B.Cu) (net 34))
(segment (start 124.46 81.28) (end 128.27 81.28) (width 0.5) (layer B.Cu) (net 54))
(zone (net 2) (net_name GND) (layer B.Cu) (tstamp 5D458844) (hatch edge 0.508)
(zone (net 2) (net_name GND) (layer B.Cu) (tstamp 5D458F56) (hatch edge 0.508)
(connect_pads yes (clearance 1))
(min_thickness 0.254)
(fill yes (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))
......
(export (version D)
(design
(source /home/tropos/camara-respiracion-suelo/hardware/electronics/placa_1/placa_1.sch)
(date "qua 31 jul 2019 17:58:52 -03")
(date "seg 05 ago 2019 15:11:38 -03")
(tool "Eeschema 5.0.2+dfsg1-1~bpo9+1")
(sheet (number 1) (name /) (tstamps /)
(title_block
......@@ -258,14 +258,14 @@
(node (ref U2) (pin 12)))
(net (code 2) (name +3V3)
(node (ref R1) (pin 1))
(node (ref U3) (pin 1))
(node (ref Sensor_Temp1) (pin 3))
(node (ref U3) (pin 1))
(node (ref U2) (pin 31)))
(net (code 3) (name Vin)
(node (ref U1) (pin 2))
(node (ref J1) (pin 2))
(node (ref U2) (pin 33))
(node (ref U3) (pin 2))
(node (ref U2) (pin 33)))
(node (ref J1) (pin 2))
(node (ref U1) (pin 2)))
(net (code 4) (name RX2)
(node (ref U2) (pin 11))
(node (ref U3) (pin 4)))
......@@ -278,8 +278,8 @@
(node (ref D1) (pin 1)))
(net (code 8) (name "Net-(U2-Pad53)")
(node (ref U2) (pin 53)))
(net (code 9) (name "Net-(U2-Pad8)")
(node (ref U2) (pin 8)))
(net (code 9) (name "Net-(U2-Pad7)")
(node (ref U2) (pin 7)))
(net (code 10) (name "Net-(U2-Pad27)")
(node (ref U2) (pin 27)))
(net (code 11) (name "Net-(U2-Pad24)")
......@@ -304,99 +304,98 @@
(node (ref U2) (pin 14)))
(net (code 21) (name "Net-(U2-Pad28)")
(node (ref U2) (pin 28)))
(net (code 22) (name "Net-(U2-Pad7)")
(node (ref U2) (pin 7)))
(net (code 23) (name "Net-(U2-Pad6)")
(net (code 22) (name "Net-(U2-Pad6)")
(node (ref U2) (pin 6)))
(net (code 24) (name "Net-(U2-Pad5)")
(net (code 23) (name "Net-(U2-Pad5)")
(node (ref U2) (pin 5)))
(net (code 25) (name "Net-(U2-Pad4)")
(net (code 24) (name "Net-(U2-Pad4)")
(node (ref U2) (pin 4)))
(net (code 26) (name "Net-(J2-PadR)")
(net (code 25) (name "Net-(J2-PadR)")
(node (ref J2) (pin R)))
(net (code 27) (name "Net-(button2-Pad3)")
(net (code 26) (name "Net-(button2-Pad3)")
(node (ref button2) (pin 3)))
(net (code 28) (name "Net-(button1-Pad3)")
(net (code 27) (name "Net-(button1-Pad3)")
(node (ref button1) (pin 3)))
(net (code 29) (name "Net-(button1-Pad4)")
(net (code 28) (name "Net-(button1-Pad4)")
(node (ref button1) (pin 4)))
(net (code 30) (name "Net-(button2-Pad4)")
(net (code 29) (name "Net-(button2-Pad4)")
(node (ref button2) (pin 4)))
(net (code 31) (name "Net-(U2-Pad41)")
(net (code 30) (name "Net-(U2-Pad41)")
(node (ref U2) (pin 41)))
(net (code 32) (name "Net-(U2-Pad52)")
(net (code 31) (name "Net-(U2-Pad52)")
(node (ref U2) (pin 52)))
(net (code 33) (name "Net-(U2-Pad51)")
(net (code 32) (name "Net-(U2-Pad51)")
(node (ref U2) (pin 51)))
(net (code 34) (name "Net-(U2-Pad50)")
(net (code 33) (name "Net-(U2-Pad50)")
(node (ref U2) (pin 50)))
(net (code 35) (name "Net-(U2-Pad49)")
(net (code 34) (name "Net-(U2-Pad49)")
(node (ref U2) (pin 49)))
(net (code 36) (name "Net-(U2-Pad48)")
(net (code 35) (name "Net-(U2-Pad48)")
(node (ref U2) (pin 48)))
(net (code 37) (name "Net-(U2-Pad47)")
(net (code 36) (name "Net-(U2-Pad47)")
(node (ref U2) (pin 47)))
(net (code 38) (name "Net-(U2-Pad46)")
(net (code 37) (name "Net-(U2-Pad46)")
(node (ref U2) (pin 46)))
(net (code 39) (name "Net-(U2-Pad45)")
(net (code 38) (name "Net-(U2-Pad45)")
(node (ref U2) (pin 45)))
(net (code 40) (name "Net-(U2-Pad44)")
(net (code 39) (name "Net-(U2-Pad44)")
(node (ref U2) (pin 44)))
(net (code 41) (name "Net-(U2-Pad43)")
(net (code 40) (name "Net-(U2-Pad43)")
(node (ref U2) (pin 43)))
(net (code 42) (name "Net-(U2-Pad42)")
(net (code 41) (name "Net-(U2-Pad42)")
(node (ref U2) (pin 42)))
(net (code 43) (name "Net-(U2-Pad40)")
(net (code 42) (name "Net-(U2-Pad40)")
(node (ref U2) (pin 40)))
(net (code 44) (name "Net-(U2-Pad39)")
(net (code 43) (name "Net-(U2-Pad39)")
(node (ref U2) (pin 39)))
(net (code 45) (name "Net-(U2-Pad38)")
(net (code 44) (name "Net-(U2-Pad38)")
(node (ref U2) (pin 38)))
(net (code 46) (name "Net-(U2-Pad37)")
(net (code 45) (name "Net-(U2-Pad37)")
(node (ref U2) (pin 37)))
(net (code 47) (name "Net-(U2-Pad36)")
(net (code 46) (name "Net-(U2-Pad36)")
(node (ref U2) (pin 36)))
(net (code 48) (name "Net-(U2-Pad35)")
(net (code 47) (name "Net-(U2-Pad35)")
(node (ref U2) (pin 35)))
(net (code 49) (name "Net-(U2-Pad34)")
(net (code 48) (name "Net-(U2-Pad34)")
(node (ref U2) (pin 34)))
(net (code 50) (name "Net-(U2-Pad32)")
(net (code 49) (name "Net-(U2-Pad32)")
(node (ref U2) (pin 32)))
(net (code 51) (name "Net-(U2-Pad30)")
(net (code 50) (name "Net-(U2-Pad30)")
(node (ref U2) (pin 30)))
(net (code 52) (name "Net-(U2-Pad29)")
(net (code 51) (name "Net-(U2-Pad29)")
(node (ref U2) (pin 29)))
(net (code 53) (name GND)
(node (ref button2) (pin 1))
(net (code 52) (name GND)
(node (ref D1) (pin 2))
(node (ref Sensor_Temp1) (pin 1))
(node (ref button1) (pin 1))
(node (ref button2) (pin 1))
(node (ref U3) (pin 3))
(node (ref Sensor_Temp1) (pin 1))
(node (ref J2) (pin S))
(node (ref U2) (pin 1))
(node (ref D1) (pin 2))
(node (ref U1) (pin 1))
(node (ref J1) (pin 1))
(node (ref J2) (pin S)))
(net (code 54) (name but1)
(node (ref U2) (pin 10))
(node (ref button1) (pin 2)))
(net (code 55) (name RX1)
(node (ref J1) (pin 1)))
(net (code 53) (name but1)
(node (ref button1) (pin 2))
(node (ref U2) (pin 10)))
(net (code 54) (name RX1)
(node (ref J1) (pin 4))
(node (ref U2) (pin 2)))
(net (code 56) (name SDA)
(node (ref U2) (pin 25))
(node (ref U1) (pin 4)))
(net (code 57) (name Temp)
(node (ref R1) (pin 2))
(node (ref Sensor_Temp1) (pin 2)))
(net (code 58) (name SCL)
(node (ref U1) (pin 3))
(node (ref U2) (pin 26)))
(net (code 59) (name Audio)
(net (code 55) (name SDA)
(node (ref U1) (pin 4))
(node (ref U2) (pin 25)))
(net (code 56) (name SCL)
(node (ref U2) (pin 26))
(node (ref U1) (pin 3)))
(net (code 57) (name Audio)
(node (ref U2) (pin 19))
(node (ref J2) (pin T)))
(net (code 60) (name but2)
(net (code 58) (name but2)
(node (ref button2) (pin 2))
(node (ref U2) (pin 9)))
(net (code 61) (name TX1)
(net (code 59) (name Temp)
(node (ref R1) (pin 2))
(node (ref U2) (pin 8))
(node (ref Sensor_Temp1) (pin 2)))
(net (code 60) (name TX1)
(node (ref U2) (pin 3))
(node (ref J1) (pin 3)))))
\ No newline at end of file
......@@ -341,7 +341,6 @@ NoConn ~ 6800 2600
NoConn ~ 6800 2500
NoConn ~ 6800 2400
NoConn ~ 6800 2300
NoConn ~ 6800 1700
NoConn ~ 6800 1600
NoConn ~ 6800 1500
NoConn ~ 6800 1400
......@@ -352,4 +351,6 @@ NoConn ~ 4600 3050
NoConn ~ 4600 2400
NoConn ~ 5000 2400
NoConn ~ 5000 3050
Text GLabel 6800 1700 0 50 Input ~ 0
Temp
$EndSCHEMATC
#include <Adafruit_SSD1306.h>
//#include <SparkFunBME280.h>
//#include <SparkFunCCS811.h>
#include <Wire.h>
//#include <Audio.h>
//#include "AudioSampleRooster2.h" // http://www.freesound.org/people/zgump/sounds/86334/
#include <OneWire.h>
#include <DallasTemperature.h>
#define OLED_RESET 4
......@@ -17,10 +15,14 @@
#define PIN_STARTBUTTON 8
#define PIN_SELECTBUTTON 7
// I2C CCS811
//#define CCS811_ADDR 0x5A
//CCS811 myCCS811(CCS811_ADDR);
//BME280 myBME280;
// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 6
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
int ledPin1 = 13;
int buttonPressed = 0;
......@@ -76,13 +78,6 @@ unsigned long started = millis();
IntervalTimer measurementTimer;
//testing sound
//AudioPlayMemory sound0;
//AudioMixer4 mix1; // two 4-channel mixers are needed in
//AudioOutputAnalog dac; // play to both I2S audio board and on-chip DAC
//AudioConnection c1(sound0, 0, mix1, 0);
//AudioConnection c10(mix1, 0, dac, 0);
void setup()
{
// I2C CCS811
......@@ -98,6 +93,8 @@ void setup()
measurementTimer.begin(timer, 1000000);
sensors.begin();
initDisplay();
pinMode(PIN_STARTBUTTON, INPUT_PULLUP);
......@@ -112,10 +109,6 @@ void setup()
delay(1600);
//preHeating();
//testing sound
// AudioMemory(10);
// mix1.gain(0, 1);
// sound0.play(AudioSampleRooster2);
//Start with empty display
OLEDdrawBackground();
......@@ -126,6 +119,7 @@ void loop()
char c = 0;
while (Serial.available()) {
c = Serial.read();
Serial.println(c);
}
while (Serial2.available()) {
......@@ -151,7 +145,6 @@ void loop()
buttonPressed = 1;
showLogo_oursci();
delay(300);
// sound0.play(AudioSampleRooster2);
OLEDdrawBackground();
}
......@@ -252,7 +245,9 @@ void process()
measure(&current);
// I2C CCS811
//measureSensors(&current);
//measureSensors(&current);
sensors.requestTemperatures(); // Send the command to get temperatures
current.temp = sensors.getTempCByIndex(0);
push_high_res(&current);
......@@ -452,40 +447,7 @@ void initDisplay()
display.display();
}
//I2C CCS811
/*
void initSensors()
{
myCCS811.begin();
myBME280.settings.commInterface = I2C_MODE;
myBME280.settings.I2CAddress = 0x76;
myBME280.settings.runMode = 3; //Normal mode
myBME280.settings.tStandby = 0;
myBME280.settings.filter = 4;
myBME280.settings.tempOverSample = 5;
myBME280.settings.pressOverSample = 5;
myBME280.settings.humidOverSample = 5;
delay(100); //Make sure sensor had enough time to turn on. BME280 requires 2ms to start up.
myBME280.begin();
delay(500);
}
int16_t measureSensors(struct Measurement* current)
{
if (myCCS811.dataAvailable()) {
//Calling this function updates the global tVOC and eCO2 variables
myCCS811.readAlgorithmResults();
current->eco2 = myCCS811.getCO2();
current->tvoc = myCCS811.getTVOC();
//current-> = myBME280.readTempC();
current->press = myBME280.readFloatPressure();
current->hum = myBME280.readFloatHumidity();
//This sends the temperature data to the CCS811
//myCCS811.setEnvironmentalData(BMEhumid, BMEtempC);
return 0;
}
return -1;
}
*/
// 'our-sci_logo', 128x64px made with http://javl.github.io/image2cpp/
const unsigned char oursci_logo [] PROGMEM = {
......@@ -762,7 +724,7 @@ const unsigned char humus_logo_plant [] PROGMEM = {
void showLogo_oursci(){