Skip to content

Instantly share code, notes, and snippets.

@Krelyx
Krelyx / script_test.lua
Created January 16, 2015 18:50
Script de test
--[[
Script de test
Author Xylerk
]]--
-- Définition de fonctions utiles
function sendOn(target,nid)
target = tostring(target)
nid = tostring(nid)
cmdToSend = string.format("curl -X GET 'http://localhost:8888/node/on?target=%s&sender=1&nid=%s'",target,nid)
os.execute(cmdToSend)
@Krelyx
Krelyx / Ydle.cpp
Created January 16, 2015 18:46
Version modifée
// Ydle.cpp
//
// Ydle implementation for Arduino
// See the README file in this directory for documentation
// For changes, look at Ydle.h
//
// Authors:
// Fabrice Scheider AKA Denia,
// Manuel Esteban AKA Yaug
// Matthieu Desgardin AKA Zescientist
@Krelyx
Krelyx / Ydle.h
Created January 16, 2015 18:39
Version modifée
// Last changes: 01-16-2015
// Ydle.cpp
//
// Ydle implementation for Arduino
// See the README file in this directory for documentation
// For changes, look at Ydle.h
//
// Authors:
// Fabrice Scheider AKA Denia,
// Manuel Esteban AKA Yaug
@Krelyx
Krelyx / dataStructures.h
Created January 16, 2015 18:33
Définitions de structures pour les données à envoyer
#ifndef dataStructures_H_
#define dataStructures_H_
#include "Float.h"
typedef struct {
uint8_t cmd;
uint8_t nid;
} sReceivedCommand;
@Krelyx
Krelyx / Test_ON_OFF_AskData.ino
Created January 16, 2015 18:29
Sketch de test
/* Author : Xylerk
* Description : Sketch de test fonctions cmdOn et cmdOff
* Le node atteint que le master lui demande les données
* Licence : CC-BY-SA
*/
#include <TimerOne.h>
#include "Ydle.h"
#include "Float.h"
#include "dataStructures.h"