Skip to content

Commit

Permalink
Merge pull request #112 from badgeteam/hh2024_dev
Browse files Browse the repository at this point in the history
Hh2024 dev
  • Loading branch information
renzenicolai authored Apr 14, 2024
2 parents ef7cbbe + c4a060f commit 7ea0ba1
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "Modify Standard Firmware"
linkTitle: "Modify Standard Firmware"
nodateline: true
weight: 1
---

# Ready, set, hack!
Hack your badge and build cool applications on the ESP32-C6! Here are some basic instructions to get you started:

## Main firmware/ESP32-C6
Follow the instructions on the [ESP32-C6](https://github.com/badgeteam/hackerhotel-2024-firmware-esp32c6), we recommand VScode as an IDE.

## CH32V003 co-processor

Follow the instructions on the [CH32V003 repo](https://github.com/badgeteam/hackerhotel-2024-firmware-ch32v003), the J5 contains all the pins necessary to connect to a WCH link.

## Add and display an image
First the convert your image (input.png) by running <samp>convert</samp> using the mascot.png in the ressource folder as a reference, example:
```
convert input.png -map mascot.png output.png
```
Then open main/CMakeLists.txt and add your new file:
```
EMBED_FILES ${project_dir}/resources/output.png
```
Add in your file:
```
extern const uint8_t output_png_start[] asm("_binary_output_png_start");
extern const uint8_t output_png_end[] asm("_binary_output_png_end");
```
And use <samp>pax_insert_png_buf</samp> in your code to add the image to the screen buffer:
```
pax_insert_png_buf(&gfx, output_png_start, output_png_end - output_png_start, 0, 0, 0);
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "Software Development"
linkTitle: "Software Development"
nodateline: true
weight: 1
---

# Introduction ...

The Badge is basically an ESP32C6 development platform and features the
following methods for developing software:

- **Stock firmware build-IDF** : native EPS apps using the IDF (IoT Development
Framework)
- **ESP-IDF with Platformio** : Use the HH2024 badge as a generic dev board.
- **EspHome**: The easy way to program devices for Home-Assistant.

The badge also has a coprossor for extra IO.

See more information [below](#ch32v003-co-processor).


## Linux permissions

Regardless of the way you're going to program the badge, to connect to the
badge over USB from Linux, do the following.

Create `/etc/udev/rules.d/99-mch2022.rules` with the following contents:

```
SUBSYSTEM=="usb", ATTR{idVendor}=="16d0", ATTR{idProduct}=="0f9a", MODE="0666"
```

Then run the following commands to apply the new rule:

```
sudo udevadm control --reload-rules
sudo udevadm trigger
```

## Windows installation

Not tested.

# Software Platforms

### Badge Team default firmware

You can find the official firmware here:
https://github.com/badgeteam/hackerhotel-2024-firmware-esp32c6
You can build and upload the original firmware by cloning the archive and using the
following commands:

```
make prepare
make build
make install
```

If you want to make some modifications check out this page on modifying the
standard [firmware](modify-standard-firmware). To try as a first hack.

### ESP-IDF with Platformio

Jhaand ported the `Hello World` application for ESP-IDF to Platformio and made
it easy to put your own program on the HH2024 badge with ESP-IDF.

https://gitlab.com/jhaand/hh2024_hello_platformio

This will only put some information on the UART `/dev/ttyACM0` at 115200
and restart.

### ESPHome
SqyD started integrating the HH2024 badge into ESPhome. Which makes
things easy to integrate with
[Home-Assistant](https://homeassistant.io) domotics.

You can find the yaml file for the HH2024 badge here:
https://gist.github.com/SqyD/d33b034c42dbc277ebb928ae45663476

It displays a `Hello Badge Team!` on the display.
<p>
<img src="HH2024_ESPhome.jpeg" alt="HH2024 badge showing text" width="30%" />
</p>

More information on install EspHome you can find here:
https://esphome.io/guides/getting_started_command_line

### CH32V003 co-processor

Follow the instructions on the [CH32V003 repo](https://github.com/badgeteam/hackerhotel-2024-firmware-ch32v003), the J5 contains all the pins necessary to connect to a WCH link.


0 comments on commit 7ea0ba1

Please sign in to comment.