NetworkButtonJSON is a forest of network enabled leds that switch on and off on simultaneosly. Join the forest, build a networked LED.
You should:
- mount an Arduino Ethernet Shield.
- build an Arduino-based prototype with the following schema:
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from Crypto.Cipher import AES | |
| import base64 | |
| import random | |
| import hashlib | |
| import os | |
| class AesCrypt256: |
| # A simple CMake script for building the application. | |
| cmake_minimum_required(VERSION 2.8) | |
| project(create-x509) | |
| # Our only dependency is OpenSSL | |
| find_package(OpenSSL REQUIRED) | |
| include_directories(${OPENSSL_INCLUDE_DIR}) | |
| add_executable(create-x509 create-x509.cpp) |
| /** | |
| * Creates a new Uint8Array based on two different ArrayBuffers | |
| * | |
| * @private | |
| * @param {ArrayBuffers} buffer1 The first buffer. | |
| * @param {ArrayBuffers} buffer2 The second buffer. | |
| * @return {ArrayBuffers} The new ArrayBuffer created out of the two. | |
| */ | |
| var _appendBuffer = function(buffer1, buffer2) { | |
| var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| # Change the include line in Makefile | |
| INCLUDES := -DCUDA_5 -I$(PYTHON_INCLUDE_PATH) -I$(NUMPY_INCLUDE_PATH) -I$(CUDA_SDK_PATH) -I./include -I./include/common -I./include/cudaconv2 -I./include/nvmatrix -I./dummyinclude/ |
| global | |
| nbproc 1 | |
| maxconn 65536 | |
| defaults | |
| timeout connect 5s | |
| timeout queue 5s | |
| timeout server 30s | |
| timeout tunnel 1h |
| #include "SSLBuffer.h" | |
| SSLBuffer::SSLBuffer() | |
| :ssl(NULL) | |
| ,read_bio(NULL) | |
| ,write_bio(NULL) | |
| ,write_to_socket_callback(NULL) | |
| ,write_to_socket_callback_data(NULL) | |
| ,read_decrypted_callback(NULL) | |
| ,read_decrypted_callback_data(NULL) |