Skip to content

Instantly share code, notes, and snippets.

@Servuc
Servuc / arduino-shutter.ino
Last active Apr 28, 2016
Arduino shutter
View arduino-shutter.ino
/**
* @author http://servuc.github.io
*
* This code is in public domain
* It's was create for the instructable :
*
* http://www.instructables.com/id/Arduino-Shutter-Opener
*/
#define SWITCH_DOWN_PIN 2
#define SWITCH_UP_PIN 3
@Servuc
Servuc / .block
Last active Aug 9, 2016
Pan & Zoom with click
View .block
license: gpl-3.0
@Servuc
Servuc / .block
Created Aug 16, 2016
Drag & Zoom
View .block
license: gpl-3.0
@Servuc
Servuc / .block
Last active Aug 17, 2016
d3.zoom.translateExtends
View .block
license: gpl-3.0
View .block
license: mit
@Servuc
Servuc / PrototypeJs.js
Created Feb 28, 2017
Example of prototype in JS
View PrototypeJs.js
//Global variable (like static)
App = {
value: 1
};
/*
* Mother class constructor
*/
function ClassA() {
this.value = 1;
View superNode.ino
/**
Licence MIT
@Servuc
Linked to my teaching http://servuc.github.io/teaching/iot-4.html
Base code to help students :P
*/
@Servuc
Servuc / .block
Last active Mar 7, 2017
Trek'n'Co money
View .block
license: mit
View teaching2-analogSensor.ino
#define SENSOR_PIN A0
void setup() {
pinMode( SENSOR_PIN, INPUT );
Serial.begin(9600);
}
void loop() {
Serial.println( analogRead( SENSOR_PIN ) );
delay(2500);
@Servuc
Servuc / README.md
Last active Sep 29, 2017
Teaching :) - Example of Express server with SerialPort reading
View README.md

Express server and serial port reading

This JS file demonstrate how open a serial port to read it, and display read value over HTTP server.

Copy/Paste the script will display value at : http://localhost:3000 enjoy.

Install

yarn add serialport
yarn add express