Skip to content

Commit 7a7f3b9

Browse files
committed
Version V2.6.1 update. no functional changes.
1 parent 7a0792f commit 7a7f3b9

File tree

4 files changed

+108
-132
lines changed

4 files changed

+108
-132
lines changed

Receive/src/receive.ino

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// TiNo2 Gateway supports on-board measurements of temperature/humidity as well as BME280 and Dallas DS18B20.
4141

42-
#define SKETCHNAME "TiNo2 receive.ino V2.6.0 07/04/2024"
42+
#define SKETCHNAME "TiNo2 receive.ino V2.6.1 07/04/2024"
4343
#define BUILD 11
4444

4545
#include <Arduino.h>
@@ -49,19 +49,11 @@
4949
HardwareSerial *mySerial = &Serial;
5050

5151
// basically this sketch supports frequency hopping.
52-
// Working, but It needs to be thoroughly tested though
52+
// Working, but It needs to be thoroughly tested.
5353
#define NUM_CHANNELS 1
5454

55-
56-
#include "configuration.h"
57-
#include <datalinklayer.h>
58-
#include "PacketHandler.h" // definition of UseBits struct
59-
#include "print_things.h"
60-
#include <RFM69.h>
61-
#include "calibrate.h"
62-
#include "SHTSensor.h"
63-
64-
#include "key.h"
55+
#include "tino2.h"
56+
#include "user_config.h"
6557

6658

6759
/*****************************************************************************/
@@ -74,7 +66,7 @@ Calibration CalMode(Config, mySerial, &Mac, BUILD, (uint8_t*) KEY);
7466
/*****************************************************************************/
7567
/****** Periodic Interrupt Timer and RTC setup *****/
7668
/*****************************************************************************/
77-
#include "pitctrl.h"
69+
7870
PITControl PIT;
7971

8072
ISR(RTC_PIT_vect)
@@ -86,7 +78,7 @@ ISR(RTC_PIT_vect)
8678
/*****************************************************************************/
8779
/*** Actions ***/
8880
/*****************************************************************************/
89-
#include "actions.h"
81+
//#include "actions.h"
9082

9183
/* Globals */
9284
extern action *actions;
@@ -150,8 +142,6 @@ void disablePinISC(uint8_t pin)
150142
/*****************************************************************************/
151143
/*** SHT3x and SHTC3 Humidity Sensor ***/
152144
/*****************************************************************************/
153-
#include "sht_sensors.h" //TiNo2 wrapper class
154-
155145
SHTSensor *SHT3X=NULL;
156146
SHTSensor *SHTC3=NULL;
157147
SHTSensor *SHT4X=NULL;
@@ -269,7 +259,6 @@ uint8_t BME280_Measure(uint8_t enabled, BME280I2C *Bme280, HumiditySensor &Data)
269259
/*****************************************************************************/
270260
/*** Pin Change Interrupts ***/
271261
/*****************************************************************************/
272-
#include "PinchangeInterrupt.h"
273262
uint8_t event_triggered = 0;
274263

275264
// ISR for the Pin change Interrupt
@@ -306,7 +295,7 @@ void activityLed (unsigned char state, unsigned int time = 0)
306295
/*****************************************************************************/
307296
/*** READ VCC ***/
308297
/*****************************************************************************/
309-
#include "analog.h"
298+
//#include "analog.h"
310299
long Vcal_x_ADCcal;
311300

312301
/**********************************************************************/

Receive/src/key.h renamed to Receive/src/user_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
// comment the following line if you don't want to encrypt RF message traffic
1111
// it is STRONGLY recommended to change de Key below to your own 16-Byte Password
12-
//#define KEY "TheQuickBrownFox"
13-
#define KEY "WiNW_AzurdelaMer"
12+
#define KEY "TheQuickBrownFox"
13+
1414
#ifndef KEY
1515
#warning NO ENCRYPTION KEY DEFINED
1616
#define KEY NULL

Sensor/src/sensor.ino

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -87,29 +87,21 @@
8787
#include <avr/io.h>
8888
#include <avr/sleep.h>
8989
#include <avr/interrupt.h>
90-
#include "SHTSensor.h"
91-
#include "datalinklayer.h"
92-
#include "PacketHandler.h"
93-
#include "SPI.h"
94-
#include "PinchangeInterrupt.h"
95-
#include "print_things.h"
96-
#include "pitctrl.h"
90+
#include <SPI.h>
91+
#include "tino2.h"
9792

98-
99-
100-
#define FILENAME "TiNo2 sensor.cpp 2V6 29/03/2024"
93+
#define FILENAME "TiNo2 sensor.cpp V2.6.1 10/04/2024"
10194
#define BUILD 11
102-
10395
#define RADIO_SPI_PINSWAP 0
10496

10597
#define P(a) if(Config.SerialEnable) mySerial->a
10698

10799
/*****************************************************************************/
108-
/*** Compiler Switches ***/
100+
/*** User Configuration ***/
109101
/*****************************************************************************/
110102
// encryption key, if any
111103
// debug modes, enable/disable radio
112-
104+
// enable thermocouple sensor
113105
#include "user_config.h"
114106

115107

@@ -168,9 +160,10 @@ void Pin18InteruptFunc(){}
168160
/****************************************************************************/
169161
/********** MAX6675 k-Type Thermocouple **********/
170162
/****************************************************************************/
171-
//#include "tino_max6675.h"
172-
173163
// obsolete Chip. Use MAX31855 instead
164+
#if defined USE_MAX6675
165+
#include "tino_max6675.h"
166+
#endif
174167

175168
/****************************************************************************/
176169
/********** ADS1120 ADC **********/
@@ -189,15 +182,9 @@ PacketHandler *TiNo=NULL;
189182
/*****************************************************************************/
190183
/*** Radio Driver Instance ***/
191184
/*****************************************************************************/
192-
#include "RFM69.h"
193-
194185
RADIO radio;
195186
//RADIO radio(SS,15,0, digitalPinToInterrupt(15)); // for TiNo2 development boards, series 0 only
196-
/*****************************************************************************/
197-
/*** EEPROM Access and device calibration / Configuration ***/
198-
/*****************************************************************************/
199-
#include "configuration.h"
200-
#include "calibrate.h"
187+
201188

202189

203190
/*****************************************************************************/
@@ -264,27 +251,19 @@ void disablePinISC(uint8_t pin)
264251
/*****************************************************************************/
265252
/****** Periodic Interrupt Timer and RTC setup *****/
266253
/*****************************************************************************/
267-
268254
PITControl PIT;
269255

270256

271-
/*****************************************************************************/
272-
/*** I2C Bus Tools ***/
273-
/*****************************************************************************/
274-
#include "i2c_common.h"
275-
276-
277257
/*****************************************************************************/
278258
/*** SHT3x and SHTC3 Humidity Sensor ***/
279259
/*****************************************************************************/
280-
#include "sht_sensors.h"
281-
282260
HumiditySensor SensorData;
283261

284262
SHTSensor *SHT3X=NULL;
285263
SHTSensor *SHTC3=NULL;
286264
SHTSensor *SHT4X=NULL;
287265

266+
288267
/*****************************************************************************/
289268
/*** HTU21D Humidity Sensor ***/
290269
/*****************************************************************************/
@@ -433,7 +412,6 @@ static void SPI_MISO_Disable(uint8_t swap)
433412
/*****************************************************************************/
434413
/*** READ VCC ***/
435414
/*****************************************************************************/
436-
#include "analog.h"
437415
long Vcal_x_ADCcal;
438416

439417

@@ -467,7 +445,7 @@ void wakeUp3() { event_triggered |= 0x8; }
467445
/*** PIR ***/
468446
/*****************************************************************************/
469447

470-
#include "PIR.h"
448+
//#include "PIR.h"
471449
PIRModule PIR(Config, mySerial, wakeUp1);
472450

473451
/*****************************************************************************/

Sensor/src/user_config.h

Lines changed: 88 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,89 @@
1-
/*****************************************************************************/
2-
/*** Encryption ***/
3-
/*****************************************************************************/
4-
// encryption is OPTIONAL by compilation switch
5-
// encryption will encrypt the RF packages and the EEPROM content.
6-
// to enable encryption you will need to:
7-
// - provide a 16-byte encryption KEY (same on all nodes that talk encrypted)
8-
// - set the varable ENCRYPTION_ENABLE to 1 in the EEPROM, at runtime in Cfg.EncryptionEnable
9-
10-
// comment the following line if you don't want to encrypt RF message traffic
11-
// it is STRONGLY recommended to change de Key below to your own 16-Byte Password
12-
#define KEY "TheQuickBrownFox"
13-
#ifndef KEY
14-
#warning NO ENCRYPTION KEY DEFINED
15-
#define KEY NULL
16-
#endif
17-
18-
/*****************************************************************************/
19-
/*** Debug Modes ***/
20-
/*****************************************************************************/
21-
// comment the following line for test purposes. If commented, the radio won't be used and
22-
// a alternative loop function is compiled
23-
#define USE_RADIO
24-
25-
// comment the follwing line if you want to use the radio, but just
26-
// skip sending a pulse (useful for debugging)
27-
#define SEND_BURST
28-
29-
// Battery test enables a test message on even counts. the standard message protocol is then
30-
// abused to transmit a 24 bit count in the fileds count, humidity, flags. The temperature field is used to transmit
31-
// idle voltage, the vcc field is used to transmit idle voltage.
32-
33-
//#define BATTERYTEST
34-
35-
// enable debugging messages : there are two verbose levels: 1 and 2
36-
#define DEBUG 0
37-
38-
39-
/*****************************************************************************/
40-
/*** Serial Port ***/
41-
/*****************************************************************************/
42-
// Baud rate of serial port
43-
#define SERIAL_BAUD 57600
44-
45-
46-
/*****************************************************************************/
47-
/*** One-Wire and DS18B20 Temperature Sensors ***/
48-
/*****************************************************************************/
49-
// using DS18B20 is not recommended, the conversion time takes much longer
50-
// (700-900 ms) than with I2C based sensors (<50ms).
51-
52-
//#define USE_DS18B20
53-
54-
55-
/****************************************************************************/
56-
/********** MAX31865 PT100(0) **********/
57-
/****************************************************************************/
58-
// comment out the following line for use of a MAX31865 ADC with a PT100 or PT1000
59-
60-
//#define USE_MAX31865
61-
62-
63-
/****************************************************************************/
64-
/********** MAX31855 k-Type Thermocouple **********/
65-
/****************************************************************************/
66-
// comment out the following line for use of a k-type Thermocouple with MAX31855
67-
68-
//#define USE_MAX31855
69-
70-
71-
/****************************************************************************/
72-
/********** ADS1120 ADC **********/
73-
/****************************************************************************/
74-
// comment out the following line for use of a k-type Thermocouple with ADS1120
75-
#define USE_ADS1120
76-
77-
// specify whether you want to use the interrupt method (recommended) or the polling method (saves one GPIO)
78-
#if defined USE_ADS1120
79-
#define ADS1120_DOSLEEP 1 // 1= use sleep method, 0 = use polling method
1+
/*****************************************************************************/
2+
/*** Encryption ***/
3+
/*****************************************************************************/
4+
// encryption is OPTIONAL by compilation switch
5+
// encryption will encrypt the RF packages and the EEPROM content.
6+
// to enable encryption you will need to:
7+
// - provide a 16-byte encryption KEY (same on all nodes that talk encrypted)
8+
// - set the varable ENCRYPTION_ENABLE to 1 in the EEPROM, at runtime in Cfg.EncryptionEnable
9+
10+
// comment the following line if you don't want to encrypt RF message traffic
11+
// it is STRONGLY recommended to change de Key below to your own 16-Byte Password
12+
#define KEY "TheQuickBrownFox"
13+
#ifndef KEY
14+
#warning NO ENCRYPTION KEY DEFINED
15+
#define KEY NULL
16+
#endif
17+
18+
/*****************************************************************************/
19+
/*** Debug Modes ***/
20+
/*****************************************************************************/
21+
// comment the following line for test purposes. If commented, the radio won't be used and
22+
// a alternative loop function is compiled
23+
#define USE_RADIO
24+
25+
// comment the follwing line if you want to use the radio, but just
26+
// skip sending a pulse (useful for debugging)
27+
#define SEND_BURST
28+
29+
// Battery test enables a test message on even counts. the standard message protocol is then
30+
// abused to transmit a 24 bit count in the fileds count, humidity, flags. The temperature field is used to transmit
31+
// idle voltage, the vcc field is used to transmit idle voltage.
32+
33+
//#define BATTERYTEST
34+
35+
// enable debugging messages : there are two verbose levels: 1 and 2
36+
#define DEBUG 0
37+
38+
39+
/*****************************************************************************/
40+
/*** Serial Port ***/
41+
/*****************************************************************************/
42+
// Baud rate of serial port
43+
#define SERIAL_BAUD 57600
44+
45+
46+
/*****************************************************************************/
47+
/*** One-Wire and DS18B20 Temperature Sensors ***/
48+
/*****************************************************************************/
49+
// using DS18B20 is not recommended, the conversion time takes much longer
50+
// (700-900 ms) than with I2C based sensors (<50ms).
51+
52+
//#define USE_DS18B20
53+
54+
55+
/****************************************************************************/
56+
/********** MAX31865 PT100(0) **********/
57+
/****************************************************************************/
58+
// comment out the following line for use of a MAX31865 ADC with a PT100 or PT1000
59+
60+
//#define USE_MAX31865
61+
62+
63+
/****************************************************************************/
64+
/********** MAX6675 k-Type Thermocouple **********/
65+
/****************************************************************************/
66+
// obsolete Chip. Use MAX31855 instead
67+
// comment out the following line for use of a k-type Thermocouple with MAX6675
68+
69+
//#define USE_MAX6675
70+
71+
72+
/****************************************************************************/
73+
/********** MAX31855 k-Type Thermocouple **********/
74+
/****************************************************************************/
75+
// comment out the following line for use of a k-type Thermocouple with MAX31855
76+
77+
//#define USE_MAX31855
78+
79+
80+
/****************************************************************************/
81+
/********** ADS1120 ADC **********/
82+
/****************************************************************************/
83+
// comment out the following line for use of a k-type Thermocouple with ADS1120
84+
// #define USE_ADS1120
85+
86+
// specify whether you want to use the interrupt method (recommended) or the polling method (saves one GPIO)
87+
#if defined USE_ADS1120
88+
#define ADS1120_DOSLEEP 1 // 1= use sleep method, 0 = use polling method
8089
#endif

0 commit comments

Comments
 (0)