<?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[Add function MySensorsClearEEprom()]]></title><description><![CDATA[<p dir="auto">One thing that I have found quite frustrating is that when I develop some new feature or add a sensor to my MySensors-network I always forget to clear the eeprom and then I need to reprogram the arduino with /mysensors/MySensors/examples/ClearEepromConfig/ClearEepromConfig.ino<br />
Then I have to reprogram the code again and do my testing.<br />
Could you add a new function to the core code that has a function like:</p>
<pre><code>MySensorsClearEEprom()
{
#ifdef MYDEBUG
  Serial.println("Started clearing. Please wait...");
#endif
  for (uint16_t i=0; i&lt;EEPROM_LOCAL_CONFIG_ADDRESS; i++) {
        hwWriteConfig(i,0xFF);
  }
#ifdef MYDEBUG
  Serial.println("Clearing done.");
#endif
}
 
</code></pre>
<p dir="auto">I then can i my code while testing add this function in setup()</p>
<pre><code>#define PORT_CLEAR_EEPROM   6
  pinMode(PORT_CLEAR_EEPROM,INPUT);
  digitalWrite(PORT_CLEAR_EEPROM,HIGH);
  if(digitalRead(PORT_CLEAR_EEPROM) == LOW) {
     MySensorsClearEEprom()
  }
</code></pre>
<p dir="auto">If I set (in this case) port 6 to ground, the eeprom is cleared.</p>
]]></description><link>https://forum.mysensors.org/topic/7889/add-function-mysensorscleareeprom</link><generator>RSS for Node</generator><lastBuildDate>Tue, 21 Jul 2026 17:09:39 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/7889.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 29 Oct 2017 19:59:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Add function MySensorsClearEEprom() on Sun, 29 Oct 2017 22:47:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mickecarlsson" aria-label="Profile: mickecarlsson">@<bdi>mickecarlsson</bdi></a> Why not just add that to your sketches?  Or for that matter, create a library for it that you can just include in your sketches.</p>
]]></description><link>https://forum.mysensors.org/post/78454</link><guid isPermaLink="true">https://forum.mysensors.org/post/78454</guid><dc:creator><![CDATA[dbemowsk]]></dc:creator><pubDate>Sun, 29 Oct 2017 22:47:46 GMT</pubDate></item></channel></rss>