<?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[Driving dozens of sensors and relays on Core2 plus a temperature sensor]]></title><description><![CDATA[<p dir="auto">I am creating an exciting application where I need to read many sensors and also drive many relays. Also I need a Temperature sensor. and all on Core2.<br />
Now I succeeded to run PAHUB together with ExtIO2 so I can read many sensors and drive many relays...which is great!<br />
However, when I want to include a DS18B20 temperature sensor, I need the OneWire library. But when I add this library it throws errors below.<br />
What do I need to do to make it work?</p>
<p dir="auto">============================<br />
#include &lt;M5Core2.h&gt;<br />
#include "ClosedCube_TCA9548A.h"</p>
<p dir="auto">#include "UNIT_4RELAY.h"<br />
UNIT_4RELAY relay;</p>
<p dir="auto">#include "M5_EXTIO2.h"<br />
M5_EXTIO2 extio;<br />
#include &lt;OneWire.h&gt;</p>
<p dir="auto">========================================================================<br />
errors after compiling:</p>
<p dir="auto">In file included from /home/pi/Arduino/PAHUB_4RELAY/PaHUB_4RELAY/PaHUB_4RELAY.ino:19:<br />
/home/pi/Arduino/libraries/UNIT_4RELAY/src/UNIT_4RELAY.h:6:14: error: expected ',' or '...' before numeric constant<br />
#define addr 0X26<br />
^~~~<br />
/home/pi/Arduino/libraries/OneWire/OneWire.h:134:40: note: in expansion of macro 'addr'<br />
static uint8_t crc8(const uint8_t *addr, uint8_t len);<br />
^~~~</p>
]]></description><link>https://community.m5stack.com/topic/4714/driving-dozens-of-sensors-and-relays-on-core2-plus-a-temperature-sensor</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 05:07:08 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4714.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Oct 2022 07:10:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Driving dozens of sensors and relays on Core2 plus a temperature sensor on Mon, 31 Oct 2022 16:15:09 GMT]]></title><description><![CDATA[<p dir="auto">for benefit of community, I could solve myself: changed Onewire.h line 134 from addr to addr2. And it works 🙂</p>
]]></description><link>https://community.m5stack.com/post/19173</link><guid isPermaLink="true">https://community.m5stack.com/post/19173</guid><dc:creator><![CDATA[fly4fun]]></dc:creator><pubDate>Mon, 31 Oct 2022 16:15:09 GMT</pubDate></item></channel></rss>