Skip to content

Instantly share code, notes, and snippets.

@Rumidom
Rumidom / sun50i-h618-FT6336.dts
Last active November 16, 2025 02:45
sun50i-h618-FT6336.dts (device is recognized but no input data)
// Device tree overlay for FT6336 using Goodix GT9110 kernel driver
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <0xffffffff>;
__overlay__ {
pinctrl-names = "default";
@Rumidom
Rumidom / gist:41f305d8d825a7333a29e7b4d03499c9
Last active November 14, 2025 04:11
Orange Pi Zero 2w dts
/dts-v1/;
/ {
interrupt-parent = <0x01>;
#address-cells = <0x02>;
#size-cells = <0x02>;
model = "OrangePi Zero2 W";
compatible = "xunlong,orangepi-zero2w\0allwinner,sun50i-h616";
cpus {
@Rumidom
Rumidom / gist:28d41663bd0606bb29ad7aaa9aef530d
Created October 4, 2024 01:39
NEC Protocol example.py
from machine import Pin,PWM
from time import ticks_diff, ticks_us
import time
LED_Sig = Pin(2, Pin.OUT)
LED_Neg = Pin(0, Pin.OUT)
LED_Pos = Pin(3, Pin.OUT)
LED_Neg.off()
LED_Pos.on()
from machine import Pin
rotaryA = Pin(3, Pin.IN, Pin.PULL_UP)
rotaryB = Pin(4, Pin.IN, Pin.PULL_UP)
i = 0
Aflag = False
Bflag = False
dirflag = False
def rotaryA_interrupt(pin):
@Rumidom
Rumidom / gist:0540154d89bca19c1a635f19a96136f4
Created March 28, 2024 22:17
Contributing to Micropython
https://mpy-c-gen.oliverrobson.tech/
https://www.youtube.com/watch?v=437CZBnK8vI&t=324s&pp=ygUUbWljcm9weXRob24gYyBtb2R1bGU%3D
@Rumidom
Rumidom / Building Micropython on Windows.md
Last active March 28, 2024 14:56
Building Micropython for ESP32 on Windows
  • 1 - Open cmd or powershell and run: wsl --install to install WSL (Windows Subsystem for linux)

  • 2 - Enable Windows Subsystem for linux on windows features and reboot

2.1 - Alternativaly run as administrator on powershell/cmd:

PS C:\WINDOWS\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • 3 - search for ubuntu on windowns search bar, run the ubuntu aplication, this will give you acess to a linux terminal
#include <OneWire.h>
#include <DallasTemperature.h>
int LED1_PIN = 2;
int LED2_PIN = 12;
int LED3_PIN = 13;
int BUZZER_PIN = 15;
int BUTTON_PIN = 5;
int SENSOR_PIN = 14;
This file has been truncated, but you can view the full file.
@Rumidom
Rumidom / YOLOV5_CustomDetect.py
Last active June 23, 2021 20:26
YOLOV5_CustomDetect
import cv2
import torch
import torch.nn as nn
import torchvision
import numpy as np
import math
import time
from pathlib import Path
def DWConv(c1, c2, k=1, s=1, act=True):