All features working
This commit is contained in:
@ -5,7 +5,10 @@
|
||||
|
||||
constexpr uint32_t serialBaudRate = 115200;
|
||||
|
||||
constexpr gpio_num_t wakeupButtonPin = GPIO_NUM_13;
|
||||
// The pin connected to the push button
|
||||
// The button should be connected to GND
|
||||
constexpr gpio_num_t wakeupButtonPin = GPIO_NUM_27;
|
||||
|
||||
// The time (in seconds) for which the device should stay awake after the button is pressed
|
||||
// The device also stays awake as long as a bluetooth connection is active
|
||||
constexpr uint32_t wakeupDurationAfterButtonPress = 30;
|
||||
|
@ -40,6 +40,10 @@ void saveTemperatureAtCurrentIndex(Temperature temp);
|
||||
|
||||
uint16_t getTotalNumberOfStoredBytes();
|
||||
|
||||
uint16_t getNumberOfMeasurements();
|
||||
|
||||
uint8_t getLastTemperature(uint8_t sensorIndex);
|
||||
|
||||
uint16_t getRecordedBytesAtOffset(uint8_t* buffer, uint16_t offset, uint16_t count);
|
||||
|
||||
void discardAllRecordedBytes();
|
@ -2,8 +2,15 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
// Note: Pin requires external 4.7kOhm pull-up
|
||||
constexpr uint8_t TEMPERATURE_SENSOR_PIN = 23;
|
||||
|
||||
constexpr uint8_t TEMPERATURE_SENSOR_MAX_COUNT = 2;
|
||||
|
||||
// The number of bytes composing a temperature sensor address
|
||||
constexpr int TEMPERATURE_SENSOR_ADDRESS_SIZE = 8;
|
||||
|
||||
constexpr uint8_t temperatureSensorNotAvailable = 0;
|
||||
constexpr uint8_t temperatureSensorFailure = 1;
|
||||
constexpr uint8_t temperatureMinimumValue = 2;
|
||||
@ -31,4 +38,6 @@ struct Temperature {
|
||||
|
||||
void temperatureConfigure();
|
||||
|
||||
void temperaturePerformUpdate(Temperature* temperatures);
|
||||
void temperaturePerformUpdate(Temperature* temperatures);
|
||||
|
||||
void copySensorAddress(uint8_t index, uint8_t* buffer);
|
Reference in New Issue
Block a user