This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<link rel = "icon" type = "image/png" href = "https://raspberry-lab.fr/ImgStat/Icon.png" /> | |
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}" /> | |
<title>Temperature</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from flask import Flask, render_template | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setwarnings(False) | |
app = Flask(__name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>{{ nomSite }}</title> | |
</head> | |
<body> | |
<h1>Bienvenue sur {{ nomSite }} !</h1> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return render_template('index.html', nomSite = 'Raspberry Lab') | |
app.run(debug=True, host='0.0.0.0', port=5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return 'Hello world !' | |
app.run(debug=True, host='0.0.0.0', port=5000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import picamera | |
import datetime | |
camera = picamera.PiCamera() | |
camera.hflip = True | |
camera.vflip = True | |
camera.resolution = (2592,1944) | |
camera.capture(str(datetime.datetime.now())+'.jpg') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import picamera | |
import time | |
camera = picamera.PiCamera() | |
#Retourner image : Enlever les deux hashtag suivants | |
#camera.hflip = True | |
#camera.vflip = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
camera.sharpness = 0 | |
camera.contrast = 0 | |
camera.brightness = 50 | |
camera.saturation = 0 | |
camera.ISO = 0 | |
camera.video_stabilization = False | |
camera.exposure_compensation = 0 | |
camera.exposure_mode = 'auto' | |
camera.meter_mode = 'average' | |
camera.awb_mode = 'auto' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import picamera | |
import datetime | |
camera = picamera.PiCamera() | |
camera.resolution = (2592,1944) | |
camera.capture(str(datetime.datetime.now())+'.jpg') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import RPi.GPIO as GPIO # Importation des librairies qui gerent les ports | |
import time # Importation de la librairie temps | |
GPIO.setmode(GPIO.BCM) # BCM : Numero des GPIO (GPIO 18) | |
GPIO.setup(18, GPIO.OUT) # Definition du port en sortie | |
GPIO.setwarnings(False) # Mettre sur OFF les alertes (qui sont inutiles) | |
# Affichage de texte | |
print("\n+------------------/ Blink LED /------------------+") |