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 / SuperIMU2.cpp
Created March 1, 2025 08:29
#がいためIMU テスト2 Powered by Cline
#if 0 // Cline Prompt
@cxd5602pwbimu_main.c を変更し、6軸IMUから加速度バイアス、角速度バイアス、クォータ二オンによる姿勢と速度と慣性空間における位置を算出する拡張カルマンフィルタのCのコードを生成してください。予測更新、観測更新、カルマンゲインの更新、誤差共分散の推定と省略せず完全なコードをお願いします。姿勢に関してはクォータニオンをオイラー角に変換して出力するのも含めてください。
#endif
/****************************************************************************
* examples/cxd5602pwbimu/cxd5602pwbimu_main.c
*
* Copyright 2025 Sony Semiconductor Solutions Corporation
@GOROman
GOROman / SuperIMU.cpp
Last active March 2, 2025 11:01
#がいためIMU
/****************************************************************************
* examples/cxd5602pwbimu/cxd5602pwbimu_main.c
*
* Copyright 2025 Sony Semiconductor Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
@GOROman
GOROman / cxd5602pwbimu_sample_main.c
Created February 28, 2025 06:21
Clide: CXD5602PWBIMU サンプル 自動生成
/****************************************************************************
* examples/cxd5602pwbimu_sample/cxd5602pwbimu_sample_main.c
*
* Copyright 2025 Sony Semiconductor Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
@GOROman
GOROman / IMU.md
Created February 28, 2025 05:59
Spresense IMU ボード (CXD5602PWBIMU)

CXD5602PWBIMU (IMUアドオンボード) に関する情報

概要

Spresense IMU ボード (CXD5602PWBIMU) は、16個のMEMS IMUを合成するソニー独自の技術により、単体のMEMS IMUに対して低バイアス変動及び地球時点検出が可能な低ノイズ密度を実現した加速度センサー、ジャイロスコープそれぞれ3軸、合計6軸のIMUボードです。

  • このボードは内部で合成処理を行うため、外からは単体の6軸IMUとして機能します。
  • IMUボードのデバイスドライバは、POSIXに準拠したデバイスファイル(デフォルトパス /dev/imu0 )を介して制御します。

API

@GOROman
GOROman / hello.c
Created February 27, 2025 07:29
HELLO!!!
#include <stdoi.h>
int main() {
pritnf( "hello!\n' );
return -111111;
}
@GOROman
GOROman / test.stl
Created February 27, 2025 07:27
STL Test
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GOROman
GOROman / main.cpp
Last active February 9, 2025 11:19
M5Cardputer のI2Sで サイン波を鳴らすだけのコード(要電源ON)
// M5 Cardputer モノラルで I2S 再生
#include <Arduino.h>
#include <driver/i2s.h>
#include <math.h>
#define SAMPLE_RATE 44100 // サンプリングレート
#define I2S_PORT I2S_NUM_0
#define TABLE_SIZE 256 // サイン波のルックアップテーブルサイズ
#define I2S_BCK 41 // BCLK ピン
#define I2S_DATA 42 // DATA ピン
@GOROman
GOROman / ModuleLLM-Wifi-Test.cpp
Last active January 18, 2025 07:20
M5 Module LLM で、Wifiに繋いでネットワーク経由で指示を与える例
/*
* SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
*
* SPDX-License-Identifier: MIT
*/
#include <Arduino.h>
#include <M5Unified.h>
#include <M5ModuleLLM.h>
#include <WiFi.h>
@GOROman
GOROman / dekamoji.sh
Created January 16, 2025 11:52
iTerm2にデカイ文字を画像で出してみるウル技(テク) 【小結級】
#!/bin/zsh
# フォントとか色々設定
font="/System/Library/Fonts/ヒラギノ角ゴシック W3.ttc"
output_path="/tmp"
pointsize=100
image_size="1024x150"
background_color="black"
fill_color="white"
@GOROman
GOROman / mlx_vlm_test.py
Last active January 15, 2025 02:47
MLX + MLX_VLM + Qwen2-VL-2B-Instruct-4bit で画像をVLMで解説してもらう
# /// script
# requires-python = "==3.12"
# dependencies = ["mlx==0.21.0", "mlx_vlm"]
# ///
import mlx.core as mx
import numpy as np
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config