Skip to content

Instantly share code, notes, and snippets.

@CUEICHI
CUEICHI / m5atom-osc.ino
Created May 13, 2021 05:43
m5atom のLEDを OSCからコントロールする fastledと arduinoOSCを入れてください.
/*
OSC Test -- for M5Atom
config:
Waiting PORT 5005
OSC Command
/msg MSG to serialport
/clean clear LED
/led , LED_POS,R,G,B
@ebith
ebith / main.cpp
Last active March 1, 2022 04:18
M5 ATOM(ESP32)でインターホンが押されたらDiscordに通知を飛ばすやつ
#define FASTLED_INTERNAL
#include <Arduino.h>
#include <WiFi.h>
#include <HttpClient.h>
#include <FastLED.h>
#include <ArduinoJson.h>
const int NUM_LEDS = 1;
const int LED_PIN = 27;
@Buravo46
Buravo46 / GameDataStorageScript.cs
Last active October 20, 2016 02:35
【Unity】シーンを跨いでもスコアなどのデータを保持することができるスクリプト。 参考URL : http://goodscientist.tumblr.com/post/25617673512/dontdestroyonload
using UnityEngine;
using System.Collections;
public class GameDataStorageScript : MonoBehaviour {
private static bool created = false;
int score = 0;
void Awake(){
if(!created){
// シーンを切り替えても指定のオブジェクトを破棄せずに残す
# -*- coding: utf-8 -*-
require 'RMagick'
include Magick
arr = []
embedded = ImageList.new('embedded.png')
(0...embedded.rows).each {|y|
(0...embedded.columns).each {|x|
pixel = embedded.pixel_color(x, y)
arr << (((pixel.red & 0x07) << 5) |