Skip to content

Instantly share code, notes, and snippets.

View wdelenclos's full-sized avatar
🇫🇷
French Digital Engineer

Wladimir Dlcls wdelenclos

🇫🇷
French Digital Engineer
  • Paris
View GitHub Profile
# Needed modules will be imported and configured
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
# Declaration of the input pin which is connected with the sensor
GPIO_PIN = 4
GPIO.setup(GPIO_PIN, GPIO.IN, pull_up_down = GPIO.PUD_UP)
@wdelenclos
wdelenclos / app.py
Last active November 6, 2020 20:46
import os
from flask import Flask
from flask_restful import Resource, Api
from flask_cors import CORS
def measure_temp():
temp = os.popen("vcgencmd measure_temp").readline()
return (temp.replace("temp=",""))
@wdelenclos
wdelenclos / tracker.py
Created November 3, 2020 23:40
KY-033 Exemple
# Needed modules will be imported and configured
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
# Declaration of the input pin which is connected with the sensor
GPIO_PIN = 18
GPIO.setup(GPIO_PIN, GPIO.IN, pull_up_down = GPIO.PUD_UP)