Skip to content

Commit

Permalink
version 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
francc committed Apr 26, 2024
1 parent a5c2f37 commit 16f51c7
Show file tree
Hide file tree
Showing 29 changed files with 301 additions and 194 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,29 @@ SensorWatcher is a firmware for the ESP32 family of microcontrollers that automa

- Download and install ESP-IDF 5.2 https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/linux-macos-setup.html
- Go to the esp32 or esp32s3 folder in this project, depending on what device you have, and run 'idf.py flash'.
- Then go to the tools folder in this project and use bigpostman-cli.py to configure the firmware.
- Then go to the tools folder in this project and use sensorwatcher-cli.py to configure the firmware.


# Community resources

- [Telegram group](https://t.me/SensorWatcher).


# License

Most of the code is released under the GPL-3 license. Some libraries are under the MIT license.


# ChangeLog

## 0.8

- Added support for ESP32-C3 and Xiao ESP32C3.

- Use the hardware USB Serial JTAG when available instead of TinyUSB.

- Use a single buffer istead of two for HTTP requests and responses.

## 0.7

- New "nodes" resource to track other SensorWatcher nodes sharing measurements.
Expand All @@ -122,7 +133,6 @@ Most of the code is released under the GPL-3 license. Some libraries are under t

- Devices status is now a string instead of a boolean.


## 0.6

- Replace zero timestamps with NOW before sending for all supported encodings.
Expand Down
7 changes: 7 additions & 0 deletions esp32c3/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The following four lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)


include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(sensor_watcher)
1 change: 1 addition & 0 deletions esp32c3/main
5 changes: 5 additions & 0 deletions esp32c3/partitions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x16000,
phy_init, data, phy, 0x1f000, 0x1000,
factory, app, factory, 0x20000, 1500K,
38 changes: 38 additions & 0 deletions esp32c3/sdkconfig.defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32c3"
CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=1
CONFIG_BT_NIMBLE_MAX_BONDS=1
CONFIG_BT_NIMBLE_MAX_CCCDS=0
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=n
CONFIG_BT_NIMBLE_SECURITY_ENABLE=n
CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU=23
CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT=1
CONFIG_BT_NIMBLE_MSYS_2_BLOCK_COUNT=1
CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=1
CONFIG_BT_NIMBLE_TRANSPORT_EVT_COUNT=4
CONFIG_BT_NIMBLE_GATT_MAX_PROCS=0
CONFIG_BT_NIMBLE_HS_FLOW_CTRL=n
CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS=n
CONFIG_BT_NIMBLE_WHITELIST_SIZE=1
CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_2M_PHY=n
CONFIG_BT_NIMBLE_LL_CFG_FEAT_LE_CODED_PHY=n
CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=50
CONFIG_BT_CTRL_BLE_SCAN_DUPL=n
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192
CONFIG_ESP_IPC_TASK_STACK_SIZE=1536
#CONFIG_LOG_DEFAULT_LEVEL_NONE=y
CONFIG_LOG_MAXIMUM_LEVEL_DEBUG=y
CONFIG_LOG_COLORS=n
CONFIG_MBEDTLS_ECP_RESTARTABLE=y
CONFIG_MBEDTLS_CMAC_C=y
CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED=y
CONFIG_LWIP_IPV6_AUTOCONFIG=y
CONFIG_LWIP_DHCP_RESTORE_LAST_IP=y
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
idf_component_register(SRCS "app_main.c" "adc.c" "application.c" "backends.c" "bigpacks.c" "bigpostman.c" "ble.c" "board.c" "devices.c" "enums.c" "framer.c" "httpdate.c" "i2c.c" "logs.c" "measurements.c" "nodes.c" "onewire.c" "pbuf.c" "sha256.c" "hmac.c" "schema.c" "wifi.c" "yuarel.c" INCLUDE_DIRS ".")
idf_component_register(SRCS "app_main.c" "adc.c" "application.c" "backends.c" "bigpacks.c" "postman.c" "ble.c" "board.c" "devices.c" "enums.c" "framer.c" "httpdate.c" "i2c.c" "logs.c" "measurements.c" "nodes.c" "onewire.c" "pbuf.c" "sha256.c" "hmac.c" "schema.c" "wifi.c" "yuarel.c" INCLUDE_DIRS ".")

target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-error=unused-value")
2 changes: 1 addition & 1 deletion source/adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#define adc_h

#include "enums.h"
#include "bigpostman.h"
#include "postman.h"

#define ADC_CHANNELS_NUM_MAX 10

Expand Down
Loading

0 comments on commit 16f51c7

Please sign in to comment.