This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
nginx: | |
image: nginx:latest | |
ports: | |
- 8080:80 | |
volumes: | |
- ./public:/usr/share/nginx/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
web: | |
build: | |
context: ./ | |
dockerfile: deploy/web.docker | |
volumes: | |
- ./:/var/www | |
ports: | |
- "8080:80" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <DHT.h> | |
int pin = 9; | |
DHT dht(pin, DHT11); | |
void setup() | |
{ | |
Serial.begin(9600); | |
dht.begin(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// コメントアウトを外すと超音波センサーの結果を出力 | |
//#define MEASUREMENT | |
// 出力ピン | |
int trigPin = 6; | |
// インプットピン | |
int echoPin = 7; | |
// スピーカーピン | |
int tonePin = 8; | |
// LEDピン |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ゆっくり明るくなって、暗くなるを繰り返すサンプル | |
*/ | |
int led = 9; | |
int brightness = 0; | |
int fadeAmount = 2; | |
void setup() | |
{ | |
pinMode(led, OUTPUT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/')); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DCモーターを3秒ごとに再生と停止を繰り返すサンプル | |
*/ | |
void setup() | |
{ | |
pinMode(11, OUTPUT); | |
} | |
void loop() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#define PIN 6 | |
#define LED_NUM 50 //LEDの数 | |
Adafruit_NeoPixel ledtape = Adafruit_NeoPixel(LED_NUM, PIN, NEO_GRB + NEO_KHZ800); | |
void setup() | |
{ | |
ledtape.begin(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define LED_OUTPUT 7 | |
#define PIR_IN 2 | |
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(PIR_IN, INPUT); | |
pinMode(LED_OUTPUT, OUTPUT); | |
} |