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
#!/usr/bin/python | |
import csv | |
import json | |
import hashlib | |
import random | |
import string | |
from optparse import OptionParser | |
def random_string(length): | |
char_set = string.ascii_letters + string.digits |
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
// 設定箇所 | |
void setup() { | |
// digital pin 13をOUTPUTとして初期化 | |
pinMode(13, OUTPUT); | |
} | |
// ループ箇所 | |
void loop() { | |
digitalWrite(13, HIGH); // LEDをonにする (HIGHの電圧) | |
delay(1000); // 1秒待つ |
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
require 'opencv' | |
require 'serialport' | |
window = OpenCV::GUI::Window.new "Camera" | |
capture = OpenCV::CvCapture.open | |
window2 = OpenCV::GUI::Window.new "LED" | |
width = 2880/10 |
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 brightness = 0; // LEDの明るさを入れる | |
int fadeAmount = 5; // 明るさの変更スピードを設定 | |
int received = 0; // 受け取った値(asciiコード) | |
int final_value = 0; // 変換後の数字 | |
void reset_led(){ | |
digitalWrite(2, LOW); | |
digitalWrite(3, LOW); |
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
//set in Led’s digital IO pin control int Led1 = 1; | |
int Led2 = 2; | |
int Led3 = 3; | |
int Led4 = 4; | |
int Led5 = 5; | |
int Led6 = 6; | |
//led lamp run the example 1 program | |
void style_1(void) | |
{ | |
unsigned char j; |
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 brightness = 0; // LEDの明るさを入れる | |
int fadeAmount = 5; // 明るさの変更スピードを設定 | |
int received = 0; // 受け取った値(asciiコード) | |
int final_value = 0; // 変換後の数字 | |
void setup() { | |
Serial.begin(9600); // シリアルポートを9600bpsで開く | |
pinMode(9, OUTPUT); //9番のピンを使う | |
} |
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 brightness = 0; // LEDの明るさを入れる | |
int fadeAmount = 5; // 明るさの変更スピードを設定 | |
void setup() { | |
Serial.begin(9600); // シリアルポートを9600bpsで開く | |
pinMode(9, OUTPUT); //9番のピンを使う | |
} | |
void loop() { | |
Serial.println(brightness); | |
analogWrite(9, brightness); //明るさを設定 | |
brightness = brightness + fadeAmount; // 次の時点での明るさを計算 |
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 ledPin = 13; //13番をアウトプットに指定 | |
int interval = 500; // ・1つは、0.5秒にする | |
int long_interval = interval * 3; // ーは・の3つ分まつ | |
String moji[] = {String("A"), String("B"), String("C"), String("D"), String("E"), String("F"), String("G"), String("H"), String("J"), String("K"), String("L"), String("M"), String("N"), String("O"), String("P"), String("Q"), String("R"), String("S"), String("T"), String("U"), String("V"), String("W"), String("X"), String("Y"), String("Z"), String("I")}; | |
String tonTu[] = {String("sl"), String("lsss"), String("lsls"), String("lss"), String("s"), String("ssls"), String("lls"), String("ssss"), String("slll"), String("lsl"), String("slss"), String("ll"), String("ls"), String("lll"), String("slls"), String("llsl"), String("sls"), String("sss"), String("l"), String("ssl"), String("sssl"), String("sll"), String("lssl"), String("lsll"), String("llss"), String("ss")}; | |
int lengthMojiArray = sizeof(moji) / sizeof(moji[0]); |
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 ledPin = 13; //13番をアウトプットに指定 | |
int interval = 500; // ・1つは、0.5秒にする | |
int long_interval = interval * 3; // ーは・の3つ分まつ | |
String target = String("B"); // ここに表示したい文字1つを書く | |
String moji[] = {String("A"), String(""), String("B"), String("C"), String("D"), String("E"), String(""), String("F"), String("G"), String("H"), String(""), String("J"), String("K"), String("L"), String("M"), String("N"), String("O"), String(""), String("P"), String("Q"), String("R"), String("S"), String("T"), String("U"), String(""), String(""), String(""), String("V"), String("W"), String("X"), String("Y"), String("Z"), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String("")}; | |
String tonTu[] = {String("sl"), String("slsl"), String("lsss"), String("lsls"), String("lss"), String("s"), String("sslss"), String("ssls"), String("lls"), String("ssss"), String("lsl |
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 ledPin = 13; //13番をアウトプットに指定 | |
int interval = 500; // ・1つは、0.5秒にする | |
int long_interval = interval * 3; // ーは・の3つ分まつ | |
String target = String("B"); // ここに表示したい文字1つを書く | |
String moji[] = {String("A"), String(""), String("B"), String("C"), String("D"), String("E"), String(""), String("F"), String("G"), String("H"), String(""), String("J"), String("K"), String("L"), String("M"), String("N"), String("O"), String(""), String("P"), String("Q"), String("R"), String("S"), String("T"), String("U"), String(""), String(""), String(""), String("V"), String("W"), String("X"), String("Y"), String("Z"), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String(""), String("")}; | |
String tonTu[] = {String("sl"), String("slsl"), String("lsss"), String("lsls"), String("lss"), String("s"), String("sslss"), String("ssls"), String("lls"), String("ssss"), String("lsl |
NewerOlder