Skip to content

Instantly share code, notes, and snippets.

#include <DHT.h>
int pin = 9;
DHT dht(pin, DHT11);
void setup()
{
Serial.begin(9600);
dht.begin();
}
/**
* ゆっくり明るくなって、暗くなるを繰り返すサンプル
*/
int led = 9;
int brightness = 0;
int fadeAmount = 2;
void setup()
{
pinMode(led, OUTPUT);
const gulp = require('gulp');
const sass = require('gulp-sass');
gulp.task('exportcss', function () {
return gulp.src('./src/*.scss')
.pipe(sass({
outputStyle: 'expanded'
}))
.pipe(gulp.dest('./dest/'));
});
/**
* DCモーターを3秒ごとに再生と停止を繰り返すサンプル
*/
void setup()
{
pinMode(11, OUTPUT);
}
void loop()
{
//------------------------------------------------------------------------------
// Include the IRremote library header
//
#include <IRremote.h>
//------------------------------------------------------------------------------
// Tell IRremote which Arduino pin is connected to the IR Receiver (TSOP4838)
//
int recvPin = 11;
IRrecv irrecv(recvPin);
@baobao
baobao / PIRSensor.ino
Last active August 10, 2019 18:55
PIRセンサが反応したらLEDが光るArduinoサンプル
#define LED_OUTPUT 7
#define PIR_IN 2
void setup()
{
Serial.begin(9600);
pinMode(PIR_IN, INPUT);
pinMode(LED_OUTPUT, OUTPUT);
}
// デジタル7番ピン
int sensorPin = 7;
void setup()
{
Serial.begin(9600);
}
void loop()
{
using System.IO;
using System.Linq;
using UnityEngine;
using UnityEditor;
/// <summary>
/// SpriteRendererのSpriteがnullだったら背景を赤くするEditor拡張
/// </summary>
public class SpriteMissingChecker
{
@baobao
baobao / Helloworld.cs
Created July 31, 2019 09:57
UIElementの生成時の初期コード at Unity2019.1.9f1
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEditor.UIElements;
public class Helloworld : EditorWindow
{
[MenuItem("Window/UIElements/Helloworld")]
public static void ShowExample()
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/dupes"
tap "homebrew/php"
tap "homebrew/versions"
brew "ansible"
brew "apr"