Skip to content

Instantly share code, notes, and snippets.

View Franck1333's full-sized avatar
🐍
I'm trying new things

Franck Rochat Franck1333

🐍
I'm trying new things
View GitHub Profile
@Franck1333
Franck1333 / M-T1.py
Last active May 16, 2020 17:31
Multi-Threading #1
# -*- coding: utf-8 -*-
#https://openclassrooms.com/fr/courses/235344-apprenez-a-programmer-en-python/2235545-faites-de-la-programmation-parallele-avec-threading
import random
import sys
from threading import Thread
import time
class Afficheur(Thread):
@Franck1333
Franck1333 / ESP32_IoT.ino
Created December 31, 2019 22:29
Get working on Heltec Dev Board to use JSON.
/*
* HelTec Automation(TM) ESP32 Series Dev boards OLED
*
* - Some OLED draw Simple Function function test;
*
* by LXYZN from HelTec AutoMation, ChengDu, China
* 
* www.heltec.cn
*
* this project also realess in GitHub:
@Franck1333
Franck1333 / Button.py
Last active October 31, 2019 15:07
Learning about Kivy UI
#AIDES: riptutorial.com/fr/kivy
from kivy.app import App
from kivy.uix.button import Button
class TutorialApp(App):
def build(self):
return Button(text="Coucou Bande de Nouilles!")
TutorialApp().run()
@Franck1333
Franck1333 / Get_Input.py
Created July 20, 2019 15:26
TKINTER | Get data from a textBox widget
#AIDES: https://stackoverflow.com/questions/14824163/how-to-get-the-input-from-the-tkinter-text-box-widget
from tkinter import *
fenetre=Tk()
#----------------------------------------Zone de Recherche Manuel----------------------------------------
#Bar de Recherche
textBox=Text(fenetre, height=1, width=13)
textBox.pack()
Button(fenetre, height=1, width=13, text="Go!",command=lambda: recuperation_input()).pack()
@Franck1333
Franck1333 / Infos_Hardware-3_7.py
Created July 16, 2019 13:36
Pour commencer un nouveau Projet utilisant Tkinter (w\ Python 3.x), j'utilise ce modèle générique que j'ai conçue grâce a mon ancien projet 'ProjetBrassard'.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#PYTHON 3.x EDITION
#AIDES: https://pythonconverter.com/
#AIDES: https://stackoverflow.com/questions/9229333/how-to-get-overall-cpu-sage-e-g-57-on-linux
#AIDES: https://stackoverflow.com/questions/10585978/linux-command-for-percentage-of-memory-that-is-free
#AIDES: https://docs.python.org/2/library/commands.html
@Franck1333
Franck1333 / Interace_Modele_Tkinter_Python2_7.py
Last active July 16, 2019 13:32
Pour commencer un nouveau Projet utilisant Tkinter (w\ Python 2.7), j'utilise ce modèle générique que j'ai conçue grâce a mon ancien projet 'ProjetBrassard'.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#AIDES: https://github.com/Franck1333/ProjetBrassard
#AIDES: https://gist.github.com/Franck1333/f80936044088cb50aec1c1aad9de1803
#AIDES: http://apprendre-python.com/page-tkinter-interface-graphique-python-tutoriel
#---------------------------------------Importante LIB---------------------------------------
import os #Blibliotheque permettant l'interaction avec le systeme
import sys #Blibliotheque permettant l'interaction avec le systeme
@Franck1333
Franck1333 / Distributeur_Bouton__Relay.ino
Last active December 29, 2019 15:02
Get Informations from the Internet with MCU/Arduino devices // IoT || Make a Smart (Drinks/Liquids) Dispenser
//ROCHAT Franck
//Main Programme pour le Distributeur a Boisson
//NodeMCU32 ESP32 https://tinyurl.com/NodeMCU-32-WiFi
//---Support du String---
#include <iostream>
#include <string>
using namespace std;
//---Support du String---
@Franck1333
Franck1333 / Crypto_Live.py
Created March 5, 2019 01:11
How to use Adafruit Radio Feather/Bonnet RFM69HCW w/ 433.0MHz frequence
#THAT'S NOT THE MAIN PYHTON FILE ON THE RASPBERRY , please check the main python file at first.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import requests #The REQUESTS LIB WORK WITH PYTHON3
def crypto_news_live():
@Franck1333
Franck1333 / picture.py
Created February 23, 2019 18:23
Showing up a picture with Adafruit Hallowing
#Aides: https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/__init__.html
import board #Lib pour la communication avec le Hardware de la carte
import displayio #Lib pour la communication avec l'ecran TFT integrer
import time #Lib python classique pour en rapport avec le temps
import pulseio #Lib pour la communication avec l'ecran TFT integrer
#---Configuration de l'ecran---
backlight = pulseio.PWMOut(board.TFT_BACKLIGHT)
splash = displayio.Group()
@Franck1333
Franck1333 / OLED_CapteurMeteo.ino
Last active February 19, 2019 01:06
Using DHT11 Temperature & Humidity Sensor on Arduino
//AIDES: http://recitmst.qc.ca/arduino/capteur-humidite-et-temperature-ambiante/
//-------
#include <dht.h> //Lib utilise pour le capteur DHT11
#define dht_apin A5 //Capteur connecté à A5 pour analogique
// #define dht_apin 8 //Capteur connecté à 8 pour numérique
dht DHT; //Objet dht de type DHT
//-------
#include "U8glib.h" //Lib pour la gestion de l'affichage de l'ecran OLED
//-------
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); //Constructeur de mon ecran a moi --> https://amzn.to/2GuxYdT