Skip to content

Instantly share code, notes, and snippets.

Ludovic FRIN ludovicfrin

Block or report user

Report or block ludovicfrin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dht22.ino
/**
* Script permettant la lecture régulière de la température et de l'humidité
* la lecture s'effectue sur un DHT22 en utilisant une carte NodeMCU
*/
#include <ESP8266WiFi.h>
#include <DHT.h>
#include <ArduinoJson.h>
#include <SPI.h>
@ludovicfrin
ludovicfrin / dht22.lua
Last active May 9, 2016
NodeMcu + DHT22
View dht22.lua
--
-- Fichier dht22.lua
--
-- Permet la lecture de la température et le pourcentage d'humidité
-- Envoi les valeurs obtenus dans une socket TCP
--
local dht = require 'dht'
DHT_PIN = 4
SERVER_IP = "xxx.xxx.xxx.xxx"
View lm35.ino
float temperature;
int reading;
int pin = 5;
void setup()
{
analogReference(INTERNAL);
Serial.begin(9600);
}
View EntityController.java
package fr.frin.spring;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* Controleur
*
* @author Ludovic FRIN
*/
@ludovicfrin
ludovicfrin / spring-servlet.xml
Last active Feb 2, 2016
Fichier spring-serlvet.xml pour réalisation d'un service RESTful avec le framework Spring
View spring-servlet.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:component-scan base-package="fr.frin.spring" />
@ludovicfrin
ludovicfrin / web.xml
Last active Feb 2, 2016
Fichier web.xml pour projet RESTful avec le framework Spring
View web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>Spring REST</display-name>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
@ludovicfrin
ludovicfrin / pom.xml
Created Feb 2, 2016
Fichier pom.xml pour réalisation d'un service RESTFul avec le framework Spring
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.frin</groupId>
<artifactId>spring</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>spring</name>
<description>Spring REST</description>
<properties>
@ludovicfrin
ludovicfrin / Controller.java
Last active Feb 1, 2016
Contrôleur pour service RestFul Jersey
View Controller.java
package fr.frin.jersey;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import fr.frin.phonesync.webapp.entity.Sms;
@ludovicfrin
ludovicfrin / web.xml
Last active Feb 1, 2016
web.xml Pour service RESTFul Jersey
View web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>Jersey REST</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
@ludovicfrin
ludovicfrin / pom.xml
Last active Feb 1, 2016
pom.xml Pour service RESTFul Jersey
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.frin</groupId>
<artifactId>jersey</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>jersey</name>
<description>Jersey REST</description>
<properties>
You can’t perform that action at this time.