Hi Artur,
mOutputAsFloat(slot) should work for you.
Regards,
Dario.
From Mobile.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/64ee8b78-2a8c-4144-8985-2bffa3d06597%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
// Let the IDE point to the Souliss framework#include "SoulissFramework.h"
// Configure the framework#include "bconf/StandardArduino.h" // Use a standard Arduino#include "conf/usart.h" // USART RS485
#define USARTDRIVER_INSKETCH#define USART_TXENABLE 1#define USART_TXENPIN 3#define USARTDRIVER Serial/*************/
// Include framework code and libraries#include <SPI.h>
/*** All configuration includes should be above this line ***/ #include "Souliss.h"#include <DHT.h>DHT dht;float th=0;
// Define the RS485 network configuration#define myvNet_subnet 0xFF00#define Gateway_RS485 0xCE01#define Peer_RS485 0xCE02
# define ROW1B2_TEMPERATURE 5# define ROW1B2_HUMIDITY 7#define grh_Logic_Humidity(slot) Souliss_Logic_T53(memory_map, slot, 0.02, &data_changed)#define grh_Logic_Temperature(slot) Souliss_Logic_T52(memory_map, slot, 0.01, &data_changed)
inline void DefineTypicals(){
Set_Temperature(ROW1B2_TEMPERATURE); Set_Humidity(ROW1B2_HUMIDITY); dht.setup(2);}
inline void ProcessLogics(){ grh_Logic_Humidity(ROW1B2_HUMIDITY); grh_Logic_Temperature(ROW1B2_TEMPERATURE);}
inline void ProcessTimers(){ Serial.print("\n"); th = dht.getHumidity(); Serial.print(th, 1); ImportAnalog(ROW1B2_HUMIDITY, &th); Serial.print("\t\t"); th = dht.getTemperature(); Serial.print(th, 1); ImportAnalog(ROW1B2_TEMPERATURE, &th);}
void setup(){ Initialize(); // Set network parameters SetAddress(Peer_RS485, myvNet_subnet, Gateway_RS485); DefineTypicals(); Serial.begin(9600); Serial.println();}
void loop(){ // Here we start to play EXECUTEFAST() { UPDATEFAST();
FAST_50ms() { ProcessLogics();
}
FAST_2110ms() { ProcessTimers();
}
FAST_PeerComms(); } EXECUTESLOW() { UPDATESLOW();
SLOW_10s() {
} } }
You should use Persistance or LastIn (suggested), details on the wiki.
Dario.
From Mobile.
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/84615f83-b0c9-40cc-b7a1-2015c6200e99%40googlegroups.com.
#include "conf/Gateway_wLastin.h"Serial.print(LastIn_GetAnalog(1,5)); //Temp
Serial.print(LastIn_GetAnalog(1,7)); //Humid
#include "conf/Gateway_wPersistence.h"
Serial.print(pOutputAsFloat(1,5)); //Temp
Serial.print(pOutputAsFloat(1,7)); //Humid
--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+unsubscribe@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/93c45b7d-9cf4-4ca9-8d1b-1e879c185f0f%40googlegroups.com.