<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.why2025.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sgielen</id>
	<title>WHY2025 wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.why2025.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sgielen"/>
	<link rel="alternate" type="text/html" href="https://wiki.why2025.org/Special:Contributions/Sgielen"/>
	<updated>2026-04-17T06:11:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://wiki.why2025.org/index.php?title=How_to_develop_an_app&amp;diff=20046</id>
		<title>How to develop an app</title>
		<link rel="alternate" type="text/html" href="https://wiki.why2025.org/index.php?title=How_to_develop_an_app&amp;diff=20046"/>
		<updated>2025-08-11T17:02:05Z</updated>

		<summary type="html">&lt;p&gt;Sgielen: /* Add your own app */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to develop an app for the badge ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;This is living documentation, check often for updates&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
WARNING: the documentation might be out of date. But it might be better than no documentation.&lt;br /&gt;
We try to update as soon as possible.&lt;br /&gt;
&lt;br /&gt;
For now, the documentation is focused on Linux. MacOS might work, for Windows, you probably need WSL.&lt;br /&gt;
&lt;br /&gt;
=== Clone the firmware repo ===&lt;br /&gt;
&lt;br /&gt;
Also read the [https://gitlab.com/why2025/team-badge/firmware README].&lt;br /&gt;
&lt;br /&gt;
 git clone https://gitlab.com/why2025/team-badge/firmware.git&lt;br /&gt;
&lt;br /&gt;
=== Install ESP-IDF ===&lt;br /&gt;
&lt;br /&gt;
Follow instructions here&lt;br /&gt;
&lt;br /&gt;
[https://docs.espressif.com/projects/esp-idf/en/stable/esp32/get-started/index.html#installation ESP32 installation]&lt;br /&gt;
&lt;br /&gt;
At the point where you run &amp;lt;code&amp;gt;install.sh&amp;lt;/code&amp;gt;, give &amp;lt;code&amp;gt;esp32p4&amp;lt;/code&amp;gt; as argument.&lt;br /&gt;
&lt;br /&gt;
 ./install.sh esp32p4&lt;br /&gt;
&lt;br /&gt;
If you type&lt;br /&gt;
&lt;br /&gt;
 idf.py --version&lt;br /&gt;
&lt;br /&gt;
you should get the version number. If not, you might need to activate it.&lt;br /&gt;
&lt;br /&gt;
 . ~/esp/esp-idf/export.sh&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using NixOS with [https://github.com/mirrexagon/nixpkgs-esp-dev nixpkgs-esp-dev],&lt;br /&gt;
make sure to run &amp;lt;code&amp;gt;export ESP_IDF_VERSION=5.5&amp;lt;/code&amp;gt; after calling &amp;lt;code&amp;gt;nix develop&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Build and install ===&lt;br /&gt;
&lt;br /&gt;
First connect to the USB-C connector at the upper side of the badge.&lt;br /&gt;
&lt;br /&gt;
Go to the firmware directory of the cloned repository and build and install the firmware&lt;br /&gt;
&lt;br /&gt;
 idf.py build flash monitor&lt;br /&gt;
&lt;br /&gt;
This takes quite some time since the whole firmware is being build and flashed.&lt;br /&gt;
For updating only an app, see mpydaemon below.&lt;br /&gt;
&lt;br /&gt;
=== Add your own app ===&lt;br /&gt;
&lt;br /&gt;
Create a new directory in &amp;lt;code&amp;gt;sdk_apps/&amp;lt;/code&amp;gt; and copy &amp;lt;code&amp;gt;sdk_apps/hello/main.c&amp;lt;/code&amp;gt; to it. Also copy &amp;lt;code&amp;gt;sdk_apps/hello/manifest.json&amp;lt;/code&amp;gt; as well and update it, and create an empty &amp;lt;code&amp;gt;storage_skel&amp;lt;/code&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Adjust &amp;lt;code&amp;gt;flash_storage/skel/init.toml&amp;lt;/code&amp;gt; and add your app.&lt;br /&gt;
&lt;br /&gt;
Adjust &amp;lt;code&amp;gt;sdk_apps/CMakeLists.txt&amp;lt;/code&amp;gt; and add your app.&lt;br /&gt;
&lt;br /&gt;
Make changes, then build and flash again with &amp;lt;code&amp;gt;idf.py&amp;lt;/code&amp;gt;. Look at other apps in &amp;lt;code&amp;gt;sdk_apps&amp;lt;/code&amp;gt; for examples.&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;sdk_apps/sdl_test/sdl_test.c&amp;lt;/code&amp;gt; for an example on how to use SDL3 (specifically graphics).&lt;br /&gt;
&lt;br /&gt;
After changing &amp;lt;code&amp;gt;init.toml&amp;lt;/code&amp;gt;, you might want to delete a directory:&lt;br /&gt;
&lt;br /&gt;
 rm -rf build/storage_staging/&lt;br /&gt;
&lt;br /&gt;
=== Test locally ===&lt;br /&gt;
&lt;br /&gt;
To improve development speed, you want to develop and test locally.&lt;br /&gt;
&lt;br /&gt;
The badge uses SDL3, which is a OS independent hardware layer that can be used on your computer.&lt;br /&gt;
&lt;br /&gt;
Install SDL3:&lt;br /&gt;
&lt;br /&gt;
 https://github.com/libsdl-org/SDL/blob/main/INSTALL.md&lt;br /&gt;
&lt;br /&gt;
On Linux, you might need to install the packages described here: [https://wiki.libsdl.org/SDL3/README-linux SDL Wiki Linux]&lt;br /&gt;
&lt;br /&gt;
After this, you might want to run&lt;br /&gt;
&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
&lt;br /&gt;
Now go inside your app directory and you can compile your app for your OS:&lt;br /&gt;
&lt;br /&gt;
 gcc myapp.c -o myapp -I /usr/local/include/SDL3 -L/usr/local/lib -lSDL3&lt;br /&gt;
&lt;br /&gt;
(adjust paths as needed)&lt;br /&gt;
&lt;br /&gt;
Now you can run the app locally:&lt;br /&gt;
&lt;br /&gt;
 ./myapp&lt;br /&gt;
&lt;br /&gt;
=== Use mpydaemon ===&lt;br /&gt;
&lt;br /&gt;
Use mpydaemon to update only your app. You need an SD card installed.&lt;br /&gt;
&lt;br /&gt;
See [https://gitlab.com/why2025/team-badge/micropython/-/tree/master/mpydaemon mpydeamon]&lt;br /&gt;
&lt;br /&gt;
=== Share ===&lt;br /&gt;
&lt;br /&gt;
If you made an app that you want to share, upload it to&lt;br /&gt;
&lt;br /&gt;
[https://badge.why2025.org/ BadgeHub]&lt;/div&gt;</summary>
		<author><name>Sgielen</name></author>
	</entry>
	<entry>
		<id>https://wiki.why2025.org/index.php?title=User:Sgielen&amp;diff=16646</id>
		<title>User:Sgielen</title>
		<link rel="alternate" type="text/html" href="https://wiki.why2025.org/index.php?title=User:Sgielen&amp;diff=16646"/>
		<updated>2025-08-01T23:30:34Z</updated>

		<summary type="html">&lt;p&gt;Sgielen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{UserInfo&lt;br /&gt;
|Village=Village:HashRU&lt;br /&gt;
|Arrival=2025-08-08&lt;br /&gt;
|Departure=2025-08-12&lt;br /&gt;
|Languages=EN&lt;br /&gt;
|HackerSpace=Hackerspace Nijmegen&lt;br /&gt;
|NickName={{PAGENAME}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Sgielen</name></author>
	</entry>
	<entry>
		<id>https://wiki.why2025.org/index.php?title=User:Sgielen&amp;diff=9416</id>
		<title>User:Sgielen</title>
		<link rel="alternate" type="text/html" href="https://wiki.why2025.org/index.php?title=User:Sgielen&amp;diff=9416"/>
		<updated>2025-05-26T18:11:35Z</updated>

		<summary type="html">&lt;p&gt;Sgielen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{UserInfo&lt;br /&gt;
|Village=Village:HashRU&lt;br /&gt;
|Languages=EN&lt;br /&gt;
|HackerSpace=Hackerspace Nijmegen&lt;br /&gt;
|NickName={{PAGENAME}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Sgielen</name></author>
	</entry>
	<entry>
		<id>https://wiki.why2025.org/index.php?title=User:Sgielen&amp;diff=9415</id>
		<title>User:Sgielen</title>
		<link rel="alternate" type="text/html" href="https://wiki.why2025.org/index.php?title=User:Sgielen&amp;diff=9415"/>
		<updated>2025-05-26T18:10:28Z</updated>

		<summary type="html">&lt;p&gt;Sgielen: create user page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{UserInfo&lt;br /&gt;
|NickName={{PAGENAME}}&lt;br /&gt;
|Languages=EN&lt;br /&gt;
|HackerSpace=&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Sgielen</name></author>
	</entry>
</feed>