Skip to content

Instantly share code, notes, and snippets.

View quentinchap's full-sized avatar

CHAPELLE Quentin quentinchap

View GitHub Profile
#include "TLx493D_inc.hpp"
#include <SimpleKalmanFilter.h>
#include <OneButton.h>
#include <Adafruit_NeoPixel.h>
// How many internal neopixels do we have? some boards have more than one!
#define NUMPIXELS 1
Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800);
#!/bin/bash
npm init --yes;
npm i express typescript ts-node dotenv;
npm i -D typescript @types/express @types/node concurrently nodemon;
npm i --save-dev @types/express;
tsc --init;
mkdir configs controllers middlewares models routes services utils;
@quentinchap
quentinchap / linearregression_trainingcolab1.ipynb
Last active August 23, 2020 17:06
simpleLinearRegression.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Importer les bibliothèques
#include <OneWire.h>
#include <DallasTemperature.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ArduinoJson.h>
#define ONE_WIRE_BUS 4
// Initialisation de oneWire
mkdir /home/pi/image-cam
sudo chgrp motion /home/pi/image-cam
chmod g+rwx /home/pi/image-cam
daemon on
stream_localhost off
target_dir /home/pi/image-cam
let promise1 = new Promise((resolve, reject) =>
resolve('Success!');
//reject('error');
);
promise1.then(res =>
alert(result);
}, function (err) {
alert(err);
}
GET https://url-home-assistant/api/states
sensor:
- platform: influxdb
host: localhost
username: username
password: pass
queries:
- name: 'Salon'
unit_of_measurement: °C
value_template: '{{ value | round(1) }}'
group_function: last
sensors:
- platform: rest
resource: http://<Adresse_IP>/api/<username</sensors/7
value_template: '{{ value_json.state.lightlevel }}'
unit_of_measurement: Lux
name: 'Lumière couloir'
- platform: rest
resource: http://<Adresse_IP>/api/<username>/sensors/5
value_template: '{{ value_json.state.temperature | float / 100 }}'
unit_of_measurement: °C