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
# -*- coding: utf-8 -*- | |
import numpy as np | |
import cv2 | |
from PIL import Image, ImageSequence, ImageDraw | |
import time | |
import unittest | |
import sys | |
# original code : http://playground.arduino.cc/Code/PCD8544 |
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
function delay(delay_ms){ | |
var nowtime = Date.now(); | |
var timeout = nowtime + delay_ms; | |
while(nowtime < timeout){ | |
nowtime = Date.now(); | |
} | |
} | |
// us待ちメソッド…ただし正確性は無い | |
function delayMicroseconds(delay_us){ |
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
// BeagleBone Black + Grove Base Cape + Grove Temperature Sensor | |
// Base Cape: http://www.seeedstudio.com/wiki/Grove_Cape_for_BeagleBone_Series | |
// Temperature Sensor: http://www.seeedstudio.com/wiki/Grove_-_Temperature_Sensor | |
// | |
// Written by Toshifumi Nishinaga | |
// this code is public domain | |
var b = require('bonescript'); | |
var getTemperature = function(){ |
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/local/bin/python3 | |
# -*- coding: utf-8 -*- | |
# please install pyserial | |
import serial | |
tty = "/dev/tty.usbserial-FTGD5T90" | |
com = serial.Serial(tty, 115200) |
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
// BeagleBone Black + Grove Base Cape + Grove Temperature Sensor | |
// Base Cape: http://www.seeedstudio.com/wiki/Grove_Cape_for_BeagleBone_Series | |
// Temperature Sensor: http://www.seeedstudio.com/wiki/Grove_-_Temperature_Sensor | |
// | |
// Written by Toshifumi Nishinaga | |
// this code is public domain | |
var b = require('bonescript'); | |
var getTemperature = function(){ |
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
from pyOCD.board import MbedBoard | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
board = MbedBoard.chooseBoard() | |
target = board.target | |
# flash = board.flash | |
target.resume() |
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
#/bin/bash | |
# コンパクトなRaspbianを作るやつをベースに自己流にアレンジしたもの | |
# Xを残したいバージョン: https://gist.github.com/Akkiesoft/9916490 | |
# | |
# ベース: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/ | |
# 前のバージョン: https://gist.github.com/Akkiesoft/5426660 | |
sudo apt-get update | |
rm -rf python_games ocr_pi.png Desktop/*.desktop |
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
#!/bin/bash | |
echo "---------------" | |
echo "RasPrep ver.0.1" | |
echo "---------------" | |
echo "* Copy inittab" | |
sudo cp resources/inittab /etc/ | |
echo "* Copy raspi-config.sh" | |
sudo cp resources/raspi-config.sh /etc/profile.d/ |
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
#!/bin/sh | |
mount /dev/sdb6 /mnt | |
mount /dev/sdb5 /mnt/boot | |
cd /mnt | |
rm -rf ~/raspi_img | |
mkdir ~/raspi_img | |
tar cpf ~/raspi_img/root.tar ./* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/* --exclude=boot/* | |
cd boot | |
tar cpf ~/raspi_img/boot.tar ./* |
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
// BeagleBone Black + Grove Base Cape + Grove Temperature Sensor | |
// Base Cape: http://www.seeedstudio.com/wiki/Grove_Cape_for_BeagleBone_Series | |
// Temperature Sensor: http://www.seeedstudio.com/wiki/Grove_-_Temperature_Sensor | |
// | |
// Written by Toshifumi Nishinaga | |
// this code is public domain | |
var b = require('bonescript'); | |
var getTemperature = function(){ |