Skip to content

Commit d18b088

Browse files
authored
Merge pull request #214 from mp-se/pressuremon
Merge pressuremon and gateway code into dev
2 parents bad9e27 + 19080ec commit d18b088

File tree

91 files changed

+7843
-3136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+7843
-3136
lines changed

.github/workflows/pio-build.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ jobs:
2222
cp gravitymon-ui/dist/assets/style.css.gz html/app.css.gz
2323
cp gravitymon-ui/dist/assets/index.js.gz html/app.js.gz
2424
25-
#cp gravitymon-ui/dist/index.html html/
26-
2725
- name: Setup PlatformIO
2826
uses: n-vr/[email protected]
2927

3028
- name: PlatformIO Run
3129
uses: karniv00l/platformio-run-action@v1
3230
with:
33-
environments: "gravity-release,gravity32-release,gravity32c3-release,gravity32s2-release,gravity32s3-release,gravity32lite-release"
31+
environments: "gravity-release,gravity32-release,gravity32c3-release,gravity32s2-release,gravity32s3-release,gravity32lite-release,gravity-olimex_esp32_c3_devkit_lipo,gravity-super_mini_esp32c3"
32+
# environments: "gravity-release,gravity32-release,gravity32c3-release,gravity32s2-release,gravity32s3-release,gravity32lite-release"
3433
jobs: 6
3534
silent: false
3635
verbose: true

.github/workflows/pre-commit.yaml .github/workflows/pre-commit.unused

-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# name: pre-commit
2-
32
# on:
43
# pull_request:
54
# push:
65
# branches:
76
# - master
87
# - dev
98
# - '2.0.0-fwk'
10-
119
# jobs:
1210
# pre-commit:
1311
# runs-on: ubuntu-latest

.gitignore

+2-7
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22
.vscode
33
.env
44
__pycache__
5-
_build
65
env
7-
*.map
8-
src_docs/_build/*
96
.env/*
107
*.pyc
11-
*.json
12-
gcov/*.gcno
13-
gcov/*.gcov
14-
gcov/*.gcda
8+
src_docs/_build/*
159
.DS_Store
10+
*.map

CONTRIBUTING.md

+10
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,14 @@
3232

3333
* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
3434

35+
#### **Adding a new board**
36+
37+
It's now possible to add new boards to GravityMon, these will not be tested as part of the release process since I dont really have access to all of them. This should be a showstopper since I test all the supported board types. In order to add a new board type do the following:
38+
39+
* If the board is not supported by Arduino/Platformio create the defintions and add them to the boards root directory. Place the pin defintions in a subfolder with the board id.
40+
* Add a new target to the platformio.ini file with the board defintion and configuration needed. Use the naming standard [env:gravity-boardid] for example [env:gravity-d1_mini], the result of this build will be copied to bin/custom-boardid.bin for example bin/custom-d1_mini.bin to indicate this is a custom board.
41+
* Update the documentation at src_docs/custom.rst
42+
* Test and verify
43+
* Create a PR
44+
3545
Thanks!
1.69 MB
Binary file not shown.

bin/custom-super_mini_esp32c3.bin

1.49 MB
Binary file not shown.

bin/firmware.bin

0 Bytes
Binary file not shown.

bin/firmware32.bin

0 Bytes
Binary file not shown.

bin/firmware32c3.bin

0 Bytes
Binary file not shown.

bin/firmware32lite.bin

0 Bytes
Binary file not shown.

bin/firmware32s2.bin

-16 Bytes
Binary file not shown.

bin/firmware32s3.bin

0 Bytes
Binary file not shown.

boards/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Folder for adding board defintions to add to arduino
2+
3+
boarddefinition in json and the corresponding variant in `boards/variantname`
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"build": {
3+
"arduino":{
4+
"ldscript": "esp32c3_out.ld"
5+
},
6+
"core": "esp32",
7+
"f_cpu": "160000000L",
8+
"f_flash": "80000000L",
9+
"flash_mode": "qio",
10+
"extra_flags": "-DARDUINO_ESP32C3_DEV",
11+
"mcu": "esp32c3",
12+
"variant": "olimex_esp32_c3_devkit_lipo"
13+
},
14+
"connectivity": [
15+
"wifi",
16+
"bluetooth"
17+
],
18+
"debug": {
19+
"openocd_target": "esp32c3.cfg"
20+
},
21+
"frameworks": [
22+
"arduino",
23+
"espidf"
24+
],
25+
"name": "Espressif ESP32-C3-DevKitM-1",
26+
"upload": {
27+
"flash_size": "4MB",
28+
"maximum_ram_size": 327680,
29+
"maximum_size": 4194304,
30+
"require_upload_port": true,
31+
"speed": 460800
32+
},
33+
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html",
34+
"vendor": "Espressif"
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
#include "soc/soc_caps.h"
6+
7+
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
8+
static const uint8_t LED_BUILTIN = 8;
9+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
10+
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
11+
12+
static const uint8_t TX = 21;
13+
static const uint8_t RX = 20;
14+
15+
// Fallback I2C pins
16+
static const uint8_t SCL = 0;
17+
static const uint8_t SDA = 1;
18+
19+
static const uint8_t GPIO0 = 0;
20+
static const uint8_t GPIO1 = 1;
21+
static const uint8_t GPIO2 = 2;
22+
static const uint8_t GPIO3 = 3;
23+
static const uint8_t GPIO4 = 4;
24+
static const uint8_t GPIO5 = 5;
25+
static const uint8_t GPIO6 = 6;
26+
27+
static const uint8_t GPIO7 = 7;
28+
static const uint8_t GPIO8 = 8;
29+
static const uint8_t GPIO9 = 9;
30+
static const uint8_t GPIO10 = 10;
31+
static const uint8_t GPIO20 = 20;
32+
static const uint8_t GPIO21 = 21;
33+
34+
#endif /* Pins_Arduino_h */

boards/super_mini_esp32c3.json

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "esp32c3_out.ld"
5+
},
6+
"core": "esp32",
7+
"extra_flags": [
8+
"-DARDUINO_SUPER_MINI_ESP32C3",
9+
"-DARDUINO_USB_MODE=1",
10+
"-DARDUINO_USB_CDC_ON_BOOT=1"
11+
],
12+
"f_cpu": "160000000L",
13+
"f_flash": "80000000L",
14+
"flash_mode": "qio",
15+
"hwids": [
16+
[
17+
"0x303a",
18+
"0x1001"
19+
]
20+
],
21+
"mcu": "esp32c3",
22+
"variant": "super_mini_esp32c3"
23+
},
24+
"connectivity": [
25+
"wifi"
26+
],
27+
"debug": {
28+
"openocd_target": "esp32c3.cfg"
29+
},
30+
"frameworks": [
31+
"arduino",
32+
"espidf"
33+
],
34+
"name": "ESP32C3-SuperMini",
35+
"upload": {
36+
"flash_size": "4MB",
37+
"maximum_ram_size": 327680,
38+
"maximum_size": 4194304,
39+
"require_upload_port": true,
40+
"speed": 460800
41+
},
42+
"url": "https://wiki.icbbuy.com/doku.php?id=developmentboard:esp32-c3mini#esp32-c3mini",
43+
"vendor": "ICBbuy"
44+
}
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
static const uint8_t LED_BUILTIN = 8;
7+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
8+
#define LED_BUILTIN LED_BUILTIN
9+
10+
static const uint8_t BOOT_BUILTIN = 9; // boot button
11+
#define BOOT_BUILTIN BOOT_BUILTIN
12+
13+
#define TX1 0
14+
#define RX1 1
15+
16+
static const uint8_t TX = 21;
17+
static const uint8_t RX = 20;
18+
19+
static const uint8_t SDA = 8;
20+
static const uint8_t SCL = 9;
21+
22+
static const uint8_t SS = 7;
23+
static const uint8_t MOSI = 6;
24+
static const uint8_t MISO = 5;
25+
static const uint8_t SCK = 4;
26+
27+
static const uint8_t A0 = 0;
28+
static const uint8_t A1 = 1;
29+
static const uint8_t A2 = 2;
30+
static const uint8_t A3 = 3;
31+
static const uint8_t A4 = 4;
32+
static const uint8_t A5 = 5;
33+
34+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)