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
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2010/12/03 | |
**/ | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <aJSON.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
$ python -m pyinotify TARGET_DIR | |
## ls | |
<event dir="True" mask="0x40000020" maskname="IN_OPEN|IN_ISDIR" name="" path="TARGET_DIR" pathname="/home/saeki/TARGET_DIR" wd="1"> | |
<event dir="True" mask="0x40000010" maskname="IN_CLOSE_NOWRITE|IN_ISDIR" name="" path="TARGET_DIR" pathname="/home/saeki/TARGET_DIR" wd="1"> | |
## touch test1 | |
<event dir="False" mask="0x100" maskname="IN_CREATE" name="test1" path="TARGET_DIR" pathname="/home/saeki/TARGET_DIR/test1" wd="1"> | |
<event dir="False" mask="0x20" maskname="IN_OPEN" name="test1" path="TARGET_DIR" pathname="/home/saeki/TARGET_DIR/test1" wd="1"> | |
<event dir="False" mask="0x4" maskname="IN_ATTRIB" name="test1" path="TARGET_DIR" pathname="/home/saeki/TARGET_DIR/test1" wd="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
#!/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/11 | |
import pyinotify |
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
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2010/12/24 | |
**/ | |
#include <ks0108.h> | |
int inByte = 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
#!/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
#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; |