Commands for controlling the Raspberry Pi 2 LEDs.
See rpi-leds for a node module that does this.
- OK (ACT) LED =
led0 - Power (PWR) LED =
led1
Allow access
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
Commands for controlling the Raspberry Pi 2 LEDs.
See rpi-leds for a node module that does this.
led0led1Allow access
| # BPi restFull-api by @BenyaminSalimi | |
| # you can see log of this program in "BPi.log" | |
| from flask import Flask,jsonify,send_file | |
| import picamera | |
| import time | |
| import RPi.GPIO as GPIO | |
| app = Flask(__name__) |
| from picamera import PiCamera | |
| from io import BytesIO | |
| import socket | |
| import time | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| with PiCamera(resolution='VGA', framerate=5) as camera: | |
| time.sleep(2) |
| #!/usr/bin/python | |
| ''' | |
| A Simple mjpg stream http server for the Raspberry Pi Camera | |
| inspired by https://gist.github.com/n3wtron/4624820 | |
| ''' | |
| from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
| import io | |
| import time | |
| import picamera |
| #!/usr/bin/python | |
| # Copyright (c) 2013-2014 Beebotte <contact@beebotte.com> | |
| # This program is published under the MIT License (http://opensource.org/licenses/MIT). | |
| ############################################################ | |
| # This code uses the Beebotte API, you must have an account. | |
| # You can register here: http://beebotte.com/register | |
| ############################################################# |
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 )))
|
| /* | |
| * motion_detect.cpp | |
| * To accompany instructions at: | |
| * http://sidekick.windforwings.com/2012/12/opencv-motion-detection-based-action.html | |
| * | |
| * Created on: Dec 02, 2012 | |
| * Author: tan | |
| * | |
| */ | |
| #include <iostream> |
| #!/usr/bin/python | |
| # | |
| #simple app to read string from serial port | |
| #and publish via MQTT | |
| # | |
| #uses the Python MQTT client from the Mosquitto project | |
| #http://mosquitto.org | |
| # | |
| #Andy Piper http://andypiper.co.uk | |
| #2011/09/15 |
| #!/bin/bash | |
| VENV=$1 | |
| if [ -z $VENV ]; then | |
| echo "usage: runinenv [virtualenv_path] CMDS" | |
| exit 1 | |
| fi | |
| . ${VENV}/bin/activate | |
| shift 1 | |
| echo "Executing $@ in ${VENV}" | |
| exec "$@" |