+
+ <%
+ zout("Il reste: "..node.heap().." de RAM !
\n")
+ %>
+
+
+
+
diff --git a/Workshop/oscilloscope/tst_oscillo/README.md b/Workshop/oscilloscope/tst_oscillo/README.md
index f5c8c5b..5300753 100644
--- a/Workshop/oscilloscope/tst_oscillo/README.md
+++ b/Workshop/oscilloscope/tst_oscillo/README.md
@@ -6,15 +6,14 @@ Quand on achète un oscilloscope à 25 balles on ne sait pas trop l'utiliser et
On va utiliser un NodeMCU pour:
-- envoyer le caractère U (u majuscule) sur la console. Le U à l'avantage d'avoir la suite 1010101 en ASCII. Facile donc de pouvoir le repérer à l'oscilloscope
+- envoyer, 100x par seconde, 5x le caractère U (u majuscule) sur la console. Le U à l'avantage d'avoir la suite 1010101 en ASCII. Facile donc de pouvoir le repérer à l'oscilloscope
-- envoyer la fréquence xx sur la pin x
-
-- envoyer un signal PWM de 30/70% sur la pin y
-
-
-
-zf190504.1335
+- envoyer un signal carré, ratio 30/70%, à la fréquence 1kHz sur la pin 5
+
+
+
+
+zf190506.1403
diff --git a/Workshop/oscilloscope/tst_oscillo/a_gene1.lua b/Workshop/oscilloscope/tst_oscillo/a_gene1.lua
index af9a5b6..7546921 100644
--- a/Workshop/oscilloscope/tst_oscillo/a_gene1.lua
+++ b/Workshop/oscilloscope/tst_oscillo/a_gene1.lua
@@ -1,6 +1,6 @@
-- Générerateur de fonction signal carré de fréquence variable et de rqtio variable
-print("\n a_gene1.lua zf190504.1912 \n")
+print("\n a_gene1.lua zf190506.1417 \n")
pin_gene = 5
gpio.mode(pin_gene,gpio.OUTPUT)
@@ -19,7 +19,7 @@ function genesquare()
print("titi")
end
-zfreq=5000*(10/9.43)
+zfreq=1000*(7.575/10) -- 1kHz
genesquare()
--[[
diff --git a/Workshop/oscilloscope/tst_oscillo/a_tst1_serial.lua b/Workshop/oscilloscope/tst_oscillo/a_tst1_serial.lua
index fc59470..8ec329e 100644
--- a/Workshop/oscilloscope/tst_oscillo/a_tst1_serial.lua
+++ b/Workshop/oscilloscope/tst_oscillo/a_tst1_serial.lua
@@ -1,13 +1,13 @@
--- Juste pour tester le port série, envoie une suite de caractère ASCCI toutes les seconde
+-- Juste pour tester le port série, envoie une suite "UUUUU" 100x par seconde
-- On envoie 5x le caractère U
-- U en binaire c'est 1010101
-- on peut ainsi bien 'voir' avec un oscilloscope le port série
-print("\n a_tst1_serial.lua zf190504.1502 \n")
+print("\n a_tst1_serial.lua zf190506.1402 \n")
test_1=tmr.create()
-tmr.alarm(test_1, 0.020*1000, tmr.ALARM_AUTO, function()
+tmr.alarm(test_1, 0.01*1000, tmr.ALARM_AUTO, function()
--tmr.alarm(test_1, 2.5*1000, tmr.ALARM_SINGLE, function()
-- print(" ### ")
-- uart.write(0, string.char(0)..string.char(0)..string.char(1)..string.char(3)..string.char(0).."U")
diff --git a/Workshop/oscilloscope/tst_oscillo/boot.lua b/Workshop/oscilloscope/tst_oscillo/boot.lua
index 4e7f874..9ec19a1 100644
--- a/Workshop/oscilloscope/tst_oscillo/boot.lua
+++ b/Workshop/oscilloscope/tst_oscillo/boot.lua
@@ -1,6 +1,6 @@
-- Scripts à charger après le boot pour démarrer son appli
-print("\n boot.lua zf190504.1918 \n")
+print("\n boot.lua zf190506.0926 \n")
function heartbeat()
f= "flash_led_xfois.lua" if file.exists(f) then dofile(f) end
@@ -27,8 +27,8 @@ f= "a_tst1_serial.lua" if file.exists(f) then dofile(f) end
f= "a_gene1.lua" if file.exists(f) then dofile(f) end
f=nil
-heartbeat=nil
---heartbeat()
+--heartbeat=nil
+heartbeat()