Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
co2ampel
ampel-firmware
Commits
2fe7a4e7
Commit
2fe7a4e7
authored
Mar 18, 2022
by
Eric Duminil
Browse files
SLowly adding more from S8 co2.cpp
parent
37d52ef2
Pipeline
#6017
passed with stage
in 2 minutes and 8 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
ampel-firmware/co2_sensor.cpp
View file @
2fe7a4e7
...
...
@@ -12,6 +12,29 @@
#include "s8_uart.h" // Not used yet
#if (defined USE_SOFTWARE_SERIAL || defined ARDUINO_ARCH_RP2040)
#define S8_RX_PIN 5 // Rx pin which the S8 Tx pin is attached to (change if it is needed)
#define S8_TX_PIN 4 // Tx pin which the S8 Rx pin is attached to (change if it is needed)
#else
#define S8_UART_PORT 1 // Change UART port if it is needed
#endif
/* END CONFIGURATION */
S8_UART
*
sensor_S8
;
S8_sensor
sensor2
;
#ifdef USE_SOFTWARE_SERIAL
SoftwareSerial
S8_serial
(
S8_RX_PIN
,
S8_TX_PIN
);
#else
#if defined(ARDUINO_ARCH_RP2040)
REDIRECT_STDOUT_TO
(
Serial
)
// to use printf (Serial.printf not supported)
UART
S8_serial
(
S8_TX_PIN
,
S8_RX_PIN
,
NC
,
NC
);
#else
HardwareSerial
S8_serial
(
S8_UART_PORT
);
#endif
#endif
namespace
config
{
const
uint16_t
measurement_timestep_bootup
=
5
;
// [s] Measurement timestep during acclimatization.
const
uint8_t
max_deviation_during_bootup
=
20
;
// [%]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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