Compare commits

..
5 Commits
Author SHA1 Message Date
jlehmann 93b42435c2 new hardware library version (2) 2021-05-11 17:37:38 +02:00
jlehmann e8b3391be1 new hardware library version 2021-05-11 17:35:54 +02:00
jlehmann 392232fed2 new CubeCell library version 2021-05-01 17:16:46 +02:00
jlehmann 58831dc9cb duplicate build flag 2021-04-30 14:45:03 +02:00
jlehmann 3db4cd6ca2 set XXX to wakeup if needed 2021-04-28 20:00:34 +02:00
3 changed files with 16 additions and 19 deletions
@@ -12,7 +12,7 @@ BME280 bme280;
/******************************************************************************/ /******************************************************************************/
/* Firmware Version */ /* Firmware Version */
/******************************************************************************/ /******************************************************************************/
static const int32_t fwVersion = 20210428; static const int32_t fwVersion = 20210511;
/******************************************************************************/ /******************************************************************************/
/* LoraWAN Settings */ /* LoraWAN Settings */
+12 -18
View File
@@ -22,7 +22,7 @@ Das sind die verwendeten Libraries [1]:
| URL | Branch | Commit | Commit Date | | URL | Branch | Commit | Commit Date |
| --- | ------ | ----- | ----------- | | --- | ------ | ----- | ----------- |
| https://github.com/HelTecAutomation/CubeCell-Arduino.git | 58ed094 | Mon, 26 Apr 2021 09:48:49 +0800 | | https://github.com/HelTecAutomation/CubeCell-Arduino.git | 0582aca | Sun, 9 May 2021 16:29:35 +0800 |
| https://github.com/sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.git | master | 688f255 | Fri, 3 Jan 2020 12:35:22 -0700 | | https://github.com/sparkfun/SparkFun_Qwiic_Scale_NAU7802_Arduino_Library.git | master | 688f255 | Fri, 3 Jan 2020 12:35:22 -0700 |
| https://github.com/sparkfun/SparkFun_BME280_Arduino_Library.git | master | 0b5eabf | Wed, 30 Dec 2020 20:44:27 -0700 | | https://github.com/sparkfun/SparkFun_BME280_Arduino_Library.git | master | 0b5eabf | Wed, 30 Dec 2020 20:44:27 -0700 |
@@ -47,25 +47,19 @@ $ arduino-cli board listall
$ arduino-cli core install CubeCell:CubeCell $ arduino-cli core install CubeCell:CubeCell
$ arduino-cli core list $ arduino-cli core list
Compile: Set FQBN:
$ arduino-cli compile --fqbn CubeCell:CubeCell:CubeCell-Board \ $ 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"
--build-property "build.band=REGION_EU868" \
--build-property "build.LORAWAN_CLASS=CLASS_A" \
--build-property "build.LORAWAN_CLASS=CLASS_A" \
--build-property "build.LORAWAN_DEVEUI_AUTO=0" \
--build-property "build.LORAWAN_NETMODE=true" \
--build-property "build.LORAWAN_ADR=true" \
--build-property "build.LORAWAN_UPLINKMODE=false" \
--build-property "build.LORAWAN_Net_Reserve=false" \
--build-property "build.LORAWAN_AT_SUPPORT=1" \
--build-property "build.RGB=0" \
--build-property "build.LORAWAN_DebugLevel=0" \
MiniBeieliNodeSketch
Output ist in /tmp/arduino-sketch-XXXXXXXXXXXXXXXXXXXXXXXXX und kann kopiert werden: Compile:
$ mkdir ~/arduino-builds-saved/20210423/ $ arduino-cli compile --clean --fqbn ${FQBN} MiniBeieliNodeSketch
$ cp /tmp/arduino-sketch-0870BAA82DFEB3C4E076C8FBBDEB25B4/CubeCell_Board_REGION_EU868_RGB_0.cyacd ~/arduino-builds-saved/20210423/
Upload: Upload:
$ arduino-cli upload --fqbn ${FQBN} -p /dev/ttyUSB0 MiniBeieliNodeSketch
Output ist in /tmp/arduino-sketch-XXXXXXXXXXXXXXXXXXXXXXXXX und kann kopiert werden:
$ mkdir ~/arduino-builds-saved/20210511/
$ cp /tmp/arduino-sketch-0870BAA82DFEB3C4E076C8FBBDEB25B4/CubeCell_Board_REGION_EU868_RGB_0.cyacd ~/arduino-builds-saved/20210511/
Upload Variante 2:
/home/joerg/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash -serial /dev/ttyUSB0 /home/joerg/arduino-builds-saved/latest/CubeCell_Board_REGION_EU868_RGB_0.cyacd /home/joerg/Arduino/hardware/CubeCell/CubeCell/tools/CubeCellflash/CubeCellflash -serial /dev/ttyUSB0 /home/joerg/arduino-builds-saved/latest/CubeCell_Board_REGION_EU868_RGB_0.cyacd
` `
+3
View File
@@ -122,6 +122,7 @@ func main() {
if devEui != "" { if devEui != "" {
fmt.Println("Hit Return when no weight is on scale (neither on A not on B)") fmt.Println("Hit Return when no weight is on scale (neither on A not on B)")
reader.ReadString('\n') reader.ReadString('\n')
sendCommand(s, "AT+XXX")
sensorData := ReadSensorData(s) sensorData := ReadSensorData(s)
fmt.Printf("%v\n", sensorData) fmt.Printf("%v\n", sensorData)
a0, _ := strconv.Atoi(sensorData.WeightARaw) a0, _ := strconv.Atoi(sensorData.WeightARaw)
@@ -130,10 +131,12 @@ func main() {
sendCommand(s, "AT+CAL_B_0="+sensorData.WeightBRaw) sendCommand(s, "AT+CAL_B_0="+sensorData.WeightBRaw)
fmt.Println("Put Weight on Scale A, then hit Return") fmt.Println("Put Weight on Scale A, then hit Return")
reader.ReadString('\n') reader.ReadString('\n')
sendCommand(s, "AT+XXX")
sensorData = ReadSensorData(s) sensorData = ReadSensorData(s)
aW, _ := strconv.Atoi(sensorData.WeightARaw) aW, _ := strconv.Atoi(sensorData.WeightARaw)
fmt.Println("Put Weight on Scale B, then hit Return") fmt.Println("Put Weight on Scale B, then hit Return")
reader.ReadString('\n') reader.ReadString('\n')
sendCommand(s, "AT+XXX")
sensorData = ReadSensorData(s) sensorData = ReadSensorData(s)
bW, _ := strconv.Atoi(sensorData.WeightBRaw) bW, _ := strconv.Atoi(sensorData.WeightBRaw)
calA := float64(aW-a0) / float64(calWeight) calA := float64(aW-a0) / float64(calWeight)