Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
555f8aa46f | |
|
|
ebb9be6b0f | |
|
|
038a7a1215 | |
|
|
111fd2cd52 |
|
|
@ -12,7 +12,7 @@ BME280 bme280;
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Firmware Version */
|
/* Firmware Version */
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
static const int32_t fwVersion = 20240622;
|
static const int32_t fwVersion = 20250726;
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* LoraWAN Settings */
|
/* LoraWAN Settings */
|
||||||
|
|
@ -226,6 +226,7 @@ bool start_new_iteration = false;
|
||||||
bool next_package_is_init_package = true;
|
bool next_package_is_init_package = true;
|
||||||
uint32_t gRebootMs;
|
uint32_t gRebootMs;
|
||||||
char last_channel = 'X';
|
char last_channel = 'X';
|
||||||
|
bool toobigweightchange = false;
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/* Functions for Global Data Structures */
|
/* Functions for Global Data Structures */
|
||||||
|
|
@ -879,6 +880,7 @@ bool TooBigWeightChange()
|
||||||
Serial.printf("TooBigWeightChange (my_position: %d): %d...\n", my_position, big_difference);
|
Serial.printf("TooBigWeightChange (my_position: %d): %d...\n", my_position, big_difference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toobigweightchange = big_difference;
|
||||||
return big_difference;
|
return big_difference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -980,7 +982,7 @@ void loop()
|
||||||
{
|
{
|
||||||
if (ReadSensors(false)) {
|
if (ReadSensors(false)) {
|
||||||
// we send confirmed packages when weight change is too big or for every init package
|
// we send confirmed packages when weight change is too big or for every init package
|
||||||
isTxConfirmed = (TooBigWeightChange()) || (iteration <= INIT_PACKETS) || (iteration % INIT_PACKAGE_INTERVAL == 0);
|
isTxConfirmed = (toobigweightchange) || (iteration <= INIT_PACKETS) || (iteration % INIT_PACKAGE_INTERVAL == 0);
|
||||||
prepareTxFrame(appPort);
|
prepareTxFrame(appPort);
|
||||||
LoRaWAN.send();
|
LoRaWAN.send();
|
||||||
package_counter++;
|
package_counter++;
|
||||||
|
|
|
||||||
22
README.md
22
README.md
|
|
@ -22,7 +22,7 @@ Das sind die verwendeten Libraries [1]:
|
||||||
|
|
||||||
| URL | Branch | Commit | Commit Date |
|
| URL | Branch | Commit | Commit Date |
|
||||||
| --- | ------ | ----- | ----------- |
|
| --- | ------ | ----- | ----------- |
|
||||||
| https://github.com/HelTecAutomation/ASR650x-Arduino.git | 7d7e157 | Mon, 8 Apr 2024 10:51:43 +0800 |
|
| https://github.com/HelTecAutomation/ASR650x-Arduino.git | d9402fe | Tue, 8 Jul 2025 09:52:16 +0800 |
|
||||||
| https://github.com/sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.git | e6b91f8 | Mon, 26 Feb 2024 09:55:18 +0000 |
|
| https://github.com/sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.git | e6b91f8 | Mon, 26 Feb 2024 09:55:18 +0000 |
|
||||||
| https://github.com/sparkfun/SparkFun_BME280_Arduino_Library.git | c42e780 | Tue, 19 Sep 2023 14:53:45 -0600 |
|
| https://github.com/sparkfun/SparkFun_BME280_Arduino_Library.git | c42e780 | Tue, 19 Sep 2023 14:53:45 -0600 |
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ Installation:
|
||||||
`
|
`
|
||||||
$ brew install arduino-cli
|
$ brew install arduino-cli
|
||||||
$ arduino-cli version
|
$ arduino-cli version
|
||||||
arduino-cli Version: 1.0.0 Commit: 05c9852a Date: 2024-06-12T12:11:23Z
|
arduino-cli Version: 1.2.2 Commit: Homebrew Datum: 2025-04-22T13:49:40Z
|
||||||
|
|
||||||
$ arduino-cli sketch new MiniBeieliNodeSketch
|
$ arduino-cli sketch new MiniBeieliNodeSketch
|
||||||
|
|
||||||
|
|
@ -54,15 +54,15 @@ $ cd ~/Documents/Arduino/libraries
|
||||||
$ git clone https://github.com/sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.git
|
$ git clone https://github.com/sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.git
|
||||||
$ git clone https://github.com/sparkfun/SparkFun_BME280_Arduino_Library.git
|
$ git clone https://github.com/sparkfun/SparkFun_BME280_Arduino_Library.git
|
||||||
|
|
||||||
Set FQBN:
|
Set FQBN (show possible boards with 'arduino-cli board listall', without '-V2' for old CubeCell):
|
||||||
$ FQBN="CubeCell:CubeCell:CubeCell-Board:LORAWAN_REGION=6,LORAWAN_CLASS=0,LORAWAN_DEVEUI=0,LORAWAN_NETMODE=0,LORAWAN_ADR=0,LORAWAN_UPLINKMODE=1,LORAWAN_Net_Reserve=0,LORAWAN_AT_SUPPORT=0,LORAWAN_RGB=0,LORAWAN_DebugLevel=0"
|
$ FQBN="CubeCell:CubeCell:CubeCell-Board-V2:LORAWAN_REGION=6,LORAWAN_CLASS=0,LORAWAN_DEVEUI=0,LORAWAN_NETMODE=0,LORAWAN_ADR=0,LORAWAN_UPLINKMODE=1,LORAWAN_Net_Reserve=0,LORAWAN_AT_SUPPORT=0,LORAWAN_RGB=0,LORAWAN_DebugLevel=0"
|
||||||
|
|
||||||
Compile:
|
Compile:
|
||||||
$ arduino-cli compile --export-binaries --clean --fqbn ${FQBN} MiniBeieliNodeSketch
|
$ arduino-cli compile --export-binaries --clean --fqbn ${FQBN} MiniBeieliNodeSketch
|
||||||
|
|
||||||
=== Beispiel ===
|
=== Beispiel ===
|
||||||
joerg@mbp mini-beieli-node-cubecell % arduino-cli compile --export-binaries --clean --fqbn ${FQBN} MiniBeieliNodeSketch
|
joerg@mbp mini-beieli-node-cubecell % arduino-cli compile --export-binaries --clean --fqbn ${FQBN} MiniBeieliNodeSketch
|
||||||
Der Sketch verwendet 113756 Bytes (86%) des Programmspeicherplatzes. Das Maximum sind 131072 Bytes.
|
Der Sketch verwendet 114188 Bytes (87%) des Programmspeicherplatzes. Das Maximum sind 131072 Bytes.
|
||||||
|
|
||||||
Benutzte Bibliothek Version Pfad
|
Benutzte Bibliothek Version Pfad
|
||||||
LoRa 1.0 /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/libraries/LoRa
|
LoRa 1.0 /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/libraries/LoRa
|
||||||
|
|
@ -70,8 +70,8 @@ LoraMac_102 1.0.2 /Users/joerg/Documents/Ardu
|
||||||
SparkFun BME280 2.0.10 /Users/joerg/Documents/Arduino/libraries/SparkFun_BME280_Arduino_Library
|
SparkFun BME280 2.0.10 /Users/joerg/Documents/Arduino/libraries/SparkFun_BME280_Arduino_Library
|
||||||
SparkFun Qwiic Scale NAU7802 Arduino Library 1.0.5 /Users/joerg/Documents/Arduino/libraries/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library
|
SparkFun Qwiic Scale NAU7802 Arduino Library 1.0.5 /Users/joerg/Documents/Arduino/libraries/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library
|
||||||
|
|
||||||
Used platform Version Pfad
|
Verwendete Plattform Version Pfad
|
||||||
CubeCell:CubeCell 1.0.0 /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell
|
CubeCell:CubeCell 1.0.0 /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell
|
||||||
=============
|
=============
|
||||||
|
|
||||||
Upload:
|
Upload:
|
||||||
|
|
@ -81,13 +81,13 @@ $ arduino-cli upload --verbose --fqbn ${FQBN} -p /dev/tty.usbserial-0001 MiniBei
|
||||||
Beispiel:
|
Beispiel:
|
||||||
|
|
||||||
joerg@z240 mini-beieli-node-cubecell % arduino-cli upload --verbose --fqbn ${FQBN} -p /dev/tty.usbserial-0001 MiniBeieliNodeSketch
|
joerg@z240 mini-beieli-node-cubecell % arduino-cli upload --verbose --fqbn ${FQBN} -p /dev/tty.usbserial-0001 MiniBeieliNodeSketch
|
||||||
"/Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash" -serial "/dev/tty.usbserial-0001" "/private/var/folders/n6/jjw6yp4s2dz0sd76rz3k7mzm0000gn/T/arduino-sketch-97CDDDDD36F10A320334F076837B4C34/CubeCell_Board_REGION_EU868_RGB_0.cyacd"
|
"/Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash" -serial "/dev/tty.usbserial-0001" "/private/var/folders/n6/jjw6yp4s2dz0sd76rz3k7mzm0000gn/T/arduino/sketches/97CDDDDD36F10A320334F076837B4C34/CubeCell_Board_V2_REGION_EU868_RGB_0.cyacd"
|
||||||
|
|
||||||
$ mkdir -p cyacd/20211228
|
$ mkdir -p cyacd/v2/20240909
|
||||||
$ cp /private/var/folders/n6/jjw6yp4s2dz0sd76rz3k7mzm0000gn/T/arduino-sketch-97CDDDDD36F10A320334F076837B4C34/CubeCell_Board_REGION_EU868_RGB_0.cyacd cyacd/20211228
|
$ cp /private/var/folders/n6/jjw6yp4s2dz0sd76rz3k7mzm0000gn/T/arduino/sketches/97CDDDDD36F10A320334F076837B4C34/CubeCell_Board_V2_REGION_EU868_RGB_0.cyacd cyacd/v2/20240909
|
||||||
|
|
||||||
Alternative zum Upload der Firmware:
|
Alternative zum Upload der Firmware:
|
||||||
$ /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash -serial /dev/tty.usbserial-0001 cyacd/20220930/CubeCell_Board_REGION_EU868_RGB_0.cyacd
|
$ /Users/joerg/Documents/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash -serial /dev/tty.usbserial-0001 cyacd/v2/20240909/CubeCell_Board_REGION_EU868_RGB_0.cyacd
|
||||||
|
|
||||||
USB-Device kann am einfachsten wie folgt bestimmt werden:
|
USB-Device kann am einfachsten wie folgt bestimmt werden:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue