Skip to content

Instantly share code, notes, and snippets.

View 0xD34D's full-sized avatar

Clark Scheff 0xD34D

View GitHub Profile

Guide: Installing Fedora 42 on Lenovo Yoga Book 9i (13IRU8)

I'll create a comprehensive guide for installing Fedora 42 on your Lenovo Yoga Book 9i (13IRU8), including detailed instructions to address all known issues. This guide is formatted in Markdown, which you can easily share with others.

Table of Contents

  1. Preparation
  2. Creating Installation Media
  3. UEFI Configuration
  4. Installation Process
@0xD34D
0xD34D / main.cpp
Created September 13, 2024 17:42
Getting SD card working on unknown AliExpress ESP32 with round display
#include <Arduino.h>
#include <SdFat.h>
// SD card pins
#define SD_CS_PIN GPIO_NUM_13
#define SD_CLK_PIN GPIO_NUM_14
#define SD_MOSI_PIN GPIO_NUM_15
#define SD_MISO_PIN GPIO_NUM_2
#define SD_CONFIG SdSpiConfig(SD_CS_PIN, USER_SPI_BEGIN, SD_SCK_MHZ(16))
@0xD34D
0xD34D / ota_payload.json
Created September 10, 2024 23:51
All resources used by EMO up to version 2.5.0
{
"updates": {
"esp32": "",
"host": "res-us-east-1.living.ai",
"hosts": {
"0": "res-us-east-1.living.ai",
"1": "res-eu-central-1.living.ai",
"2": "res-ap-southeast-1.living.ai",
"3": "res-cn-shenzhen.livingai.cn"
},
@0xD34D
0xD34D / ota_payload.json
Created September 10, 2024 23:40
EMO 2.6.0 (34) JSON OTA payload
{
"updates": {
"esp32": "sdcard/esp32/alexa.bin",
"esp_sha256": "",
"esp_sum": 0,
"host": "res-us-east-1.living.ai",
"hosts": {
"0": "res-us-east-1.living.ai",
"1": "res-eu-central-1.living.ai",
"2": "res-ap-southeast-1.living.ai",
@0xD34D
0xD34D / e3v3se_display_draw_png.py
Last active July 30, 2024 19:04
drawing a PNG on an E3V3SE display using lines
with Image.open(filename).convert('RGB') as image:
width, height = image.size
img_x = int((240 - width) / 2)
img_y = int((320 - height) / 2)
start_color = 0
start_x = 0
for y in range(0, height):
start_color = 0
start_x = 0
@0xD34D
0xD34D / main.cpp
Created July 8, 2024 22:15
Interfacing with the E3V3SE TJC HMI display using TJC instructions ;)
#include <Arduino.h>
#define TJC Serial0
#define TX_Pin 6
#define RX_Pin 7
#define FRAME_LENGTH 7
int a;
unsigned long nowtime;
void setup()
{
@0xD34D
0xD34D / TFTRLE2RGB565.py
Last active March 12, 2024 01:05
Python script to convert TJC TFT RLE encoded images to raw RGB565
import argparse
import os
from pathlib import Path
import struct
if __name__ == "__main__":
desc = """TFT RLE to RGB5656 image converter
Developped by Clark Scheff, licensed under GPLv3"""
parser = argparse.ArgumentParser(description=desc)
@0xD34D
0xD34D / 64x64_rgb565_image.dat
Created March 7, 2024 19:02
TJC3224T132_011N compressed image from .tft file
0000:0000 | 01 00 00 00 14 05 00 00 00 00 00 00 00 00 00 00 | ................
0000:0010 | 00 00 00 00 FE F3 2F 00 00 F8 00 F8 00 F8 E0 07 | ....þó/..ø.ø.øà.
0000:0020 | E0 07 E0 07 80 AB 38 01 FE F3 2F 00 00 F8 00 F8 | à.à..«8.þó/..ø.ø
0000:0030 | 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 FE F3 2F 00 | .øà.à.à..«8.þó/.
0000:0040 | 00 F8 00 F8 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 | .ø.ø.øà.à.à..«8.
0000:0050 | FE F3 2F 00 00 F8 00 F8 00 F8 E0 07 E0 07 E0 07 | þó/..ø.ø.øà.à.à.
0000:0060 | 80 AB 38 01 FE F3 2F 00 00 F8 00 F8 00 F8 E0 07 | .«8.þó/..ø.ø.øà.
0000:0070 | E0 07 E0 07 80 AB 38 01 FE F3 2F 00 00 F8 00 F8 | à.à..«8.þó/..ø.ø
0000:0080 | 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 FE F3 2F 00 | .øà.à.à..«8.þó/.
0000:0090 | 00 F8 00 F8 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 | .ø.ø.øà.à.à..«8.
@0xD34D
0xD34D / tjc3224T132_header2_decrypter.py
Created March 5, 2024 19:31
Ugly python code to decrpyt header2 from tjc.tft files
import argparse
from pathlib import Path
import struct
NONCE = struct.pack("III", 0x92930f5e, 0x924f6584, 0xfbad3bbf)
KEY = struct.pack("II", 0x582659b6, 0xbd829c9c)
if __name__ == "__main__":
desc = """TFT header2 decoder
Developped by Clark Scheff, licensed under GPLv3"""
@0xD34D
0xD34D / gist:31b78144c7e29e0141c4696999c7af48
Created January 16, 2024 03:58
strings prtouch_v2_wrapper.cpython-38-mipsel-linux-gnu.so
init extras.prtouch_v2_wrapper
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_SELF_CHECK_PRTOUCH
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_TRIG_TEST
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_ACCURATE_HOME_Z
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_SAFE_MOVE_Z
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_PRTOUCH_READY
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_START_STEP_PRTOUCH
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_CHECK_BED_MESH
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_NOZZLE_CLEAR
extras.prtouch_v2_wrapper.PRTouchEndstopWrapper.cmd_DEAL_AVGS