Skip to content

Instantly share code, notes, and snippets.

View karlosgliberal's full-sized avatar

karlos g liberal karlosgliberal

View GitHub Profile
@karlosgliberal
karlosgliberal / arduino_leds.ino
Created November 5, 2014 10:41
Patch de Arduinio para la pantalla de leds
//TODO esto es un apaño del apaño para pintar algo, se puede mejorar mucho,
// Si quieres ya sabes mandanos un correo [email protected] o clona y pull-recquest
//Pach de Arduinio para el control de una pantalla de led de adafruit
//sobre la libreria Adafruit RGBmatrixPanel.
#include <Adafruit_GFX.h> // Libreria grafica principal
#include <RGBmatrixPanel.h> // Libreria del hardgare espeficifo
//Relación de pins del arduino a la pantalla
@karlosgliberal
karlosgliberal / firebasetoarduinio.js
Last active August 29, 2015 14:08
Envio al puerto serie desde firebase
var Firebase = require('firebase');
var pixelDataRef = new Firebase('https://tufirebase.firebaseio.com/default');
var drawPixel = function(snapshot){
var coords = snapshot.name().split(":");
if (myPort.options.open) {
myPort.write("my string\n"+coords[0]);
myPort.write("my string\t"+coords[1]);
@karlosgliberal
karlosgliberal / serialport.js
Last active August 29, 2015 14:08
Definición básica del modulo serialport
var serialport = require("serialport"), //modulo puerto serie
SerialPort = serialport.SerialPort,
portName = process.argv[2],
ledState = false;
//Configuración básica del puerto y su tasa de transferencia (dependerá de tu sistema)
var myPort = new SerialPort("/dev/ttyACM0", {
baudRate: 115200,
options: false,
parser: serialport.parsers.readline("\r\n")
description "Serial demon"
author "karlos gliberal interzonas <[email protected]>"
start on runlevel [234]
stop on runlevel [0156]
chdir /home/pi/nodeSerialServer/
exec /home/pi/node-v0.10.2-linux-arm-pi/bin/node /home/pi/nodeSerialServer/SerialTest.js &
respawn
@karlosgliberal
karlosgliberal / echoHttpRequest.js
Last active August 29, 2015 14:08 — forked from Marak/echoHttpRequest.js
Echo HTTP requests
module['exports'] = function echoHttp (hook) {
hook.debug("Debug messages are sent to the debug console");
hook.debug(hook.params);
hook.debug(hook.req.path);
hook.debug(hook.req.method);
{
"properties": {
"environment": {
"runtime": "html",
"src": "./preview/iframe.html",
"width": 300,
"height": 300
}
},
"exports": [
{
"properties": {
"environment": {
"runtime": "html",
"src": "./preview/iframe.html",
"width": 300,
"height": 300
}
},
"exports": [
{
"processes": {
"ConnectOSC": {
"component": "osc/OscSend"
},
"ConsoleLogger": {
"component": "core/Output"
}
},
"connections": [
{
"info": {
"author": "meemoo",
"title": "pattern lab",
"description": "playing with layer tile",
"parents": [
"https://gist.github.com/5540121"
],
"url": "test-layers"
},
{
"properties": {},
"exports": [],
"processes": {
"Connect": {
"component": "ardrone/Connect",
"metadata": {
"x": 241,
"y": 127
}