Skip to content

Instantly share code, notes, and snippets.

View GOROman's full-sized avatar
👽
Damn I'm looking good.

GOROman GOROman

👽
Damn I'm looking good.
View GitHub Profile
@GOROman
GOROman / led_strip_example_main.c
Created December 30, 2024 13:38
ESP-IDF で WS2812 Lチカ
/*
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <string.h>
#include <math.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
@GOROman
GOROman / main.cpp
Created December 29, 2024 11:38
ESP-IDF M5Unified Test
#include <M5Unified.h>
extern "C" void app_main(void) {
auto cfg = M5.config();
cfg.internal_spk = false;
cfg.internal_mic = false;
M5.begin(cfg);
M5.Lcd.clear(TFT_BLUE);
M5.Lcd.setTextSize(2);
@GOROman
GOROman / dp100.c
Last active November 20, 2024 15:20
ALIENTEK DP100 を C言語からコントロールするサンプル 無保証・自己責任で
// Alientek DP100 Control Test
// @GOROman
// for MacOS
// > brew install hidapi
// > gcc -o dp100 dp100.c -I/opt/homebrew/include/ -L/opt/homebrew/lib -lhidapi
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@GOROman
GOROman / DP100_Protocol.md
Last active December 2, 2024 06:20
Alientek DP100 Protocol

オリジナル: https://github.com/lessu/open_dp100/blob/master/DP100_Protocol.md

DP100 安定化電源 USB プロトコル解析

デバイス: Alientek DP100

私は主にmacOSを使用し、次にlinux、Windowsを使用することはあまりありません。

Alientekは、唯一Windows用の.net Dllを提供するため、二次開発には非常に不便です。

@GOROman
GOROman / ATtiny10_bitbanging_midi.c
Last active November 9, 2024 06:48
米粒Tiny (ATtiny10)で無理やりMIDI信号を送信する
// 米粒Tiny (ATtiny10)で無理やりMIDI信号を送信する
// 8MHz
#include <avr/io.h>
#include <util/delay.h>
#define MIDI_TX_PIN PB2
#define MIDI_BAUD_RATE 31250 // 32us
#define NOP asm volatile("nop\n\t")
@GOROman
GOROman / ArduinoISPforESP32.ino
Last active November 10, 2024 13:18
ESP32(M5Stack Core 2など) を ArduinoISP として、ATTiny13A などのライターにする
//
// ESP32(M5Stack Core 2など) を ArduinoISP として、ATTiny13A などのライターにする
//
#include <Arduino.h>
#define PIN_RESET 0 // Core2: G0
#define PIN_MOSI MOSI// Core2: G23
#define PIN_MISO MISO// Core2: G38
#define PIN_SCK SCK // Core2: G18
@GOROman
GOROman / ES8388.md
Last active October 7, 2024 13:54
ES8388 memo

ES8388

1 ES8388 BLOCK DIAGRAM

image

INPUT SIGNAL PATH

INPUT SIGNAL PATH The two analogue inputs LlNPUT1/2 RlNPUT1/2 can be selected by a switch, and then followed by a PGA gain boost. The inputs can be individually selected or a differential input of either (LlNPUT1 RlNPUT1) or (LlNPUT2 RlNPUT2) may also be selected. These Inputs can be configured as microphone or line level. The

@GOROman
GOROman / driver_joy.cpp
Last active August 11, 2024 10:49
M5 AtomJoyStick のジョイスティック情報を取得してみた。
#include <Arduino.h>
#include <Wire.h>
#include "driver_joy.h"
#define I2C_SDA_PIN 38 // M5 AtomS3 SDA
#define I2C_SCL_PIN 39 // M5 AtomS3 SCL
#define I2C_CLOCK 400000
#define ATOM_JOYSTICK_ADDR 0x59 // I2Cアドレス
@GOROman
GOROman / wch_link_switch.c
Last active July 16, 2024 16:30
WCH-LinkE を ARM モードから RISC-V モードに切り替える (Macとかで)