Bi-monthly release with minor bug fixes and improvements
Please Log in or Create an account to join the conversation.
#include <ArduinoJson.h>
#define DESTBUFSIZE 320
char destBuf[DESTBUFSIZE];
#ifdef __arm__
// should use uinstd.h to define sbrk but Due causes a conflict
extern "C" char* sbrk(int incr);
#else // __ARM__
extern char *__brkval;
#endif // __arm__
int freeMemory() {
char top;
#ifdef __arm__
return &top - reinterpret_cast<char*>(sbrk(0));
#elif defined(CORE_TEENSY) || (ARDUINO > 103 && ARDUINO != 151)
return &top - __brkval;
#else // __arm__
return __brkval ? &top - __brkval : &top - __malloc_heap_start;
#endif // __arm__
}
void getSensorData(bool pretty) {
and
int ret;
destBuf[0] = 0;// Null terminator
if (pretty)
ret = serializeJsonPretty(weatherDoc, destBuf, DESTBUFSIZE);
else
ret = serializeJson(weatherDoc, destBuf, DESTBUFSIZE);
Serial.print("ret :"); Serial.println(ret);
Serial.print("Free Memory: "); Serial.println(freeMemory());
Serial.print("DestBuf :"); Serial.println(destBuf);
case 'w':
//Serial.println(getSensorData(false));
getSensorData(false);
Serial.println(destBuf);
break;
case 'c':
Serial.println(getCurrentConfig());
break;
case 'p':
//Serial.println(getSensorData(true));
getSensorData(true);
Serial.println(destBuf);
break;
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
{
"Davis Anemometer": {
"init": true,
"direction": 3,
"avg speed": 0,
"min speed": 0,
"max speed": 0,
"rotations": 0
},
"Rain Sensor": {
"init": true,
"rainfall": 0,
"count": 0
},
"BME280": {
"init": true,
"Temp": 21.08,
"Pres": 974.0237,
"Hum": 26.83203
},
"DHT": {
"init": true,
"Temp": 19.9,
"Hum": 36
},
"MLX90614": {
"init": true,
"T amb": 21.01,
"T obj": 20.55001
},
"TSL2591": {
"init": true,
"Lux": 1.487565,
"Visible": 505,
"IR": 108,
"Gain": 32,
"Timing": 1
}
}
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Wemos Arduino Connected
D0 16
D1 5 Yellow SCL
D2 4 Green SDA
D3 0 Purple Anenometer Wind Speed
D4 2
D5 14
D6 12
D7 13
D8 15 Grey Button
Tx 1
Rx 3
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
/usr/bin/indiserver -v indi_weatherradio
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.