This file contains hidden or 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
//yellow,brownが定義してあるとして | |
//yが左手、bが右手を上げる動作をさせたい | |
//raise***はブロッキング、ただし同時にあげる | |
while(true) { | |
if (yellow) { | |
raiseLeftHand(); | |
} else { | |
raiseRightHand(); | |
} | |
} |
This file contains hidden or 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
bool r=false; | |
while(true) { | |
if (r) { | |
r=true; | |
setHiyoko(yellow); | |
raiseHand(LEFT); | |
setHiyoko(brown); | |
raiseHand(LEFT); | |
} | |
} |
This file contains hidden or 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
public void Run() { | |
var ie=Coroutine(); | |
while(true) { | |
ie.MoveNext(); | |
} | |
} | |
public IEnumerator<bool> Coroutine() { | |
yellow.RaiseAsync(Side.Left); | |
brown.RaiseAsync(Side.Right); |
This file contains hidden or 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
#coding: utf-8 | |
################################################################ | |
#使い方 | |
#IronPythonとCoreTweetを用意してね! | |
# | |
#0.予めTwitterのAPIキーとアクセスキーを取得して設定します | |
# | |
#1.このファイルと同じフォルダにCoreTweet.dllとNewtonsoft.Json.dllを置きます | |
# |
This file contains hidden or 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/env python | |
# -*- coding:utf-8 -*- | |
#まるっと http://raspberrylife.wordpress.com/2013/02/12/i2c%E6%B6%B2%E6%99%B6/ から頂いてます | |
import smbus # sudo apt-get install python-smbus | |
import time | |
class i2clcd: | |
i2c = smbus.SMBus(1) # |
This file contains hidden or 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
/* I2C I/O Control Sketch | |
* (C) 2014 kb10uy | |
* Released under the MIT License. | |
* | |
* 各命令には1バイト命令と2バイト命令があり、 | |
* 送られてきたバイト列について、 | |
* 0x7f以下ならそのバイトを命令に、次のバイトを命令のデータに取り2バイト命令として、 | |
* 0x80以上ならそのバイトだけを命令にとり1バイト命令となります。 | |
* | |
* +2バイト命令--------------------------------------------------------------------------+ |
This file contains hidden or 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
#coding: utf-8 | |
#+-----------------------------------------------------------------------------+ | |
#| Brainfuckをごちうさチックにしたやつ | | |
#| Gochiusa v1.0 | | |
#| MIT License | | |
#| | | |
#| ソースコードファイルの拡張子はitoarかgudを適当に推奨 | | |
#| (Is The Order A Rabbit と [ご]注文は[う]さぎ[で]すか?から採用) | | |
#| デフォルトでは出力・入力ともにUTF-8なので必要なら適当に変えて | | |
#| 所定の文字列以外では空白と改行が許されます | |
This file contains hidden or 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
#coding: utf-8 | |
#+-----------------------------------------------------------------------------+ | |
#| Brainfuckをじゃりじゃりにしたやつ | | |
#| GravelTofu v1.0 | | |
#| MIT License | | |
#| | | |
#| ソースコードファイルの拡張子はjknhjかgim2を適当に推奨 | | |
#| ([砂]利が[口][の][中]に[入]って[じ]ゃりじゃりする~w と | | |
#| Gravel In My Mouthから採用) | | |
#| デフォルトでは出力・入力ともにUTF-8なので必要なら適当に変えて | |
This file contains hidden or 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
#coding: utf-8 | |
import clr | |
from System import * | |
from System.Collections.Generic import * | |
from System.Text import * | |
from System.Text.RegularExpressions import * | |
from System.IO import * | |
clr.AddReferenceByPartialName("CoreTweet") | |
from CoreTweet import * |
This file contains hidden or 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.32(2014/07/28) | |
[!]画像のドラッグ追加後の挙動を変更 | |
[!]画像ファイルのクリップボードからの貼付けに対応 | |
Version 3.31(2014/07/28) | |
[!]GoogleChromeからの画像のドラッグ追加に対応 | |
[!]画像プレビューからの画像のドラッグ保存に対応 |