Skip to content

Instantly share code, notes, and snippets.

View labajo's full-sized avatar
🙂
Focusing

Juan Antonio Hernando Labajo labajo

🙂
Focusing
  • Telefonica
  • Boecillo
View GitHub Profile
@labajo
labajo / Test
Last active January 16, 2023 18:16
Hola
@labajo
labajo / hostSensors
Created July 4, 2020 11:24
DockerStation Metrics
var sensors = require("snsr");
const Influx = require('influxdb-nodejs');
const client = new Influx('http://localhost:8086/physicalHost');
var tempSensors = [
'Package id 0',
'Core 0',
'Core 1',
'Core 2',
'Core 3'
@labajo
labajo / temp_sensor3.ino
Last active April 14, 2018 10:55
BLE Nrf51822 BMP280
// Copyright (c) Sandeep Mistry. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// TimerOne library: https://code.google.com/p/arduino-timerone/
// DHT library: https://github.com/adafruit/DHT-sensor-library
#include <SPI.h>
#include <BLEPeripheral.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP280.h>
@labajo
labajo / Mqttsensor.ino
Created December 20, 2017 18:13
MqttSensor with deepsleep
#include <WiFi.h>
#include <PubSubClient.h>
#include "DHTesp.h"
const char* ssid = "";
const char* password = "";
const char* mqtt_server = "";
const int dhtPin = 16;
@labajo
labajo / missilelauncher.ino
Created December 20, 2017 09:02
Missile Launcher
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <Servo.h>
/* Set these to your desired credentials. */
const char *ssid = "MissileLauncher";
const char *password = "12345678";
ESP8266WebServer server(80);
@labajo
labajo / arduinojoystick.ino
Created December 20, 2017 09:01
Arduino Joystick
#include <Adafruit_ADS1015.h>
#include "RestClient.h"
RestClient client = RestClient("192.168.2.1", 3000);
Adafruit_ADS1115 ads;
int buttonState = 0;
void setup(void)
{
Serial.begin(115200);
@labajo
labajo / masterlamp.ino
Created December 20, 2017 09:00
MasterLamp
#include <IRLibDecodeBase.h>
#include <IRLib_P01_NEC.h>
#include <IRLib_P02_Sony.h>
#include <IRLib_HashRaw.h>
#include <IRLibCombo.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#include <Wire.h>
#include <Servo.h>
String inputString = ""; // a string to hold incoming data
boolean stringComplete = false; // whether the string is complete
Servo servoX;
int posX = 0;
void setup() {
// initialize serial:
@labajo
labajo / OV5642-esp8266.ino
Created April 19, 2016 20:01
OV5642-esp8266
// ArduCAM Mini demo (C)2015 Lee
// web: http://www.ArduCAM.com
// This program is a demo for ESP8266 arduino board.
// Publish captured image to a webpage.
//
// This demo was made for ArduCAM Mini OV2640 2MP Camera.
// It needs to be used in combination with html webpage.
//
// This program requires the ArduCAM V3.4.3 (or later) and ESP8266-Websocket libraries
@labajo
labajo / apply_method.js
Created August 20, 2013 20:08
apply method example
var incAge = function incAge(incValue) {
return this.age + incValue;
}
var BirthDayBoy = function BirthDayBoy(){
this.age = 12;
};
var boy = new BirthDayBoy();