Skip to content

Instantly share code, notes, and snippets.

@ChristianUlbrich
ChristianUlbrich / test_frame_capture.c
Created December 9, 2013 12:54
Simple example to capture a frame with an uEye Camera under Linux; compile with: gcc -Wall test_frame_capture.c -lueye_api -o frametest
#include<stdio.h>
#include<stddef.h>
#include<ueye.h>
HIDS hCam = 1;
void main() {
printf("Success-Code: %d\n",IS_SUCCESS);
//Kamera öffnen
@miguelmota
miguelmota / start_stream.sh
Last active June 30, 2018 18:38
Bash scripts to start and stop raspistill and mjpg_streamer. Blog post: http://www.miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/
#!/bin/bash
if [ ! -d /tmp/stream ]
then
mkdir /tmp/stream/
fi
if pgrep raspistill > /dev/null
then
echo "raspistill already running"
@javierarilos
javierarilos / micro-mongodb-python-book.py
Created May 22, 2014 21:47
The Little MongoDB Book code examples written in Python + pymongo
##########################################################################
# THE MICRO MONGODB+PYTHON BOOK
#
# A simple adaptation to Python + summary of
# The Little MongoDB Book: https://github.com/karlseguin/the-little-mongodb-book
#
# javier arias losada
# twitter: @javier_arilos
# Usage suggestion: run line by line bu using pydemo project (https://github.com/pablito56/pydemo)
@kfei
kfei / fileio3.py
Created October 13, 2014 02:35
A Python3 ZMQ file transfer example
# File Transfer model #3
#
# In which the client requests each chunk individually, using
# command pipelining to give us a credit-based flow control.
import os
import sys
from threading import Thread
import zmq
@JonathanRaiman
JonathanRaiman / sqlite + pickle
Created December 23, 2014 01:13
Python pickling of objects into sqlite db
import sqlite3
import pickle
protocol = 0
sqlite3.register_converter("pickle", pickle.loads)
sqlite3.register_adapter(list, pickle.dumps)
sqlite3.register_adapter(set, pickle.dumps)
@spikedrba
spikedrba / pmd.py
Last active August 13, 2021 17:42
RPi Motion detection with picamera python lib
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script was originally created by by killagreg î Thu Dec 18, 2014 7:53 am
# see http://www.raspberrypi.org/forums/viewtopic.php?p=656881#p656881
# This script implements a motion capture surveillance cam for raspberry pi using picam
# and is based on the picamera python library.
# It uses the "motion vectors" magnitude of the h264 hw-encoder to detect motion activity.
@oysteinjakobsen
oysteinjakobsen / gist:e59cdd38a688ee8a418a
Last active August 7, 2019 14:38
How to get docker-compose (fig) up and running on Raspberry Pi 2

Background

I assume you already have Docker up and running on your Raspberry Pi 2. If not, see this article.

The next natural step is to install Docker Compose (formerly Fig), but there's no ARM support out of the box. This recipe will help you install Docker Compose on your Raspberry Pi 2!

The following six steps will do the trick:

  1. Get the docker-compose source code from git
@oleq
oleq / _README.md
Last active November 16, 2025 12:17
A2DP audio streaming using Raspberry PI (Raspbian Jessie)

What is this all about?

This tutorial will turn your Raspberry PI into a simple Bluetooth audio receiver, which plays music through connected speakers. It's like a regular car audio system, but it can be used anywhere and it's a good value.

   Audio source (i.e. smartphone) 
                |
                v
 (((  Wireless Bluetooth Channel  )))
 |
/*
ESP8266 CheckFlashConfig by Markus Sattler
This sketch tests if the EEPROM settings of the IDE match to the Hardware
*/
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <Hash.h>
@uncletammy
uncletammy / example.ino
Created March 4, 2016 16:48
ESP8266 Delay in for loops - Websockets
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <WebSocketsClient.h>
#include <Hash.h>
ESP8266WiFiMulti WiFiMulti;
WebSocketsClient webSocket;
void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {