Raspberry Piに接続したノキアのモノクログラフィック液晶で動画を再生するプログラムです。
大阪旅行に浮かれ、共立電子で買ったSparkfunのLCD-10168を使いました。
動画の読み込み、リサイズ、二値化にはOpenCVを使っています。
基本的な処理の流れは
- 動画を読み込む
- グレイスケールに変換
#!/usr/local/bin/python3 | |
# -*- coding: utf-8 -*- | |
# please install pyserial | |
import serial | |
tty = "/dev/tty.usbserial-FTGD5T90" | |
com = serial.Serial(tty, 115200) |
// 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(){ |
function delay(delay_ms){ | |
var nowtime = Date.now(); | |
var timeout = nowtime + delay_ms; | |
while(nowtime < timeout){ | |
nowtime = Date.now(); | |
} | |
} | |
// us待ちメソッド…ただし正確性は無い | |
function delayMicroseconds(delay_us){ |
# -*- 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 |
# -*- 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 |
/* | |
* file_sync.c | |
* | |
* Created on: 2010/04/25 | |
* Author: NishinagaToshifumi | |
*/ | |
//#define WIN32 | |
#include <stdio.h> |
/* マインスイーパー もどき */ | |
#include<stdio.h> | |
#include<stdlib.h> | |
void in_bom(int **, int , int, int); // ボムを入れる関数(配列データ、x軸、y軸、ボムの数) | |
void in_num(int **, int , int); // ボムの数を数え、その数を配列に入れる関数(配列データ、x軸、y軸) | |
main(int argc,char *argv) | |
{ |
Raspberry Piに接続したノキアのモノクログラフィック液晶で動画を再生するプログラムです。
大阪旅行に浮かれ、共立電子で買ったSparkfunのLCD-10168を使いました。
動画の読み込み、リサイズ、二値化にはOpenCVを使っています。
基本的な処理の流れは
NAND LOADER ... in NAND | |
built on Jun 26 2007 at 20:03:06 | |
(0) BOOT: Linux kernel | |
func = 00000100 | |
**** LoadImage **** |
# -*- coding: utf-8 -*- | |
require 'socket' | |
socket = Socket.unix('./server_socket') | |
socket.write('A') | |
p socket.getc |