diff --git a/Fritzing/dossier sans titre/Vertical Resistor.fzpz b/Fritzing/dossier sans titre/Vertical Resistor.fzpz
new file mode 100644
index 0000000..e673806
Binary files /dev/null and b/Fritzing/dossier sans titre/Vertical Resistor.fzpz differ
diff --git a/Fritzing/dossier sans titre/part.resistor-vertical.fzp b/Fritzing/dossier sans titre/part.resistor-vertical.fzp
new file mode 100644
index 0000000..200cb88
--- /dev/null
+++ b/Fritzing/dossier sans titre/part.resistor-vertical.fzp
@@ -0,0 +1,85 @@
+
+
+ 4
+ Vertical Resistor
+
+ 2009-09-08
+ Stephen Lilley
+
+ Resistor
+ basic resistor
+ fritzing core
+
+
+ Resistor
+ 100 mil (stand-up right)
+ THT
+ Vertical
+
+ 220
+ ±5%
+ vertical
+
+ discreteParts.resistor.220
+ A generic resistor (0.25W)
+ R{instanceTitle} {net connector0} {net connector1} {resistance}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pin0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Pin 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Fritzing/dossier sans titre/svg.breadboard.resistor-vertical_breadboard.svg b/Fritzing/dossier sans titre/svg.breadboard.resistor-vertical_breadboard.svg
new file mode 100644
index 0000000..86ac18d
--- /dev/null
+++ b/Fritzing/dossier sans titre/svg.breadboard.resistor-vertical_breadboard.svg
@@ -0,0 +1,21 @@
+
+
+
+
diff --git a/Fritzing/dossier sans titre/svg.icon.resistor-vertical_icon.svg b/Fritzing/dossier sans titre/svg.icon.resistor-vertical_icon.svg
new file mode 100644
index 0000000..db38e6c
--- /dev/null
+++ b/Fritzing/dossier sans titre/svg.icon.resistor-vertical_icon.svg
@@ -0,0 +1,22 @@
+
+
+
+
diff --git a/Fritzing/dossier sans titre/svg.pcb.axial_stand0_2_100mil_pcb.svg b/Fritzing/dossier sans titre/svg.pcb.axial_stand0_2_100mil_pcb.svg
new file mode 100644
index 0000000..53981e5
--- /dev/null
+++ b/Fritzing/dossier sans titre/svg.pcb.axial_stand0_2_100mil_pcb.svg
@@ -0,0 +1,18 @@
+
+
diff --git a/Fritzing/dossier sans titre/svg.schematic.resistor-vertical_schematic.svg b/Fritzing/dossier sans titre/svg.schematic.resistor-vertical_schematic.svg
new file mode 100644
index 0000000..fa905da
--- /dev/null
+++ b/Fritzing/dossier sans titre/svg.schematic.resistor-vertical_schematic.svg
@@ -0,0 +1,21 @@
+
+
+
\ No newline at end of file
diff --git a/Timetable/JLEB/README.md b/Timetable/JLEB/README.md
index 88dad5d..1f1b0b1 100644
--- a/Timetable/JLEB/README.md
+++ b/Timetable/JLEB/README.md
@@ -1 +1,13 @@
# Affiche l'horaire du train Cheseaux à Lausanne sur un ruban de LED's RGB
+
+zf190408.2100
+## ATTENTION, cela ne fonctionne pas encore !
+
+## Ce n'est pas encore automatique, il faut lancer à la main boot.lua et timetable.Lausanne
+
+## Il y a un problème d'arrondi dans le calcul du nombre de 3 minutes, il ne faut pas arrondir 2mn31 à 3 minutes !
+Si c'est < 3 minutes il faut décompte moins un pour les clignotements car même pour 10 secondes on va rater le train !
+
+## Il y a un très gros problème de raisonnement, car quand on se trouve entre -1 et 3 minutes du prochain train, l'horaire du train, que l'on va chercher sur Internet, ne va changer qu'une minute après le départ du train. Il faut donc prendre le prochain train indiqué et non le train actuel quand on se trouve à < 3 minutes du départ !
+
+## A cause du problème de raisonnement, cela boucle en continu quand on se trouve entre -1 et 3 minutes du départ du train !
diff --git a/Timetable/JLEB/jflash_2rgb.lua b/Timetable/JLEB/jflash_2rgb.lua
index 175f8f7..bd86235 100644
--- a/Timetable/JLEB/jflash_2rgb.lua
+++ b/Timetable/JLEB/jflash_2rgb.lua
@@ -2,7 +2,7 @@
-- tout sur la couleur: https://www.w3schools.com/colors/default.asp
-- roue des couleurs: https://iro.js.org/?ref=oldsite
-print("\n jflash_2rgb.lua jv190227.1628 \n")
+print("\n jflash_2rgb.lua jv190408.1815 \n")
dofile("jled_rgb.lua")
@@ -19,7 +19,7 @@ ztmr_Flash_LED1 = tmr.create() ztmr_Flash_LED2 = tmr.create()
function flash_LED1 ()
if nbfois1 >= xfois1 then
- print(nbfois1)
+ print("nbfois1: "..nbfois1)
nbfois1 = 0
jled_rgb(zLED1,R1,G1,B1,0)
tmr.alarm(ztmr_Flash_LED1, zTm_Pause, tmr.ALARM_SINGLE, flash_LED1)
@@ -39,7 +39,7 @@ end
function flash_LED2 ()
if nbfois2 >= xfois2 then
- print(nbfois2)
+ print("nbfois2: "..nbfois2)
nbfois2 = 0
jled_rgb(zLED2,R2,G2,B2,0)
tmr.alarm(ztmr_Flash_LED2, zTm_Pause, tmr.ALARM_SINGLE, flash_LED2)
@@ -57,9 +57,9 @@ function flash_LED2 ()
end
end
-xfois1 =5
+xfois1 = 5
flash_LED1 ()
-xfois2 =2
+xfois2 = 2
flash_LED2 ()
diff --git a/Timetable/JLEB/time_table.lua b/Timetable/JLEB/time_table.lua
new file mode 100644
index 0000000..74a5bf1
--- /dev/null
+++ b/Timetable/JLEB/time_table.lua
@@ -0,0 +1,80 @@
+-- Rafraichissement du diff time et du web_cli
+print("\n time_table.lua aj190408.1924 \n")
+
+function get_timetable()
+-- http.get("http://192.168.4.1/?line1="..zlength.."m", nil, function(code, data)
+ print("get_timetable: ")
+ http.get("http://transport.opendata.ch/v1/connections?from=Cheseaux&to=Lausanne-Flon&fields[]=connections/from/departure", nil, function(code, data)
+ if (code < 0) then
+ print("HTTP request failed")
+ else
+ print(code, data)
+ jp= 50 h1=string.sub (data,jp,jp+7)
+ jp= 100 h2=string.sub (data,jp,jp+7)
+ jp= 150 h3=string.sub (data,jp,jp+7)
+ jp= 200 h4=string.sub (data,jp,jp+7)
+ print(h1,h2,h3,h4)
+ refresh_display()
+ end
+ end)
+end
+
+function refresh_display()
+ print("coucou 1")
+ -- tm = rtctime.epoch2cal(rtctime.get() + 3600) -- heure d'été
+ tm = rtctime.epoch2cal(rtctime.get() + 7200) -- heure d'hiver
+
+ h0 = string.format("%02d:%02d:%02d", tm["hour"], tm["min"], tm["sec"])
+ print("Il est "..h0)
+ print("h2, h3",h2,h3)
+ d1=zround((diff_time(h2, h0)/180),0)
+ d2=zround((diff_time(h3, h0)/180),0)
+ print(d1,d2)
+ xfois1 = d2 xfois2 =d1
+ if d1==0 then
+ print("coucou 2")
+ get_timetable()
+ print("coucou 3")
+-- refresh_display()
+ print("coucou 4")
+ end
+end
+
+
+function start_refresh_display()
+ tm = rtctime.epoch2cal(rtctime.get() + 7200)
+ h0 = string.format("%02d:%02d:%02d", tm["hour"], tm["min"], tm["sec"])
+ print("Il est "..h0)
+ tm = time2sec(h0)
+ print("tm: ",tm)
+ if tm >= 71000 then
+ ztmr_start_refresh_display:unregister()
+ get_timetable()
+-- refresh_display()
+ end
+
+end
+
+
+
+zTm_start_refresh_display = 1*1000
+ztmr_start_refresh_display = tmr.create()
+tmr.alarm(ztmr_start_refresh_display, zTm_start_refresh_display, tmr.ALARM_AUTO, start_refresh_display)
+
+
+zTm_refresh_display = 10*1000
+ztmr_refresh_display = tmr.create()
+
+
+--get_timetable()
+--refresh_display()
+
+--tmr.alarm(ztmr_refresh_display, zTm_refresh_display, tmr.ALARM_AUTO, refresh_display)
+
+--[[
+get_timetable()
+refresh_display()
+
+]]
+
+
diff --git a/Timetable/JLEB/web_cli.lua b/Timetable/JLEB/web_cli.lua
index dc1cd6d..36034c9 100644
--- a/Timetable/JLEB/web_cli.lua
+++ b/Timetable/JLEB/web_cli.lua
@@ -1,5 +1,5 @@
-- Petit script pour envoyer quelque chose sur un serveur WEB
-print("\n web_cli.lua zf190227.1838 \n")
+print("\n web_cli.lua zf190408.1823 \n")
function disp_send()
@@ -15,8 +15,11 @@ function disp_send()
jp= 150 h3=string.sub (data,jp,jp+7)
jp= 200 h4=string.sub (data,jp,jp+7)
print(h1,h2,h3,h4)
- tm = rtctime.epoch2cal(rtctime.get() + 3600)
+-- tm = rtctime.epoch2cal(rtctime.get() + 3600) -- heure d'été
+ tm = rtctime.epoch2cal(rtctime.get() + 7200) -- heure d'hiver
+
h0 = string.format("%02d:%02d:%02d", tm["hour"], tm["min"], tm["sec"])
+ print("Il est "..h0)
d1=zround((diff_time(h2, h0)/180),0)
d2=zround((diff_time(h3, h0)/180),0)
print(d1,d2)
@@ -34,4 +37,4 @@ h0 = string.format("%02d:%02d:%02d", tm["hour"], tm["min"], tm["sec"])
print(h0)
-]]
\ No newline at end of file
+]]
diff --git a/Timetable/JLEB/wifi_cli_conf.lua b/Timetable/JLEB/wifi_cli_conf.lua
index 05d052a..ea86a69 100644
--- a/Timetable/JLEB/wifi_cli_conf.lua
+++ b/Timetable/JLEB/wifi_cli_conf.lua
@@ -1,9 +1,12 @@
-- Petit script pour configurer le client WIFI du NodeMCU
-print("\n wifi_cli_conf.lua zf190227.1723 \n")
+print("\n wifi_cli_conf.lua zf190408.1953 \n")
--credentials par défaut
--cli_ssid="3g-s7"
+cli_ssid="AlexIphone"
+cli_pwd="q1w2abcdfH&"
+
cli_ssid="3g-s7"
cli_pwd="12234567"