Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
b85a725d
Commit
b85a725d
authored
Jun 22, 2022
by
Eric Duminil
Browse files
Merge branch 'develop'
parents
efdfde46
4705ed5b
Pipeline
#6589
passed with stage
in 2 minutes and 23 seconds
Changes
7
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
b85a725d
all
:
ifdef
board
pio
-f
-c
vim run
-e
$(board)
else
pio
-f
-c
vim run
endif
upload
:
pio
-f
-c
vim run
--target
upload
-e
$(board)
...
...
README.md
View file @
b85a725d
...
...
@@ -148,5 +148,5 @@ The commands can be sent via the Serial interface, from the webpage or via MQTT.
## License
Copyright © 202
1
,
[
HfT Stuttgart
](
https://www.hft-stuttgart.de/
)
Copyright © 202
2
,
[
HfT Stuttgart
](
https://www.hft-stuttgart.de/
)
[
GPLv3
](
https://choosealicense.com/licenses/gpl-3.0/
)
ampel-firmware/ampel-firmware.ino
View file @
b85a725d
...
...
@@ -19,7 +19,7 @@
/*
* This file is part of the "CO2 Ampel" project ( https://transfer.hft-stuttgart.de/gitlab/co2ampel and
* https://transfer.hft-stuttgart.de/gitlab/co2ampel/ampel-firmware )
* Copyright (c) 202
0
HfT Stuttgart.
* Copyright (c) 202
2
HfT Stuttgart.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
ampel-firmware/co2_sensor.cpp
View file @
b85a725d
...
...
@@ -56,6 +56,8 @@ namespace sensor {
void
calibrateSensorToSpecificPPM
(
int32_t
calibrationLevel
);
void
calibrateSensorRightNow
(
int32_t
calibrationLevel
);
void
setAutoCalibration
(
int32_t
autoCalibration
);
void
setTimer
(
int32_t
timestep
);
void
resetSCD
();
void
initialize
()
{
#if defined(ESP8266)
...
...
@@ -71,11 +73,12 @@ namespace sensor {
* SDA --- SDA (GPIO21) //NOTE: GPIO1 would be more convenient (right next to GPO3)
*/
#endif
Serial
.
println
(
F
(
"Sensor : Sensirion SCD30"
));
Serial
.
println
();
scd30
.
enableDebugging
();
// Prints firmware version in the console.
if
(
!
scd30
.
begin
(
config
::
auto_calibrate_sensor
))
{
Serial
.
println
(
F
(
"ERROR -
CO2 sensor
not detected. Please check wiring!"
));
Serial
.
println
(
F
(
"ERROR -
Sensirion SCD30
not detected. Please check wiring!"
));
led_effects
::
showKITTWheel
(
color
::
red
,
30
);
ESP
.
restart
();
}
...
...
@@ -99,6 +102,7 @@ namespace sensor {
Serial
.
print
(
getTemperatureOffset
());
Serial
.
println
(
F
(
" K"
));
//FIXME: Actually set auto_calibrate_sensor, depending on the config.
Serial
.
print
(
F
(
"Auto-calibration is "
));
Serial
.
println
(
config
::
auto_calibrate_sensor
?
"ON."
:
"OFF."
);
...
...
ampel-firmware/co2_sensor.h
View file @
b85a725d
...
...
@@ -12,8 +12,6 @@ namespace sensor {
void
initialize
();
bool
processData
();
void
startCalibrationProcess
();
void
setTimer
(
int32_t
timestep
);
void
resetSCD
();
float
getTemperatureOffset
();
}
#endif
ampel-firmware/util.h
View file @
b85a725d
...
...
@@ -26,7 +26,7 @@ class Ampel {
private:
static
void
showFreeSpace
();
public:
const
char
*
version
=
"v0.3.
0
"
;
// Update manually after significant changes.
const
char
*
version
=
"v0.3.
1-DEV
"
;
// Update manually after significant changes.
const
char
*
board
;
const
char
*
sensorId
;
const
char
*
macAddress
;
...
...
platformio.ini
View file @
b85a725d
...
...
@@ -26,5 +26,7 @@ lib_deps =
MCCI
LoRaWAN
LMIC
library
build_flags
=
-D
ARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS
; Conflict between 2 hal_init functions. see https://community.platformio.org/t/multiple-definitions-warning-cant-fix-it/27534/9
-D
hal_init
=
LMICHAL_init
-D
CFG_eu868
=
1
-D
CFG_sx1276_radio
=
1
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment