<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title></title>
        <description>The personal website of Michiel van der Wulp. Includes my domotics projects.</description>
        <link>https://michiel.vanderwulp.be/</link>
        <atom:link href="https://michiel.vanderwulp.be/feed.xml" rel="self" type="application/rss+xml"/>
        <pubDate>Tue, 02 Jun 2026 19:30:37 +0200</pubDate>
        <lastBuildDate>Tue, 02 Jun 2026 19:30:37 +0200</lastBuildDate>
        <generator>Jekyll v4.4.1</generator>
        <language>en</language>
        
        <item>
            <title>Two solar waterboiler projects</title>
            <description>&lt;h1 id=&quot;two-solar-waterboiler-projects&quot;&gt;Two Solar Waterboiler projects&lt;/h1&gt;

&lt;p&gt;Many people in my region have photo-voltaic (PV) panels installed on the roof, and are still using a natural gas geyser for heating domestic hot water. It would be nice, if the solar energy could also heat the water, which can be done by using a simple (cheap) electric water boiler.&lt;/p&gt;

&lt;p&gt;Simply replacing the gas geyser with an electric water boiler is a bad idea, since:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;the weather is not good enough to do that the whole year through - in the winter you will end up buying electricity, which is way more expensive than using gas to warm domestic hot water.&lt;/li&gt;
  &lt;li&gt;once the water in the tank is used, you will have cold water and have to wait a few hours.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Installing them both, and manually switching between them per season is possible, but the switching is cumbersome, and financially not optimal.&lt;/p&gt;

&lt;p&gt;Here we describe a solution to increase the solar energy self-consumption, and reduce the fossile energy (natural gas) usage by adding an electric waterboiler, which only heats water with &lt;strong&gt;excess&lt;/strong&gt; electricity from the solar panels, and switches &lt;strong&gt;automatically&lt;/strong&gt; between both systems (gas geyser and electric waterboiler).&lt;/p&gt;

&lt;p&gt;This system is guaranteed to always use the cheapest source of energy, provides unlimited hot domestic water, and is future-proof, since it can be switched to choose manually between electricity and gas.&lt;/p&gt;

&lt;p&gt;The implementation of this solution largely depends on the presence or absence of a home battery, and the other systems available in the house.&lt;br /&gt;
So, we discuss the following different &lt;a href=&quot;/tag_waterboiler.html&quot;&gt;solar waterboiler&lt;/a&gt; projects:&lt;/p&gt;

&lt;h2 id=&quot;project-j&quot;&gt;Project J&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;/domotica/Nodes/SolarWaterboilerWB/&quot;&gt;Solar panels with home battery, with natural gas, Home Assistant&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;project-m&quot;&gt;Project M&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;/domotica/Nodes/SolarWaterboilerNB/&quot;&gt;Solar panels without a home battery, with natural gas, Domoticz&lt;/a&gt;&lt;/p&gt;

</description>
            <pubDate>Sat, 30 May 2026 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/two-solar-waterboiler-projects.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/two-solar-waterboiler-projects.html</guid>
            
            <category>blog</category>
            
            <category>nodes</category>
            
            <category>tasmota</category>
            
            <category>waterboiler</category>
            
            
        </item>
        
        <item>
            <title>A new waterlevel measurement project</title>
            <description>&lt;p&gt;I recently created a waterlevel measurement system for my underground rainwater tank and wrote everything about it at:&lt;br /&gt;
&lt;a href=&quot;/domotica/Nodes/WaterLevel/&quot;&gt;Waterlevel measurement&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WL-01.png&quot; alt=&quot;WaterLevel&quot; /&gt;&lt;/p&gt;

</description>
            <pubDate>Sun, 12 Apr 2026 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/new-project-WaterLevel-measurement.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/new-project-WaterLevel-measurement.html</guid>
            
            <category>blog</category>
            
            <category>nodes</category>
            
            <category>tasmota</category>
            
            
        </item>
        
        <item>
            <title>A new CO2 sensor Tasmota project</title>
            <description>&lt;p&gt;I recently created a CO2 sensor in a box and wrote everything about it at:&lt;br /&gt;
&lt;a href=&quot;/domotica/Nodes/CO2-Sensor-Tasmota-SCD41-OLED/&quot;&gt;CO2 Sensor with Tasmota and SCD41 and SH1106 OLED display&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/P6100004.jpg&quot; alt=&quot;CO2-OLED&quot; /&gt;&lt;/p&gt;

</description>
            <pubDate>Tue, 10 Jun 2025 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/new-project-CO2-Sensor-SCD41-with-OLED-display-and-WS2812-color-LED.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/new-project-CO2-Sensor-SCD41-with-OLED-display-and-WS2812-color-LED.html</guid>
            
            <category>blog</category>
            
            <category>nodes</category>
            
            <category>tasmota</category>
            
            
        </item>
        
        <item>
            <title>A Tasmota node with a SCD41 CO2 sensor with a TM1637 quad 7-segment display</title>
            <description>&lt;p&gt;This website contains a new description for a node project which combines:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;A SuperMini ESP32-c3 development board.&lt;/li&gt;
  &lt;li&gt;A SCD41 CO2 sensor.&lt;/li&gt;
  &lt;li&gt;A TM1637 quad 7-segment display to show the measured value.&lt;/li&gt;
  &lt;li&gt;A RGB LED in a nice chassis holder to show the CO2 levels: green, orange, red.&lt;/li&gt;
  &lt;li&gt;Tasmota software to control everything and publish the sensor values to other IOT devices or domotics systems, e.g. by MQTT.&lt;/li&gt;
  &lt;li&gt;A plastic box that fits all components.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See &lt;a href=&quot;/domotica/Nodes/CO2-Sensor-TM1637/&quot;&gt;CO2-Sensor-SCD41-TM1637&lt;/a&gt; for all the details.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/domotica/Nodes/CO2-Sensor-TM1637/P6020103.jpg&quot; alt=&quot;CO2-Sensor-SCD41-TM1637 in a box&quot; /&gt;&lt;/p&gt;

</description>
            <pubDate>Mon, 09 Jun 2025 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/new-project-CO2-Sensor-SCD41-TM1637.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/new-project-CO2-Sensor-SCD41-TM1637.html</guid>
            
            <category>node</category>
            
            <category>blog</category>
            
            
        </item>
        
        <item>
            <title>The module ESP32-C3 SuperMini also exists with a 0.42 inch OLED display</title>
            <description>&lt;p&gt;The ESP32c3 SuperMini is a well known development board. Recently, a variant was designed with a very small OLED display on-board. This must be very practical e.g. for debugging and monitoring.&lt;/p&gt;

&lt;p&gt;So, I bought a few of this module and collected all information about it.&lt;/p&gt;

&lt;p&gt;Also I created a connection overview without Chinese characters…&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://michiel.vanderwulp.be/domotica/Modules/ESP32-C3-SuperMini-OLED/&quot;&gt;module ESP32-C3-SuperMini-OLED&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I hope to use this for one of my next modules.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/domotica/Modules/ESP32-C3-SuperMini-OLED/oled-cn.png&quot; alt=&quot;ESP32-C3-SuperMini-OLED&quot; /&gt;&lt;/p&gt;

</description>
            <pubDate>Sun, 25 May 2025 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/new-module-esp32c3-supermini-with-OLED-display.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/new-module-esp32c3-supermini-with-OLED-display.html</guid>
            
            <category>modules</category>
            
            <category>blog</category>
            
            
        </item>
        
        <item>
            <title>How to use the OpenSuse Build Service to build Simutrans locally</title>
            <description>&lt;h2 id=&quot;why-do-we-do-this&quot;&gt;Why do we do this?&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;https://build.opensuse.org/&quot;&gt;OpenSUSE Build Service (OBS)&lt;/a&gt; is a fantastic system to build RPM packages for OpenSUSE and other distributions.
I always use it for building the RPMs whenever my favourite game Simutrans releases a new version.&lt;/p&gt;

&lt;p&gt;Up until now, I always worked with the on-line web-interface. That works well enough, but it is sometimes difficult to see what is going on when it fails, because you can not access the files during the build.&lt;/p&gt;

&lt;p&gt;So, I knew there is an other way, i.e. building locally by using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;osc&lt;/code&gt;, the command-line command for OBS!&lt;/p&gt;

&lt;h2 id=&quot;documentation-obs-and-rpm&quot;&gt;Documentation OBS and RPM&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.opensuse.org/openSUSE:Build_Service_Tutorial#Requirements&quot;&gt;openSUSE Build Service Tutorial&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.opensuse.org/openSUSE:OSC#Documentation&quot;&gt;openSUSE OSC Documentation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://build.opensuse.org/package/show/games/simutrans&quot;&gt;OBS Simutrans&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros&quot;&gt;openSUSE Packaging Conventions RPM Macros&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://rpm.org/documentation.html&quot;&gt;RPM documentation&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://ftp.osuosl.org/pub/rpm/max-rpm/&quot;&gt;Maximum RPM&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;local-installation&quot;&gt;Local installation&lt;/h2&gt;

&lt;p&gt;It all starts by installing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;osc&lt;/code&gt; on my &lt;strong&gt;openSUSE Leap 15.6&lt;/strong&gt; laptop:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;zypper in osc build rpm-build quilt obs-service-download_url
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To be able to run osc as normal user, not as root, the documentation at 
&lt;a href=&quot;https://en.opensuse.org/openSUSE:Build_Service_Tutorial#Requirements&quot;&gt;openSUSE:Build Service Tutorial&lt;/a&gt;
says that you have to run the following command:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo /usr/sbin/visudo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But you’d better make a new file in the /etc/sudoers.d folder (this creates a new file and uses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vi&lt;/code&gt; to edit it):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo visudo -f /etc/sudoers.d/osc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Add the following 2 lines and replace the placeholder michiel with your login name:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel    ALL = NOPASSWD: /usr/bin/build
michiel    ALL = NOPASSWD: /usr/bin/osc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My OBS project is to be created in this folder:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cd /home/michiel/development/osc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;online-preparation&quot;&gt;Online preparation&lt;/h2&gt;

&lt;p&gt;Online, at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://build.opensuse.org/&lt;/code&gt;, I logged in and branched my package &lt;strong&gt;simutrans&lt;/strong&gt;, which is now located at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://build.opensuse.org/project/show/home:m_vanderwulp:branches:games&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;project&lt;/strong&gt; is: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;home:m_vanderwulp:branches:games&lt;/code&gt;&lt;br /&gt;
The &lt;strong&gt;package&lt;/strong&gt; is: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;simutrans&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&quot;initial-check-out&quot;&gt;Initial check-out&lt;/h2&gt;

&lt;p&gt;So, we can check out the contents of this project as follows:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/osc&amp;gt; osc checkout home:m_vanderwulp:branches:games
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You will be asked for your OBS username and password, and the way you want to store the password on your system.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;NUM NAME              DESCRIPTION
1   Secret Service    Store password in Secret Service (GNOME Keyring backend) [secure, persistent]
2   KWallet           Store password in KWallet [secure, persistent]
3   Transient         Do not store the password and always ask for it [secure, in-memory]
4   Obfuscated config Store the password in obfuscated form in the osc config file [insecure, persistent]
5   Config            Store the password in plain text in the osc config file [insecure, persistent]
Select credentials manager [default=1]: 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you choose 5, the authentication settings are stored in: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/osc/oscrc&lt;/code&gt;, after you ran &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;osc&lt;/code&gt; for the first time.&lt;br /&gt;
If you typed the wrong password, or the wrong storage method, you have to correct or erase this file.&lt;/p&gt;

&lt;p&gt;If everything goes well, the result is:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/osc&amp;gt; tree
&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
├── home:m_vanderwulp
└── home:m_vanderwulp:branches:games
    └── simutrans
        ├── config.default
        ├── returnNull.patch
        ├── simutrans.changes
        ├── simutrans-fhs-home-directory.patch
        ├── simutrans-makefile.patch
        ├── simutrans.spec
        ├── simutrans-square.svg
        └── simutrans-src-124-3-1.zip

3 directories, 8 files
michiel@Delphinus:~/development/osc&amp;gt;
michiel@Delphinus:~/development/osc&amp;gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;home&lt;span class=&quot;se&quot;&gt;\:&lt;/span&gt;m_vanderwulp&lt;span class=&quot;se&quot;&gt;\:&lt;/span&gt;branches&lt;span class=&quot;se&quot;&gt;\:&lt;/span&gt;games/
michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games&amp;gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;simutrans/
michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games/simutrans&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;About the backslashes for the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; command: you do not need these to execute the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt;, but pressing 
the TAB-key to complete the path name only works if you do enter “:” instead of “:”.&lt;/p&gt;

&lt;h2 id=&quot;update-to-latest-online-version&quot;&gt;Update to latest online version&lt;/h2&gt;

&lt;p&gt;From here we can always update to the latest version online as follows.&lt;br /&gt;
We did not update anything yet, so:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games/simutrans&amp;gt; osc up
...
Updating simutrans
At revision 7848cf700004b6d25c22b8f7b9791ab7.
michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;perform-the-local-build&quot;&gt;Perform the local build&lt;/h2&gt;

&lt;p&gt;The &lt;a href=&quot;https://en.opensuse.org/openSUSE:OSC#Documentation&quot;&gt;openSUSE documentation&lt;/a&gt; says to use this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;osc build &amp;lt;platform&amp;gt; &amp;lt;arch&amp;gt; &amp;lt;specfile&amp;gt; [--clean|--noinit]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And they give this example:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;osc build openSUSE_Leap_42.1 x86_64 my-package.spec
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So, let’s try for platform 15.6 and architecture x86_64:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games/simutrans&amp;gt; osc build 15.6 x86_64
...
Building simutrans.spec &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;15.6/x86_64
Running source_service &lt;span class=&quot;s1&quot;&gt;&apos;format_spec_file&apos;&lt;/span&gt; ...
Running source_service &lt;span class=&quot;s1&quot;&gt;&apos;source_validator&apos;&lt;/span&gt; ...
Running source_service &lt;span class=&quot;s1&quot;&gt;&apos;format_spec_file&apos;&lt;/span&gt; ...
Running source_service &lt;span class=&quot;s1&quot;&gt;&apos;source_validator&apos;&lt;/span&gt; ...
Using &lt;span class=&quot;nb&quot;&gt;local &lt;/span&gt;file: simutrans.spec
Getting buildconfig from server and store to /home/michiel/development/osc/home:m_vanderwulp:branches:games/simutrans/.osc/_buildconfig-15.6-x86_64
Getting buildinfo from server and store to /home/michiel/development/osc/home:m_vanderwulp:branches:games/simutrans/.osc/_buildinfo-15.6-x86_64.xml
Updating cache of required packages

The build root needs packages from project &lt;span class=&quot;s1&quot;&gt;&apos;SUSE:SLE-15-SP3:Update&apos;&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
Note that malicious packages can compromise the build result or even your system.
Would you like to ...
0 - quit &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;default&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
1 - always trust packages from &lt;span class=&quot;s1&quot;&gt;&apos;SUSE:SLE-15-SP3:Update&apos;&lt;/span&gt;
2 - trust packages just this &lt;span class=&quot;nb&quot;&gt;time&lt;/span&gt;
? 
1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;etc… many more to trust - and finally:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Delphinus finished &lt;span class=&quot;s2&quot;&gt;&quot;build simutrans.spec&quot;&lt;/span&gt; at Thu Apr 10 05:59:10 UTC 2025.

/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/SRPMS/simutrans-124.3.1-0.src.rpm

/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/simutrans-124.3.1-0.x86_64.rpm
/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/simutrans-debugsource-124.3.1-0.x86_64.rpm
/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/simutrans-makeobj-124.3.1-0.x86_64.rpm
/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/simutrans-debuginfo-124.3.1-0.x86_64.rpm
/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/simutrans-makeobj-debuginfo-124.3.1-0.x86_64.rpm
michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games/simutrans&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The result is thus in:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games/simutrans&amp;gt; tree /var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/
/var/tmp/build-root/15.6-x86_64/home/abuild/rpmbuild/RPMS/x86_64/
├── simutrans-124.3.1-0.x86_64.rpm
├── simutrans-debuginfo-124.3.1-0.x86_64.rpm
├── simutrans-debugsource-124.3.1-0.x86_64.rpm
├── simutrans-makeobj-124.3.1-0.x86_64.rpm
└── simutrans-makeobj-debuginfo-124.3.1-0.x86_64.rpm

0 directories, 5 files
michiel@Delphinus:~/development/osc/home:m_vanderwulp:branches:games/simutrans&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;I am looking forward to the next release of Simutrans, and hope to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;osc&lt;/code&gt; to get the build working.&lt;br /&gt;
If the build would fail, I can inspect the files that exist at that moment, and figure out a solution more easily.&lt;/p&gt;

</description>
            <pubDate>Thu, 10 Apr 2025 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/post-obs-build-locally.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/post-obs-build-locally.html</guid>
            
            <category>tools</category>
            
            <category>blog</category>
            
            <category>opensuse</category>
            
            
        </item>
        
        <item>
            <title>PlatformIO Core (CLI) installation on OpenSuse Tumbleweed</title>
            <description>&lt;p&gt;Recently, I installed a fresh OpenSuse Tumbleweed, and wanted to see if I can use it with PlatformIO.&lt;/p&gt;

&lt;p&gt;So, first thing to do, is to see if it is already installed:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@vega:~&amp;gt; pio

The program &lt;span class=&quot;s1&quot;&gt;&apos;pio&apos;&lt;/span&gt; can be found &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;following packages:
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python311-platformio &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/pio, repository: download.opensuse.org-oss &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python312-platformio &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/pio, repository: download.opensuse.org-oss &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python313-platformio &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/pio, repository: download.opensuse.org-oss &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python311-platformio &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/pio, repository: openSUSE-20240124-0 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python312-platformio &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/pio, repository: openSUSE-20240124-0 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python313-platformio &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/pio, repository: openSUSE-20240124-0 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;

Try installing with:
    &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;zypper &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &amp;lt;selected_package&amp;gt;

michiel@vega:~&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Well, that is good news: it seems to be so easy to get started!&lt;/p&gt;

&lt;p&gt;Let’s see what python we have here:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@vega:~&amp;gt; python &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
 python: &lt;span class=&quot;nb&quot;&gt;command &lt;/span&gt;not found
michiel@vega:~&amp;gt; python3 &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
Python 3.11.11
michiel@vega:~&amp;gt; python2 &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
 python2: &lt;span class=&quot;nb&quot;&gt;command &lt;/span&gt;not found
michiel@vega:~&amp;gt; python3.11 &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
Python 3.11.11
michiel@vega:~&amp;gt; python3.10 &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;

The program &lt;span class=&quot;s1&quot;&gt;&apos;python3.10&apos;&lt;/span&gt; can be found &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;following packages:
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python310-base &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/python3.10, repository: download.opensuse.org-oss &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; python310-base &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; path: /usr/bin/python3.10, repository: openSUSE-20240124-0 &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;

Try installing with:
    &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;zypper &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt; &amp;lt;selected_package&amp;gt;

michiel@vega:~&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Hmmm, no &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python&lt;/code&gt;? That is confusing.&lt;/p&gt;

&lt;p&gt;But I studied this a bit, and it seems this has been done with a reason: 
if you install a generic &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python&lt;/code&gt; and make it point to e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3.11&lt;/code&gt;, then programs that only work with e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3.6&lt;/code&gt; may give errors, and it is hard to trace the origin of these errors. So, the people who created Tumbleweed did not want to deal with that - and force everyone to choose a python version.&lt;/p&gt;

&lt;p&gt;So, let’s install platformio:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@vega:~&amp;gt; &lt;span class=&quot;nb&quot;&gt;sudo &lt;/span&gt;zypper &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;python311-platformio 
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;sudo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; password &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;root: 
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 4 recommended packages were automatically selected:
  python311-httptools python311-PyYAML python311-wcwidth python311-websockets

The following 24 NEW packages are going to be installed:
  python311-aiofiles python311-ajsonrpc python311-anyio python311-bottle python311-click 
  python311-colorama python311-h11 python311-httptools python311-ifaddr 
  python311-marshmallow python311-packaging python311-platformio python311-pyelftools
  python311-pyserial python311-PyYAML python311-semantic_version python311-sniffio 
  python311-starlette python311-tabulate python311-uvicorn python311-wcwidth 
  python311-websockets python311-wsproto python311-zeroconf

24 new packages to install.

Package download size:     3,8 MiB

Package &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;size change:
              |      17,1 MiB  required by packages that will be installed
    17,1 MiB  |  -      0 B    released by packages that will be removed

Backend:  classic_rpmtrans
Continue? &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;y/n/v/...? shows all options] &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;y&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;: 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And a long list of installed packages follows…&lt;/p&gt;

&lt;p&gt;Does it work?&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@vega:~&amp;gt; pio &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
PlatformIO Core, version 6.1.16
michiel@vega:~&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Yes, it works!&lt;/p&gt;

</description>
            <pubDate>Sun, 23 Feb 2025 00:00:00 +0100</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/post-platformio-core-cli-install-opensuse-tumbleweed.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/post-platformio-core-cli-install-opensuse-tumbleweed.html</guid>
            
            <category>tools</category>
            
            <category>blog</category>
            
            <category>platformio</category>
            
            <category>opensuse</category>
            
            
        </item>
        
        <item>
            <title>ESP32-C3 SuperMini - Blink - Platformio</title>
            <description>&lt;h2 id=&quot;goal-of-this-experiment&quot;&gt;Goal of this experiment&lt;/h2&gt;

&lt;p&gt;Use the module &lt;a href=&quot;https://michiel.vanderwulp.be/domotica/Modules/ESP32-C3-SuperMini/&quot;&gt;ESP32-C3 SuperMini&lt;/a&gt; with PlatformIO Core with the example code &lt;a href=&quot;https://docs.arduino.cc/built-in-examples/basics/Blink/&quot;&gt;Blink&lt;/a&gt;. The “Blink” sketch is a small program that does nothing else than blink the built-in LED.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;./domotica/Modules/ESP32-C3-SuperMini/ESP32-C3-SuperMini.jpg&quot; alt=&quot;the board&quot; style=&quot;width:200px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;All the steps are described here, so that even a beginner can follow.&lt;/p&gt;

&lt;p&gt;There is a similar description at the &lt;a href=&quot;https://docs.platformio.org/en/latest/core/quickstart.html&quot;&gt;PlatformIO documentation website&lt;/a&gt;, which we adapt slightly to be more Arduino compatible. This means that with the project set up as described here, you can either run PlatformIO to build, flash and monitor the software, or you can double-click on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; file, which opens the Arduino IDE, and work from there.&lt;/p&gt;

&lt;h2 id=&quot;install-platformio&quot;&gt;Install PlatformIO&lt;/h2&gt;

&lt;p&gt;Follow the description at &lt;a href=&quot;https://michiel.vanderwulp.be/platformio-core-cli-installation-linux.html&quot;&gt;PlatformIO Core Installation&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;the-code&quot;&gt;The code&lt;/h2&gt;

&lt;p&gt;I modified the program for the ESP32-C3 SuperMini:&lt;/p&gt;

&lt;div class=&quot;language-cpp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cm&quot;&gt;/*
  Blink

  Flashes a LED every second, repeatedly.

  The ESP32-C3 SuperMini has an on-board LED you can control. 
  It is attached to digital pin 8. 
  LED_BUILTIN is set to the correct LED pin.

  This example code is in the public domain.

  Adapted from:
  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// the LED is at pin  GPIO8&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LED_BUILTIN 8
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// the setup function runs once when you press reset or power the board&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// initialize digital pin LED_BUILTIN as an output.&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LED_BUILTIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// the loop function runs over and over again forever&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;digitalWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LED_BUILTIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// turn the LED on (LOW is the voltage level)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;delay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;50&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                      &lt;span class=&quot;c1&quot;&gt;// wait 50 ms&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;digitalWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LED_BUILTIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HIGH&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;// turn the LED off by making the voltage HIGH&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;delay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;950&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                      &lt;span class=&quot;c1&quot;&gt;// wait 950 ms&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;the-source-code-folder-structure&quot;&gt;The source code folder structure&lt;/h2&gt;

&lt;p&gt;We need to create an empty folder to store all the files for this project. I chose the folder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/home/michiel/development/myproject/&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~&amp;gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;development/
michiel@Delphinus:~/development&amp;gt; &lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;myproject
michiel@Delphinus:~/development&amp;gt; &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;myproject/
michiel@Delphinus:~/development/myproject&amp;gt; &lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;blink
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The Arduino IDE requires the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; file to be in a folder with the same name as the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; file.
Save the above code in a file with the name &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blink.ino&lt;/code&gt; in a folder named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blink&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We will use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blink&lt;/code&gt; folder instead of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;src&lt;/code&gt; folder from a normal PlatformIO project.&lt;/p&gt;

&lt;h2 id=&quot;the-platformioini-file&quot;&gt;The platformio.ini file&lt;/h2&gt;

&lt;p&gt;Create a new file in the project folder with the name &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;platformio.ini&lt;/code&gt; and the following content:&lt;/p&gt;

&lt;div class=&quot;language-ini highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nn&quot;&gt;[platformio]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;src_dir&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;blink&lt;/span&gt;

&lt;span class=&quot;nn&quot;&gt;[env:esp32c3_supermini]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;platform&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;espressif32&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;board&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;esp32-c3-devkitm-1&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;framework&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;arduino&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;the-project-folder-structure&quot;&gt;The project folder structure&lt;/h2&gt;

&lt;p&gt;So, now we have the following files and folders:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/myproject&amp;gt; tree
&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
├── blink
│   └── blink.ino
└── platformio.ini

1 directory, 2 files
michiel@Delphinus:~/development/myproject&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;get-platformio&quot;&gt;Get PlatformIO&lt;/h2&gt;

&lt;p&gt;As described in the &lt;a href=&quot;https://michiel.vanderwulp.be/platformio-core-cli-installation-linux.html&quot;&gt;PlatformIO Core Installation&lt;/a&gt; description, we now activate the virtual environment for our project for PlatformIO:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/myproject&amp;gt; get_pio
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;penv&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; michiel@Delphinus:~/development/myproject&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;compile-the-code&quot;&gt;Compile the code&lt;/h2&gt;

&lt;p&gt;Platformio installs the necessary libraries and compiles the code with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pio run&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;penv&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; michiel@Delphinus:~/development/myproject&amp;gt; pio run
Processing esp32c3_supermini &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;platform: espressif32&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; board: esp32-c3-devkitm-1&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; framework: arduino&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;-------------------------------------------------------------------------------------------------------&lt;/span&gt;
Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
Downloading  &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;####################################]  100%          &lt;/span&gt;
Unpacking  &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;####################################]  100%          &lt;/span&gt;
Tool Manager: toolchain-riscv32-esp@8.4.0+2021r2-patch5 has been installed!
Tool Manager: Installing https://github.com/tasmota/esptool/releases/download/v4.7.0/esptool-4.7.0.zip
Downloading  &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;####################################]  100%&lt;/span&gt;
Unpacking  &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;####################################]  100%&lt;/span&gt;
Tool Manager: tool-esptoolpy@1.40700.0 has been installed!
Verbose mode can be enabled via &lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-v&lt;/span&gt;, &lt;span class=&quot;nt&quot;&gt;--verbose&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt; option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-c3-devkitm-1.html
PLATFORM: Espressif 32 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;2024.1.1&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; Espressif ESP32-C3-DevKitM-1
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
...
...  &amp;lt;&lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; I left out many more lines here ...
...
RAM:   &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;          &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;   2.0% &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;used 6536 bytes from 327680 bytes&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Flash: &lt;span class=&quot;o&quot;&gt;[=&lt;/span&gt;         &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;   8.8% &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;used 114862 bytes from 1310720 bytes&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Building .pio/build/esp32c3_supermini/firmware.bin
esptool.py v4.7.0
Creating esp32c3 image...
Merged 2 ELF sections
Successfully created esp32c3 image.
&lt;span class=&quot;o&quot;&gt;===========================&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;SUCCESS] Took 41.83 seconds &lt;span class=&quot;o&quot;&gt;===========================&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;penv&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; michiel@Delphinus:~/development/myproject&amp;gt; 

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If there are any serious problems here, you will not see the SUCCESS notification at the end.
Fix these problems first.&lt;/p&gt;

&lt;p&gt;In fact, since everything went well, we could have skipped the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pio run&lt;/code&gt;, and start the upload immediately, as described in the next step.&lt;/p&gt;

&lt;h2 id=&quot;connect-the-esp32-c3-supermini-board-and-program-it&quot;&gt;Connect the ESP32-C3-SuperMini board and program it&lt;/h2&gt;

&lt;p&gt;Connect the board with a USB cable to your PC and type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pio run -t upload&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;penv&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; michiel@Delphinus:~/development/myproject&amp;gt; pio run &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; upload
Processing esp32c3_supermini &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;platform: espressif32&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; board: esp32-c3-devkitm-1&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; framework: arduino&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
...
...  &amp;lt;&lt;span class=&quot;nt&quot;&gt;--&lt;/span&gt; I left out many more lines here ...
...
Auto-detected: /dev/ttyACM0
Uploading .pio/build/esp32c3_supermini/firmware.bin
esptool.py v4.7.0
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-C3 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;QFN32&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;revision v0.4&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Features: WiFi, BLE, Embedded Flash 4MB &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;XMC&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Crystal is 40MHz
MAC: 64:e8:33:84:1e:dc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x00002fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00031fff...
Compressed 11360 bytes to 8611...
Writing at 0x00000000... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;100 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Wrote 11360 bytes &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;8611 compressed&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; at 0x00000000 &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;0.2 seconds &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;effective 478.0 kbit/s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;100 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Wrote 3072 bytes &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;146 compressed&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; at 0x00008000 &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;0.0 seconds &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;effective 499.2 kbit/s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;100 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Wrote 8192 bytes &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;47 compressed&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; at 0x0000e000 &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;0.1 seconds &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;effective 632.1 kbit/s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;...
Hash of data verified.
Compressed 138784 bytes to 79438...
Writing at 0x00010000... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;20 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Writing at 0x000166ea... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;40 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Writing at 0x00021954... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;60 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Writing at 0x000275e4... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;80 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Writing at 0x0002d1da... &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;100 %&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Wrote 138784 bytes &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;79438 compressed&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; at 0x00010000 &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;1.3 seconds &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;effective 877.7 kbit/s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
&lt;span class=&quot;o&quot;&gt;===========================&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;SUCCESS] Took 10.63 seconds &lt;span class=&quot;o&quot;&gt;===========================&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;penv&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; michiel@Delphinus:~/development/myproject&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;the-led-is-blinking&quot;&gt;The LED is blinking!&lt;/h2&gt;

&lt;p&gt;The Blue LED is blinking.&lt;/p&gt;

</description>
            <pubDate>Sat, 26 Oct 2024 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/esp32-c3-supermini-blink-platformio.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/esp32-c3-supermini-blink-platformio.html</guid>
            
            <category>blog</category>
            
            <category>tools</category>
            
            <category>domotica</category>
            
            <category>tasmota</category>
            
            <category>platformio</category>
            
            
        </item>
        
        <item>
            <title>PlatformIO Core (CLI) installation on Linux</title>
            <description>&lt;h2 id=&quot;which-platformio&quot;&gt;Which PlatformIO?&lt;/h2&gt;

&lt;p&gt;On the PlatformIO &lt;a href=&quot;https://platformio.org&quot;&gt;website&lt;/a&gt;, there is a clear distinction made between the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PlatformIO Core&lt;/code&gt; and the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PlatformIO IDE&lt;/code&gt;.
The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PlatformIO IDE&lt;/code&gt; is built on top of Microsoft’s Visual Studio Code, and we will NOT discuss here.
The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PlatformIO Core&lt;/code&gt; was formerly called PlatformIO CLI, since it is a Command Line Interface to a tool that consists of a multi-platform build system, platform and library managers and other integration components.&lt;/p&gt;

&lt;p&gt;It’s written in pure Python and works without any dependencies to host machine or third party software.&lt;/p&gt;

&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PlatformIO Core&lt;/code&gt; installation is described at 
&lt;a href=&quot;https://docs.platformio.org/en/latest/core/installation.html&quot;&gt;https://docs.platformio.org/en/latest/core/installation.html&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;use-the-linux-command-line&quot;&gt;Use the Linux command line&lt;/h2&gt;

&lt;p&gt;I develop embedded software for my hobby projects, and hence try to avoid annoying products from big companies that are made to earn profit, so I use a PC with the latest &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;OpenSUSE Leap&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The installation method described here will work on most Linux distributions.&lt;/p&gt;

&lt;p&gt;We will work on the command line (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bash&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/install-platformio/TermClear.png&quot; alt=&quot;Terminal Window&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;install-python&quot;&gt;Install python&lt;/h2&gt;

&lt;p&gt;There is no need to install Python on a modern Linux PC, it is already there. 
You need at least Python version 3.6, which you can check on the command line as follows:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~&amp;gt; python &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
Python 3.6.15
michiel@Delphinus:~&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My Python version is a bit old, in fact, it is already EOL according &lt;a href=&quot;https://www.python.org&quot;&gt;www.python.org&lt;/a&gt;, but it is sufficient for PlatformIO.&lt;/p&gt;

&lt;p&gt;In the PlatformIO documentation, sometimes the command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3&lt;/code&gt; is used. You can replace that by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the past time, there was such a thing as python version 2 and version 3 which could both be installed on the same system. Hence there were the commands &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python2&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python&lt;/code&gt; - and the latter was then configurable to execute one of the former ones.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~&amp;gt; python3 &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
Python 3.6.15
michiel@Delphinus:~&amp;gt; python2 &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
If &lt;span class=&quot;s1&quot;&gt;&apos;python2&apos;&lt;/span&gt; is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf python2
michiel@Delphinus:~&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;install-curl-or-wget&quot;&gt;Install curl or wget&lt;/h2&gt;

&lt;p&gt;You will need either &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;curl&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wget&lt;/code&gt; installed on your system. Check as follows:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~&amp;gt; curl &lt;span class=&quot;nt&quot;&gt;-V&lt;/span&gt;
curl 8.6.0 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;x86_64-suse-linux-gnu&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; ...
...
michiel@Delphinus:~&amp;gt; wget &lt;span class=&quot;nt&quot;&gt;-V&lt;/span&gt;
GNU Wget 1.20.3 built on linux-gnu.
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If neither is present on your system, install them with the package manager of your distribution.&lt;/p&gt;

&lt;h2 id=&quot;the-python-virtual-environment&quot;&gt;The Python virtual environment&lt;/h2&gt;

&lt;p&gt;PlatformIO Core may be installed into an isolated Python environment. This method is very good since you don’t need to install PlatformIO Core Python’s dependencies (packages) into your global system scope.&lt;/p&gt;

&lt;p&gt;This means that you can build different projects each in their own environment with their own installed versions of all needed software. And this simultanously, if you would like to.&lt;/p&gt;

&lt;p&gt;Or, as explaned by the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;virtualenv&lt;/code&gt; command authors:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;virtualenv is a tool to create isolated Python environments. The basic problem being addressed is one of dependencies and versions, and indirectly permissions. Imagine you have an application that needs version 1 of LibFoo, but another application requires version 2.
Or more generally, what if you want to install an application and leave it be? If an application works, any change in its libraries or the versions of those libraries can break the application.
Also, what if you can’t install packages into the global site-packages directory? For instance, on a shared host.
In all these cases, virtualenv can help you. It creates an environment that has its own installation directories, that doesnt share libraries with other virtualenv environments (and optionally doesn’t use the globally installed libraries either).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Make sure the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;virtualenv&lt;/code&gt; command exists in your system by:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~&amp;gt; virtualenv &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
virtualenv 20.22.0 from /usr/lib/python3.11/site-packages/virtualenv/__init__.py
michiel@Delphinus:~&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If virtualenv is not present on your system, install it with the package manager of your distribution. On my OpenSUSE, the package name is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python311-virtualenv&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Do not use the command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pip install virtualenv&lt;/code&gt; as advised by the PlatformIO people - using the system’s package manager allows you to keep virtualenv up to date together with all the other software on your system.&lt;/p&gt;

&lt;h2 id=&quot;download-the-platformio-installation-script&quot;&gt;Download the PlatformIO installation script&lt;/h2&gt;

&lt;p&gt;Download the installer in the folder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/development/platformio&lt;/code&gt; with either &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;curl&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wget&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/development/platformio
curl &lt;span class=&quot;nt&quot;&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; get-platformio.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;or&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/development/platformio
wget &lt;span class=&quot;nt&quot;&gt;-O&lt;/span&gt; get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;execute-the-installation-script&quot;&gt;Execute the installation script&lt;/h2&gt;

&lt;p&gt;Finally, execute the command to install PlatformIO itself:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;python get-platformio.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Or maybe you have to use the command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python3&lt;/code&gt; instead of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;python&lt;/code&gt;, as described above.&lt;/p&gt;

&lt;p&gt;As the result of the above command, the following (imperfect) explanation appears:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PlatformIO Core has been successfully installed into an isolated environment `/home/michiel/.platformio/penv`!

The full path to `platformio.exe` is `/home/michiel/.platformio/penv/bin/platformio`

If you need an access to `platformio.exe` from other applications, please install Shell Commands
(add PlatformIO Core binary directory `/home/michiel/.platformio/penv/bin` to the system environment PATH variable):

See https://docs.platformio.org/page/installation.html#install-shell-commands
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The above description is imperfect since:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;you have to read “platformio.exe” as “the PlatformIO executable”.&lt;/li&gt;
  &lt;li&gt;you do not need to change the system &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PATH&lt;/code&gt; variable since we will use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;virtualenv&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;the given URL is not correct, it should point to https://docs.platformio.org/en/latest/core/installation/shell-commands.html#piocore-install-shell-commands - which we should not follow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;install-the-shell-commands&quot;&gt;Install the shell commands&lt;/h2&gt;

&lt;p&gt;In the file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt; add the following at the bottom of the file:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;alias get_pio=&apos;source ~/.platformio/penv/bin/activate&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/install-platformio/ViBashrc.png&quot; alt=&quot;Terminal Window with vi bashrc&quot; /&gt;&lt;/p&gt;

&lt;p&gt;From now on, we can just run “get_pio” to start using PlatformIO!&lt;/p&gt;

&lt;h2 id=&quot;what-is-the-workflow&quot;&gt;What is the workflow&lt;/h2&gt;

&lt;p&gt;So, how do we work with PlatformIO?&lt;/p&gt;

&lt;p&gt;Suppose we have a project or we want to create a project in the folder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/development/myproject&lt;/code&gt;.
Then we open a command box with bash in a new terminal window in this folder - or we &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; into this folder.&lt;/p&gt;

&lt;p&gt;Then we type the command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;get_pio&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:~/development/myproject&amp;gt; get_pio
&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;penv&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; michiel@Delphinus:~/development/myproject&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;As a result the prompt changes, which indicates that we now can use the PlatformIO command &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pio&lt;/code&gt;.:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;penv&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; michiel@Delphinus:~/development/myproject&amp;gt; pio &lt;span class=&quot;nt&quot;&gt;--help&lt;/span&gt;
Usage: pio &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;OPTIONS] COMMAND &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;ARGS]...
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;/images/install-platformio/TermGetPio.png&quot; alt=&quot;Terminal Window with get_pio&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The terminal window remains in the virtual pio environment until it is closed. If you open another terminal window, you have to enter the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;get_pio&lt;/code&gt; command again to be able to use PlatformIO.&lt;/p&gt;

&lt;h2 id=&quot;update-the-installation&quot;&gt;Update the installation&lt;/h2&gt;

&lt;p&gt;After a while, you may want to update your PlatformIO installation to the latest version.
You can do that as follows:&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nb&quot;&gt;cd&lt;/span&gt; ~/development/platformio
wget &lt;span class=&quot;nt&quot;&gt;-O&lt;/span&gt; get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python get-platformio.py
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
            <pubDate>Fri, 25 Oct 2024 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/platformio-core-cli-installation-linux.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/platformio-core-cli-installation-linux.html</guid>
            
            <category>tools</category>
            
            <category>blog</category>
            
            <category>domotica</category>
            
            <category>platformio</category>
            
            <category>opensuse</category>
            
            
        </item>
        
        <item>
            <title>ESP32-C3 SuperMini - Blink - Arduino</title>
            <description>&lt;h2 id=&quot;goal-of-this-experiment&quot;&gt;Goal of this experiment&lt;/h2&gt;

&lt;p&gt;Use the module &lt;a href=&quot;https://michiel.vanderwulp.be/domotica/Modules/ESP32-C3-SuperMini/&quot;&gt;ESP32-C3 SuperMini&lt;/a&gt; with the Arduino IDE with the example code &lt;a href=&quot;https://docs.arduino.cc/built-in-examples/basics/Blink/&quot;&gt;Blink&lt;/a&gt;. The “Blink” Arduino sketch is a small program that does nothing else than blink the built-in LED.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;./domotica/Modules/ESP32-C3-SuperMini/ESP32-C3-SuperMini.jpg&quot; alt=&quot;the board&quot; style=&quot;width:200px;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;All the steps are described here, so that even a beginner can follow.&lt;/p&gt;

&lt;h2 id=&quot;the-code&quot;&gt;The code&lt;/h2&gt;

&lt;p&gt;I modified the program for the ESP32-C3 SuperMini:&lt;/p&gt;

&lt;div class=&quot;language-cpp highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cm&quot;&gt;/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  The ESP32-C3 SuperMini has an on-board LED you can control. 
  It is attached to digital pin 8. 
  LED_BUILTIN is set to the correct LED pin.

  This example code is in the public domain.

  Adapted from:
  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// the LED is at pin  GPIO8&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;#define LED_BUILTIN 8
&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// the setup function runs once when you press reset or power the board&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;setup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;// initialize digital pin LED_BUILTIN as an output.&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;pinMode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LED_BUILTIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OUTPUT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;// the loop function runs over and over again forever&lt;/span&gt;
&lt;span class=&quot;kt&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;loop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;digitalWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LED_BUILTIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LOW&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;// turn the LED on (LOW is the voltage level)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;delay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                      &lt;span class=&quot;c1&quot;&gt;// wait for a second&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;digitalWrite&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;LED_BUILTIN&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;HIGH&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;   &lt;span class=&quot;c1&quot;&gt;// turn the LED off by making the voltage HIGH&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;delay&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;900&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;                      &lt;span class=&quot;c1&quot;&gt;// wait for a second&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The Arduino IDE requires the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; file to be in a folder with the same name as the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; file.
Save the above code in a file with the name &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blink.ino&lt;/code&gt; in a new folder named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;blink&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;install-the-arduino-ide&quot;&gt;Install the Arduino IDE&lt;/h2&gt;

&lt;p&gt;I have the version 1.8.13 installed. Probably, newer versions should work as well.&lt;/p&gt;

&lt;p&gt;You can now double-click on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.ino&lt;/code&gt; file you created to load it in the Arduino IDE.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/ArduinoIDE.png&quot; alt=&quot;Arduino IDE&quot; style=&quot;width:400px;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;adding-esp32-board-support&quot;&gt;Adding ESP32 Board Support&lt;/h2&gt;

&lt;p&gt;Open the Arduino IDE.&lt;/p&gt;

&lt;p&gt;Navigate to File &amp;gt; Preferences.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/AddBoardSupport.png&quot; alt=&quot;Add board support&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the “Additional Board Manager URLs” field, add the following URL:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If there are already URLs in this field, you have to add it at the end, separated from the previous one with a comma: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;,&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/MultipleUrls.png&quot; alt=&quot;Multiple URLs&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;install-the-esp32-boards&quot;&gt;Install the ESP32 boards&lt;/h2&gt;

&lt;p&gt;To install the ESP32 boards from Espressif, go to the Boards Manager and install the boards:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/BoardManager.png&quot; alt=&quot;Install boards&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;select-the-correct-board&quot;&gt;Select the correct board&lt;/h2&gt;

&lt;p&gt;We use the board “ESP32C3 Dev Module”.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/SelectBoard.png&quot; alt=&quot;Select board&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;use-the-correct-settings&quot;&gt;Use the correct settings&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/BoardSettings.png&quot; alt=&quot;Board Settings&quot; /&gt;&lt;/p&gt;

&lt;p&gt;See that all these are correct.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setting&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Board&lt;/td&gt;
      &lt;td&gt;ESP32C3 Dev Module&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Upload Speed&lt;/td&gt;
      &lt;td&gt;921600&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;USB CDC On Boot&lt;/td&gt;
      &lt;td&gt;Enabled&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;CPU Frequency&lt;/td&gt;
      &lt;td&gt;160MHz (Wifi)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Flash Frequency&lt;/td&gt;
      &lt;td&gt;80MHz&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Flash Mode&lt;/td&gt;
      &lt;td&gt;QIO&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Flash Size&lt;/td&gt;
      &lt;td&gt;4MB (32Mb)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Partition Scheme&lt;/td&gt;
      &lt;td&gt;Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Core Debug Level&lt;/td&gt;
      &lt;td&gt;None&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Erase All Flash Before Sketch Upload&lt;/td&gt;
      &lt;td&gt;Enabled&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;JTAG Adapter&lt;/td&gt;
      &lt;td&gt;Disabled&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Zigbee Mode&lt;/td&gt;
      &lt;td&gt;Disabled&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Port&lt;/td&gt;
      &lt;td&gt;(depends on your PC and OS - see below)&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Programmer&lt;/td&gt;
      &lt;td&gt;Esptool&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;port-selection&quot;&gt;Port selection&lt;/h2&gt;

&lt;p&gt;Since a PC has multiple USB ports, the Arduino IDE needs to figure out which one is connected to our board.&lt;/p&gt;

&lt;p&gt;On my PC, I see many ports - only one is the Espressif one:&lt;/p&gt;
&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:/home&amp;gt; lsusb
Bus 002 Device 019: ID 0b95:1790 ASIX Electronics Corp. AX88179 Gigabit Ethernet
Bus 002 Device 018: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 0a5c:5842 Broadcom Corp. 58200
Bus 001 Device 005: ID 0bda:565c Realtek Semiconductor Corp. Integrated_Webcam_HD
Bus 001 Device 053: ID 303a:1001 Espressif USB JTAG/serial debug unit
Bus 001 Device 048: ID 18f8:0f99 &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;Maxxter] Optical gaming mouse
Bus 001 Device 008: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 001 Device 049: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 047: ID 1a2c:645a China Resource Semico Co., Ltd USB Keyboard
Bus 001 Device 046: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
michiel@Delphinus:/home&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Espressif gives the following 
&lt;a href=&quot;https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/establish-serial-connection.html#check-port-on-windows&quot;&gt;advise&lt;/a&gt;
to determine the correct port on Windows:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Check the list of identified COM ports in the Windows Device Manager. Disconnect ESP32 and connect it back, to verify which port disappears from the list and then shows back again.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On Linux, Espressif &lt;a href=&quot;https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/establish-serial-connection.html#check-port-on-linux-and-macos&quot;&gt;advises&lt;/a&gt;  to use this command:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;To check the device name for the serial port of your ESP32 board (or external converter dongle), run this command two times, first with the board/dongle unplugged, then with plugged in. The port which appears the second time is the one you need:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Indeed, it works for me, but it is not very easy to spot (the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/dev/ttyACM0&lt;/code&gt; was added)::&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;michiel@Delphinus:/home&amp;gt; &lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; /dev/tty&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;
/dev/tty    /dev/tty20  /dev/tty33  /dev/tty46  /dev/tty59    /dev/ttyS12  /dev/ttyS25
/dev/tty0   /dev/tty21  /dev/tty34  /dev/tty47  /dev/tty6     /dev/ttyS13  /dev/ttyS26
/dev/tty1   /dev/tty22  /dev/tty35  /dev/tty48  /dev/tty60    /dev/ttyS14  /dev/ttyS27
/dev/tty10  /dev/tty23  /dev/tty36  /dev/tty49  /dev/tty61    /dev/ttyS15  /dev/ttyS28
/dev/tty11  /dev/tty24  /dev/tty37  /dev/tty5   /dev/tty62    /dev/ttyS16  /dev/ttyS29
/dev/tty12  /dev/tty25  /dev/tty38  /dev/tty50  /dev/tty63    /dev/ttyS17  /dev/ttyS3
/dev/tty13  /dev/tty26  /dev/tty39  /dev/tty51  /dev/tty7     /dev/ttyS18  /dev/ttyS30
/dev/tty14  /dev/tty27  /dev/tty4   /dev/tty52  /dev/tty8     /dev/ttyS19  /dev/ttyS31
/dev/tty15  /dev/tty28  /dev/tty40  /dev/tty53  /dev/tty9     /dev/ttyS2   /dev/ttyS4
/dev/tty16  /dev/tty29  /dev/tty41  /dev/tty54  /dev/ttyACM0  /dev/ttyS20  /dev/ttyS5
/dev/tty17  /dev/tty3   /dev/tty42  /dev/tty55  /dev/ttyS0    /dev/ttyS21  /dev/ttyS6
/dev/tty18  /dev/tty30  /dev/tty43  /dev/tty56  /dev/ttyS1    /dev/ttyS22  /dev/ttyS7
/dev/tty19  /dev/tty31  /dev/tty44  /dev/tty57  /dev/ttyS10   /dev/ttyS23  /dev/ttyS8
/dev/tty2   /dev/tty32  /dev/tty45  /dev/tty58  /dev/ttyS11   /dev/ttyS24  /dev/ttyS9
michiel@Delphinus:/home&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;BTW: ACM stands for “Abstract Control Module”, which is an element of the USB standard.&lt;/p&gt;

&lt;div class=&quot;alert alert-info&quot; role=&quot;alert&quot;&gt;&lt;i class=&quot;fa fa-info-circle&quot;&gt;&lt;/i&gt; &lt;b&gt;My Advise:&lt;/b&gt; Do not try the above ways. Just connect the module BEFORE selecting the port. In most cases, the correct port will be offered as a new choice (in the Arduino IDE) after connecting the board.&lt;/div&gt;

&lt;h2 id=&quot;put-the-board-in-boot-mode&quot;&gt;Put the board in boot-mode&lt;/h2&gt;

&lt;p&gt;When the board is powered up (or reset), the processor first runs some Espressif initialisation code.&lt;/p&gt;

&lt;p&gt;One of the things this initialisation code does, is checking if the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Boot&lt;/code&gt; button is held down. Normally, this button is not held down, and then the initialisation code will start the user sketch.
However, if the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Boot&lt;/code&gt; button is held down, the board enters flashing mode. In this mode, the board is waiting to communicate over the USB bus with the PC, and allows the PC to program the board’s internal flash memory.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/BoardButtons.png&quot; alt=&quot;Board Buttons&quot; style=&quot;width:300px;&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Press the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Boot&lt;/code&gt; button and keep it down.&lt;/li&gt;
  &lt;li&gt;Press the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Reset&lt;/code&gt; button and release.&lt;/li&gt;
  &lt;li&gt;Wait a few seconds.&lt;/li&gt;
  &lt;li&gt;Release the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Boot&lt;/code&gt; button.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now the Red Power LED will be on, the other one not.&lt;/p&gt;

&lt;div class=&quot;alert alert-info&quot; role=&quot;alert&quot;&gt;&lt;i class=&quot;fa fa-info-circle&quot;&gt;&lt;/i&gt; &lt;b&gt;Note:&lt;/b&gt; This step is probably only needed the first time you program a new board. Try programming the board without this step.&lt;/div&gt;

&lt;h2 id=&quot;program-the-board&quot;&gt;Program the board&lt;/h2&gt;

&lt;p&gt;Press the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Upload&lt;/code&gt; button in the Arduino IDE.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/esp32c3supermini-blink-a/UploadButton.png&quot; alt=&quot;Upload Button&quot; style=&quot;width:60%;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The following apears in the console of the IDE:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Sketch uses 273282 bytes (20%) of program storage space. Maximum is 1310720 bytes.
Global variables use 12284 bytes (3%) of dynamic memory, leaving 315396 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.6
Serial port /dev/ttyACM0
Connecting...
Chip is ESP32-C3 (revision v0.4)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 64:e8:33:84:1e:dc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Erasing flash (this may take a while)...
Chip erase completed successfully in 20.7s
Compressed 18688 bytes to 12099...
Writing at 0x00000000... (100 %)
Wrote 18688 bytes (12099 compressed) at 0x00000000 in 0.3 seconds (effective 491.5 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 146...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (effective 492.3 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 657.4 kbit/s)...
Hash of data verified.
Compressed 284320 bytes to 158124...
Writing at 0x00010000... (10 %)
Writing at 0x0001bf4c... (20 %)
Writing at 0x00023bba... (30 %)
Writing at 0x0002ac1e... (40 %)
Writing at 0x000309fb... (50 %)
Writing at 0x0003704f... (60 %)
Writing at 0x0003cdb5... (70 %)
Writing at 0x00043e5a... (80 %)
Writing at 0x0004af37... (90 %)
Writing at 0x00051332... (100 %)
Wrote 284320 bytes (158124 compressed) at 0x00010000 in 2.5 seconds (effective 893.6 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;reset-after-programming&quot;&gt;Reset after programming&lt;/h2&gt;

&lt;p&gt;Since this board does not support resetting with the RTS pin, we need to do this manually.
Press the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Reset&lt;/code&gt; button on the board.&lt;/p&gt;

&lt;h2 id=&quot;the-led-is-blinking&quot;&gt;The LED is blinking!&lt;/h2&gt;

&lt;p&gt;The Blue LED is blinking.&lt;/p&gt;

</description>
            <pubDate>Sun, 13 Oct 2024 00:00:00 +0200</pubDate>
            <dc:creator>Michiel van der Wulp</dc:creator>
            <link>https://michiel.vanderwulp.be/post-esp32c3supermini-blink-arduino-ide.html</link>
            <guid isPermaLink="true">https://michiel.vanderwulp.be/post-esp32c3supermini-blink-arduino-ide.html</guid>
            
            <category>tools</category>
            
            <category>blog</category>
            
            <category>domotica</category>
            
            <category>arduino</category>
            
            
        </item>
        
    </channel>
</rss>
