Skip to content

Instantly share code, notes, and snippets.

大庭俊介 baobao

Block or report user

Report or block baobao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@baobao
baobao / docker-compose.yml
Last active Aug 22, 2019
nginxを立ちあげる
View docker-compose.yml
version: '3'
services:
nginx:
image: nginx:latest
ports:
- 8080:80
volumes:
- ./public:/usr/share/nginx/html
View docker-compose.yml
version: '2'
services:
web:
build:
context: ./
dockerfile: deploy/web.docker
volumes:
- ./:/var/www
ports:
- "8080:80"
View lcd_sample.ino
#include <LiquidCrystal.h>
// lcd変数生成
// RS, E, D4, D5, D6, D7という引数が代入されます
LiquidCrystal lcd(4, 6, 10, 11, 12, 13);
void setup()
{
// LCD1602なので、16文字2行を代入
lcd.begin(16, 2);
View dht11sample.ino
#include <DHT.h>
int pin = 9;
DHT dht(pin, DHT11);
void setup()
{
Serial.begin(9600);
dht.begin();
}
View FadeLed.ino
/**
* ゆっくり明るくなって、暗くなるを繰り返すサンプル
*/
int led = 9;
int brightness = 0;
int fadeAmount = 2;
void setup()
{
pinMode(led, OUTPUT);
View gulpfile.js
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/'));
});
View dcmotor_helloworld.ino
/**
* DCモーターを3秒ごとに再生と停止を繰り返すサンプル
*/
void setup()
{
pinMode(11, OUTPUT);
}
void loop()
{
View IRrecvDumpV2.ino
//------------------------------------------------------------------------------
// 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 Aug 10, 2019
PIRセンサが反応したらLEDが光るArduinoサンプル
View PIRSensor.ino
#define LED_OUTPUT 7
#define PIR_IN 2
void setup()
{
Serial.begin(9600);
pinMode(PIR_IN, INPUT);
pinMode(LED_OUTPUT, OUTPUT);
}
View TouchSensor.ino
// デジタル7番ピン
int sensorPin = 7;
void setup()
{
Serial.begin(9600);
}
void loop()
{
You can’t perform that action at this time.