Skip to content

Instantly share code, notes, and snippets.

Konstantin Kirik snegovick

View GitHub Profile
@snegovick
snegovick / sutil.lua
Created Sep 10, 2015
Serial utils for lua
View sutil.lua
local sutil = {}
function sutil.getchar(ttyfile)
return ttyfile:read(1)
end
function sutil.readall_timeout(ttyfile, n, time)
local data = ""
local ret = true
local ctr = 0
@victorbstan
victorbstan / video_pyopencv.py
Created Mar 20, 2012 — forked from kriben/video_pyopencv.py
Python opencv feed from webcam
View video_pyopencv.py
import opencv
#this is important for capturing/displaying images
from opencv import highgui
import pygame
import sys
camera = highgui.cvCreateCameraCapture(0)
def get_image():
im = highgui.cvQueryFrame(camera)
# Add the line below if you need it (Ubuntu 8.04+)
You can’t perform that action at this time.