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 int inputPins[2] = { | |
0, 1}; | |
//出力のピン | |
const int redPins[2] = { | |
3, 6}; | |
const int greenPins[2] = { | |
5, 10}; | |
const int bluePins[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
//入力のピン | |
const int inputPins[2] = {0, 1}; | |
//出力のピン | |
const int redPins[2] = {3, 6}; | |
const int greenPins[2] = {5, 10}; | |
const int bluePins[2] = {11, 9}; | |
//入力ノイズ値 | |
#define NOISE_INPUT 20 |
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
//servo | |
#include <Servo.h> | |
#define SERVO_PIN 9 | |
//negi furi | |
#define DEFAULT_DEG 40 | |
#define NEGIFURI_DEG 70 | |
#define NEGIFURI_WAIT 200 | |
#define NEGIFURI_WAIT_DELAY 400 | |
//spectrum shield | |
#define NOISE_INPUT 160 |
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 <Wire.h> | |
void setup() | |
{ | |
delay(1000); | |
Wire.begin(); | |
} | |
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 <Wire.h> | |
/** | |
* AquesTalk picoをしゃべらせるクラス(I2C接続) | |
* @param int address デバイスのアドレスを指定 | |
*/ | |
class AquesTalk { | |
private: | |
int address; | |
public: |
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
/** | |
* 赤外線でシリアル通信(送信)クラス | |
* 注:このクラスを使うとPORTBのピンは使えなくなる | |
* 受信するときは赤外線受光モジュールのVoutをシリアル送信ピンとして扱えばOK | |
*/ | |
class IrTransmitter{ | |
private: | |
//赤外線の1周期ごとの時間(us) | |
unsigned int irCycleTime; | |
//半周期 |
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
<?php | |
define('ACCESS_URL', 'http://money.www.infoseek.co.jp/MnForex/fxrate/'); | |
define('END_TERM', '</tr>'); | |
define('HTML_DELIMITER', '</td>'); | |
define('API_KEY', 'hogehoge'); | |
if ($_GET['key'] !== API_KEY || empty($_GET['target']) || !is_string($_GET['target'])) { | |
die(); | |
} |
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 redLedPin 3 | |
#define greenLedPin 5 | |
#define blueLedPin 9 | |
#define switchPin 2 | |
int mode = 2; | |
int colorMax = 9; | |
int colorArray[][3]={{255,0,2}, | |
{220,200,0}, | |
{0,255,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
<?php | |
try { | |
ob_start(); | |
//warningが出るコード | |
$file = file_get_contents('./not_found_file.txt'); | |
$warning = ob_get_contents(); | |
ob_end_clean(); | |
//Warningがあれば例外を投げる | |
if ($warning) { |
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
window.onload = function() { | |
$.getJSON("http://search.twitter.com/search.json?q='hoge'+OR+'foo'&rpp=5&callback=?", | |
{}, function (data) { | |
$.each(data.results, function (i,v) { | |
var tweet = v.text; | |
tweet = tweet.replace(/(http:\/\/[\x21-\x7e]+)/gi, "<a href='$1'>$1</a>"); | |
tweet = tweet.replace(/#([\x21-\x7e]+)/gi, "<a href=http://twitter.com/#!/search?q=%23$1 target='_blank'>#$1</a>"); | |
tweet = tweet.replace(/@([\x21-\x39\x3b-\x7e]+)/gi, "<a href=http://twitter.com/#!/$1 target='_blank'>@$1</a>:"); | |
$("#tweetList").append(tweet + "<br>"); |
OlderNewer