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 | |
# -*- coding: utf-8 -*- | |
# Copyright : (c) SAEKI Yoshiyasu | |
# License : MIT-style license | |
# <http://www.opensource.org/licenses/mit-license.php> | |
# last updated: 2010/12/24 | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web |
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
<!DOCTYPE html> | |
<html lang="jp" xml:lang="jp"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Sketch</title> | |
<style> | |
body{ | |
margin: 0px; padding: 0px; | |
} | |
canvas { |
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 | |
# -*- coding: utf-8 -*- | |
# Copyright : (c) SAEKI Yoshiyasu | |
# License : MIT-style license | |
# <http://www.opensource.org/licenses/mit-license.php> | |
# last updated: 2011/01/01 | |
import subprocess | |
import time |
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
// -*- mode: c++ -*- | |
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2011/01/12 | |
**/ | |
#include <SPI.h> |
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
// -*- mode: c++ -*- | |
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2011/01/21 | |
**/ | |
#include <SPI.h> | |
#include <Ethernet.h> |
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 <FlexiTimer2.h> | |
#define LedPin1 10 | |
#define LedPin2 9 | |
void blink1() { | |
digitalWrite(LedPin1, !digitalRead(LedPin1)); | |
} | |
void blink2() { | |
digitalWrite(LedPin2, !digitalRead(LedPin2)); |
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 <Metro.h> | |
#define LedPin1 10 | |
#define LedPin2 9 | |
Metro ledMetro1 = Metro(1000); | |
Metro ledMetro2 = Metro(2000); | |
void setup() { | |
pinMode(LedPin1, 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
#include <pt.h> | |
#define LedPin1 12 | |
#define LedPin2 11 | |
static struct pt pt1, pt2; | |
static int protothread1(struct pt *pt) { | |
static unsigned long timestamp = 0; | |
PT_BEGIN(pt); |
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 <pt.h> | |
#include <Metro.h> | |
#define LedPin1 12 | |
#define LedPin2 11 | |
#define LedPin3 10 | |
#define LedPin4 9 | |
static struct pt pt1, pt2; |
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
def mTimeCalculate(info): | |
r1 = info["r1"] | |
c = info["c"] | |
print "R1: %d, C: %f¥n¥tTime: %f(sec)¥n" % (r1, c, r1 * c * math.log(3)) | |
# math.log(3) = 1.1 | |
def mResisterCalculate(info): | |
t = info["time"] | |
c = info["c"] |