summaryrefslogtreecommitdiff
path: root/README.md
blob: 96e7d54fdf6d4770d9ddd58a1f1c9a641c2949c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# MCH 2022 Badge Hacking

If you are readding this in the MCH2022 event come visit us at Explody tent!

https://map.mch2022.org/#map=20/5.5235/52.283/0

## About MCH 2022

MCH2022 is an international non-profit outdoor hacker camp/conference taking place in The Netherlands in 2022 on July 22rd to 26th. It is the successor of a string of similar events happening every four years: GHP, HEU, HIP, HAL, WTH, HAR, OHM and SHA. Similar events are EMF in the UK, CCC Camp in Germany.

## About the Badge

This year, Team:Badge has prepared another truly special little toy.

You should have gotten one coming into the camp (and you should have brought a USB-C cable for charging and hacking). Go to the Getting Started section if you need help assembly the badge.
Once it's running, choose the menu item OS update to install all the features we didn't finish by the time we had to flash the Badges.
After everything is up to date, learn how to hack the Badge.
Make lots of improvements and send us pull requests at our Github home
Write lots of apps and submit them to the Hatchery app store
Come visit us at the Badge tent if you need help

- Getting Started: https://www.badge.team/docs/badges/mch2022/getting-started/
- Docs: https://www.badge.team/docs/
- Github Team Repo: https://github.com/badgeteam/
- IRC: `badgeteam` on irc.oftc.net
- Matrix: `#oftc_#badgeteam:pixie.town`
- Twitter @BadgeteamNL
- Info: https://mch2022.org/#/Blog/presenting-the-mch2022-badge
- Tent: https://map.mch2022.org/#map=20/5.5274/52.2839/0
- Telegram: https://t.me/joinchat/AMG-ZhQQ9cE1KAAbQozy5Q

## About Merchant Client

### First iteration:

Startup

- setup a wifi connection to MCH2022-open
- test connection to the merchant backoffice
- ask for credentials

The merchant will display

- merchant name
- wifi status
- backend status

Actions

- up: increase amount by 0.1
- down: decrease amount by 0.1
- button A: create payment
- button B: cancel payment

###Possible next steps:

- refund the last order
- show merchant logo and email
- show QR code with and URL to the merchant catalog (?)

---

---

---

## Original README

---

---

# MCH2022 template app

This repository contains a template app for the MCH2022 badge.
It is intended to be used as the basis for developing your own native ESP32
apps. See [Getting Started](https://badge.team/docs/badges/mch2022/software-development/esp-idf/esp_idf_getting_started/)

## License

The source code contained in the main folder of this example is public domain / CC0 licensed, use it as you please.

Source code included as submodules is licensed separately, please check the
following table for details.

| Submodule                 | License                           | Author                                  |
| ------------------------- | --------------------------------- | --------------------------------------- |
| esp-idf                   | Apache License 2.0                | Espressif Systems (Shanghai) CO LTD     |
| components/appfs          | THE BEER-WARE LICENSE Revision 42 | Jeroen Domburg <jeroen@spritesmods.com> |
| components/bus-i2c        | MIT                               | Nicolai Electronics                     |
| components/i2c-bno055     | MIT                               | Nicolai Electronics                     |
| components/mch2022-rp2040 | MIT                               | Renze Nicolai                           |
| components/pax-graphics   | MIT                               | Julian Scheffers                        |
| components/pax-keyboard   | MIT                               | Julian Scheffers                        |
| components/sdcard         | MIT                               | Nicolai Electronics                     |
| components/spi-ice40      | MIT                               | Nicolai Electronics                     |
| components/spi-ili9341    | MIT                               | Nicolai Electronics                     |
| components/ws2812         | Unlicense / Public domain         | None                                    |

Source the `update_components.sh` to update all the submodules to their
corresponding tips.

## How to make

```sh
git clone --recursive https://github.com/badgeteam/mch2022-template-app
cd mch2022-template-app
make
```

The default target of the Makefile (the one executed if you just run `make`) installs the proper ESP-IDF version and all other dependencies, then builds the project and tries to install it on an attached Badge. Because this process checks all the dependencies for updates, this can become tedious during development, so you'll probably want to execute specific targets:

- prepare : this is (one of) the targets executed in the default task and the one that, technically, only needs to run once to install dependencies
- clean : clean the build environment. This does NOT clean up installed dependencies.
- build : well ... build. Compiles you sources and assembles a binary to install.
- install : This install the binary that was build, you can only call `install`, it depends on `build`. _Note_ installation is not and SHOULD NOT be performed with the typical `idf.py flash` call, see the note below for details.
- monitor : start the serial monitor to examine log output
- menuconfig : The IDF build system has a fairly elaborate configuration system that can be accessed via `menuconfig`. You'll know if you need it. Or try it out to explore.

### Note: Why not to use `idf.py flash` to install my native app.

If you have previously used the IDF, you may have noticed that we don’t use
`idf.py flash` to install the app on the Badge. (And if you haven’t, you can
safely skip this section. :)

The `idf.py flash` command assumes that the binary to flash is the main (and
only) application for the device. This is not the case for the Badge, though.
The main application is the launcher app, i.e. the app with the menu that
starts by default. The `make install` target of the Makefile copies our newly
created app into the
[appfs](https://github.com/badgeteam/esp32-component-appfThe Makefile cs)
instead of overwriting the launcher. Once copied to the appfs, the launcher can
find your app and it should appear in the apps menu.

Obviously you _can_ use idf.py flash but you’ll delete the launcher app and would
need to reinstall it later.