Am i doing something wrong?
Are two sensors too much for Atmega328?
library: today from git.
#include <Adafruit_BMP085.h>
#include "DHT.h"
#define MY_TRANSPORT_WAIT_READY_MS 100
//#define MY_DEBUG
#define MY_DISABLED_SERIAL
#define MY_SIGNING_SIMPLE_PASSWD "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#define MY_RADIO_RFM69
#define MY_RFM69_NEW_DRIVER
#define MY_RFM69_MAX_POWER_LEVEL_DBM 13
#define MY_NODE_ID 1
#include <MySensors.h>
MyMessage msgRSSIS(10, V_VAR1);
MyMessage msgRSSIR(11, V_VAR1);
MyMessage msgPowerd(12, V_VAR1);
MyMessage msgPowerp(13, V_VAR1);
MyMessage msgTempDHT(14, V_TEMP);
MyMessage msgHumDHT(15, V_HUM);
MyMessage msgTempBMP(16, V_TEMP);
MyMessage msgPresBMP(17, V_PRESSURE);
MyMessage msgPresSeaBMP(18, V_PRESSURE);
Adafruit_BMP085 bmp;
DHT dht(3, DHT22); //PIN, TYPE
void setup()
{
}
void presentation()
{
sendSketchInfo("Zewnetrzny", "1.0");
present(10, S_CUSTOM, "RSSI Sending",true);
present(11, S_CUSTOM, "RSSI Receiving",true);
present(12, S_CUSTOM, "Power dbm",true);
present(13, S_CUSTOM, "Power Percent",true);
present(14, S_TEMP, "DHT Temperature",true);
present(15, S_HUM, "DHT Humidity",true);
present(16, S_TEMP, "BMP Temperature",true);
present(17, S_BARO, "BMP Pressure hPa",true);
present(18, S_BARO, "BMP Pressure Sea hPa",true);
}
void loop()
{
send(msgRSSIS.set(RFM69_getSendingRSSI(),1));
wait(200);
send(msgRSSIR.set(RFM69_getReceivingRSSI(),1));
wait(200);
send(msgPowerd.set(RFM69_getTxPowerLevel(),1));
wait(200);
send(msgPowerp.set(RFM69_getTxPowerPercent(),1));
wait(200);
dht.begin();
send(msgTempDHT.set(dht.readTemperature(),1));
wait(200);
send(msgHumDHT.set(dht.readHumidity(),1));
wait(200);
bmp.begin();
send(msgTempBMP.set(bmp.readTemperature(),1));
wait(200);
send(msgPresBMP.set(bmp.readPressure()/100,1));
wait(200);
send(msgPresSeaBMP.set(bmp.readSealevelPressure(164)/100,1));
wait(10000);
}
void receive(const MyMessage &message)
{
}
Compilation result:
Sketch uses 20196 bytes (65%) of program memory. The maximum is 30720 bytes.
Global variables use 1694 bytes (82%) of dynamic memory, leaving 354 bytes for local variables. The maximum is 2048 bytes.
Low level of available memory, stability problems may occur.