From 06ae789a1047ee360c0619c48362ec69e4d6a467 Mon Sep 17 00:00:00 2001 From: Pierrick C Date: Tue, 13 Nov 2018 23:20:59 +0100 Subject: [PATCH] Fichier en trop --- code/main_1.py | 63 -------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 code/main_1.py diff --git a/code/main_1.py b/code/main_1.py deleted file mode 100644 index 462fecd..0000000 --- a/code/main_1.py +++ /dev/null @@ -1,63 +0,0 @@ -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -""" -Eclairage à LED Neopixel -""" -__author__ = "arofarn" -__version__ = 0.1 - -import time -import machine -import neopixel - -NB_PIX = 8 # Nombre de pixel -LUMINOSITE = 1.0 # Luminosité (0.0-1.0) -NEOPIX_PIN = 2 # N° de la broche de contrôle des néopixels - -pixel_strip = neopixel.NeoPixel(machine.Pin(NEOPIX_PIN), NB_PIX) - -#Eteint tout à l'initialisation -pixel_strip.fill((0, 0, 0)) -pixel_strip.write() - -while True: - for i in range(NB_PIX): - print("blanc") - pixel_strip[i] = (255, 255, 255) - pixel_strip.write() - time.sleep(0.5) - - for i in range(NB_PIX): - print("éteint") - pixel_strip[i] = (0, 0, 0) - pixel_strip.write() - time.sleep(0.5) - - for i in range(NB_PIX): - print("rouge") - pixel_strip[i] = (255, 0, 0) - pixel_strip.write() - time.sleep(0.5) - - for i in range(NB_PIX): - print("vert") - pixel_strip[i] = (0, 255, 0) - pixel_strip.write() - time.sleep(0.5) - - for i in range(NB_PIX): - print("bleu") - pixel_strip[i] = (0, 0, 255) - pixel_strip.write() - time.sleep(0.5)