<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Compiling Sensor code using BME280 and ESP8266]]></title><description><![CDATA[<p dir="auto">I'm getting this error compiling.   MySensors.h:94:18: error: expected unqualified-id before '(' token.  Any Help??<br />
Here's the code</p>
<p dir="auto">/*********<br />
East Yard Outside Temp, Pressure, Humidity<br />
*********/<br />
// Enable debug prints<br />
#define MY_DEBUG</p>
<p dir="auto">// Enable and select radio type attached<br />
#define MY_RADIO_NRF24<br />
//#define MY_RADIO_RFM69<br />
//#define MY_RS485</p>
<p dir="auto">#include &lt;MySensors.h&gt;<br />
#include &lt;SPI.h&gt;<br />
#include &lt;Wire.h&gt;<br />
#include &lt;Adafruit_Sensor.h&gt;<br />
#include &lt;Adafruit_BME280.h&gt;</p>
<p dir="auto">#define CHILD_ID_HUM 0<br />
#define CHILD_ID_TEMP 1</p>
<p dir="auto">#define SEALEVELPRESSURE_HPA (1013.25)</p>
<p dir="auto">unsigned long delayTime;<br />
float temperature;<br />
float humidity;<br />
float pressure;<br />
bool metric = true;<br />
static const uint64_t UPDATE_INTERVAL = 60000;</p>
<p dir="auto">MyMessage msgHum(CHILD_ID_HUM, V_HUM);<br />
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);</p>
<p dir="auto">void presentation()<br />
{<br />
// Send the sketch version information to the gateway<br />
sendSketchInfo("East Yard THP", "1.1");</p>
<p dir="auto">// Register all sensors to gw (they will be created as child devices)<br />
present(CHILD_ID_HUM, S_HUM);<br />
present(CHILD_ID_TEMP, S_TEMP);<br />
metric = getControllerConfig().isMetric;<br />
}<br />
Adafruit_BME280 bme; // I2C<br />
//Adafruit_BME280 bme(BME_CS); // hardware SPI<br />
//Adafruit_BME280 bme(BME_CS, BME_MOSI, BME_MISO, BME_SCK); // software SPI</p>
<p dir="auto">void setup() {<br />
Serial.begin(115200);<br />
Serial.println(F("BME280 Sensor"));<br />
bool status;<br />
// default settings<br />
// (you can also pass in a Wire library object like &amp;Wire2)<br />
status = bme.begin(0x76);<br />
if (!status) {<br />
Serial.println("Could not find a valid BME280 sensor, check wiring!");<br />
while (1);<br />
}<br />
delayTime = 10000;</p>
<p dir="auto">Serial.println();<br />
}</p>
<p dir="auto">void loop() {<br />
printValues();<br />
sleep(UPDATE_INTERVAL);<br />
}</p>
<p dir="auto">void printValues() {<br />
Serial.print("Temperature = ");<br />
Serial.print(bme.readTemperature());<br />
Serial.println(" *C");<br />
// Convert temperature to Fahrenheit<br />
Serial.print("Temperature = ");<br />
Serial.print(1.8 * bme.readTemperature() + 32);<br />
temperature = 1.8 * bme.readTemperature() + 32;<br />
send(msgTemp.set(temperature, 1));<br />
Serial.println(" *F");</p>
<p dir="auto">Serial.print("Pressure = ");<br />
Serial.print(bme.readPressure() / 100.0F);<br />
pressure = bme.readPressure() / 100.0F;<br />
Serial.println(" hPa");</p>
<p dir="auto">Serial.print("Approx. Altitude = ");<br />
Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA));<br />
Serial.println(" m");</p>
<p dir="auto">Serial.print("Humidity = ");<br />
Serial.print(bme.readHumidity());<br />
humidity = bme.readHumidity();<br />
send(msgHum.set(humidity, 1));<br />
Serial.println(" %");<br />
}<br />
BME code works fine, but when I add MySensors code, I get the error.</p>
]]></description><link>https://forum.mysensors.org/topic/12264/compiling-sensor-code-using-bme280-and-esp8266</link><generator>RSS for Node</generator><lastBuildDate>Sun, 14 Jun 2026 17:14:22 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/12264.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Feb 2025 00:32:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Compiling Sensor code using BME280 and ESP8266 on Wed, 26 Feb 2025 06:22:09 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for looking.  What arduino ide version are you using and what version of mysensors?</p>
]]></description><link>https://forum.mysensors.org/post/114217</link><guid isPermaLink="true">https://forum.mysensors.org/post/114217</guid><dc:creator><![CDATA[dpcons]]></dc:creator><pubDate>Wed, 26 Feb 2025 06:22:09 GMT</pubDate></item><item><title><![CDATA[Reply to Compiling Sensor code using BME280 and ESP8266 on Wed, 26 Feb 2025 03:14:39 GMT]]></title><description><![CDATA[<p dir="auto">I didn't see anything obviously wrong, so I tried compiling your code.  Your code compiled fine for me.  I used ESP8266 Boards (2.5.0-Beta3) -&gt; Generic ESP8266 Module.<br />
Unfortunately, that doesn't help much with figuring out why your compiler is giving the error.</p>
]]></description><link>https://forum.mysensors.org/post/114215</link><guid isPermaLink="true">https://forum.mysensors.org/post/114215</guid><dc:creator><![CDATA[nagelc]]></dc:creator><pubDate>Wed, 26 Feb 2025 03:14:39 GMT</pubDate></item></channel></rss>