ESP8266 bugs !!?
-
@kl3m3n
Good morning,
I have 2 very distinct applications which each run on an arduino card. (programmed with Bascom) They are both connected to ESP8266 Wemos D1 R1 and I use GUI-O. They worked without problems for months and suddenly, the two applications no longer want to connect to GUI-O!. If I replace the ESP8266 with Bluetooth modules, they work on GUI-O again.
So I reprogrammed the esp8266s, reconnected to GUI-O successfully and put the ESP8266s back in place. I see that GUI-O connects to the application but the data exchange only partially works!
An idea ? , although I was able to pair the ESP8266, could it be defective?
Is there software capable of restoring the original firmware in the ESP8266?
Kind regards, Bernard -
Hi!
@Bernard said in ESP8266 bugs !!?:
They worked without problems for months and suddenly, the two applications no longer want to connect to GUI-O!
This is very strange! Does the ESP8266 Wemos D1 R1 have a serial debug port? Can you check out what is happening there? You would need to change the config.h file and uncomment #define _GUIO_DEBUG to see the output on the serial. Then recompile and flash the ESP8266.
@Bernard said in ESP8266 bugs !!?:
I see that GUI-O connects to the application but the data exchange only partially works!
Can you explain what "partially works" means? The serial debug option would also help you here to diagnose what is happening.
@Bernard said in ESP8266 bugs !!?:
Is there software capable of restoring the original firmware in the ESP8266?
What original firmware? Is which software capable of restoring the original firmware? You can erase ESP8266 flash - there are a lot of online tutorials to do this.
Note that if you have already performed the pairing, the pairing data is stored in EEPROM. You can clear the EEPROM pairing parameters (and thus reset pairing) by sending command (you may need to send it twice):
!CLEAR_PARAMS\r\n
to ESP8266 (see https://www.gui-o.com/examples/gui-o-and-boards/esp8266#h.wojc1r2r0dkx).
Please let me know how it goes.
Best regards,
Kl3m3n -
Hello,
Everything goes well when my Arduino receives the @init command. Arduino sends all the information back to GUI-O. and it is displayed correctly on GUI-O. Then, the main loop of my program sends every 60 msec:
Print "@slout_g VAL:" ; Logleft; "
Print "@slout_d VAL:" ; Logright; "
and Print "@ch0 PLI:'pl0,pl1' PLC:'#000000,#00BE00' YP:'" ; Logleft; "," ; Logright; "'," ; "XP:'0,0,0,0'". From then on, GUI-O no longer sends a command to the Arduino when I activate a widget on GUI-O! (a slider for example)
If I replace the ESP8266 with a Bluethout module, everything works correctly!! out of curiosity, I am attaching the source program. (Bascom)
I still suspect the ESP8266 that I will replace and I will keep you informed.
Kind regards, Bernard'=============================================================================== ' HW: Arduino Nano ATMEGA 328 , programmed whit BASCOM ' GUI-O Table mixage ' GUI-O Ver 1.0.78 '=============================================================================== '$sim $regfile = "m328pdef.dat" $crystal = 16000000 $baud = 19200 $hwstack = 40 $swstack = 20 $framesize = 30 Config Serialin = Buffered , Size = 120 Config Single = Scientific , Digits = 1 Enable Interrupts 'https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=2543&highlight=gettoken $lib "mcsbyteint.lib" $lib "GetToken.Lib" $external Gettoken Declare Function Gettoken(strinput As String , Byval Bseparator As Byte , Byval Bcount As Byte ) As String Dim Sep As Byte Dim Position As Byte Config Adc = Single , Prescaler = 32 , Reference = Aref 'internal=1,2v, aref =3.3V Start Adc Config Pind.2 = Output Cmd_vent Alias Portd.2 Reset Cmd_vent Config Pinb.5 = Output Sig_sim Alias Portb.5 Sig_sim = 0 Dim Data_key As Byte Dim Rdata As String * 100 Dim Guio_msg As String * 40 Dim Slm1 As String * 5 Dim Slm2 As String * 5 Dim Slm3 As String * 5 Dim Slm4 As String * 5 Dim Slm5 As String * 5 Dim Slm6 As String * 5 Dim Slmlg As String * 5 Dim Slmld As String * 5 Dim Slmgn As Byte Dim Slmdn As Byte Dim Light_s As String * 5 Dim Adcvg As Word Dim Adcvd As Word Dim Temp1 As Single Dim Temp2 As Single Dim Light As Byte Dim Flag_ini As Bit Dim Loggauche As Single Dim Logdroite As Single Dim Diviseurg As Single Dim Diviseurd As Single Diviseurg = 3.162 Diviseurd = 3.162 Reset Flag_ini Do If Ischarwaiting() = 1 Then 'Wait the message GUI-O @init ? Gosub Read_data End If If Flag_ini = 1 Then Exit Do End If Loop '=============================================================================== ' ' ********************************************************************** ' * Main routine, manage leds, circular bar, Graph,textes, values, * ' ********************************************************************** '+10db= 3,162v, 5db =1,778v, 0db=1v, -5db=0,562v, -10db=0,316v, -15db=0,178v, -20db=0,10v -40db=0,01 ' 988 555 312 175 98 55 40 3 ADC Value' '3,3v/1024= 0,0032 v par bit '------------------------Duration of this MAIN 60 Msec-------------------------- Main: Do Toggle Cmd_vent If Ischarwaiting() = 1 Then 'message GUI-O ? Gosub Read_data End If Adcvg = Getadc(0) 'get ADC value from ch.0 Temp1 = Adcvg * 0.003222 'Get the volt value Temp1 = Temp1 / Diviseurg 'diviser la valeur en volt par la position du potentiometre gauche Loggauche = Log10(temp1) 'transformer cette valeur en dbv Loggauche = Loggauche * 20 Print "@slout_g VAL:" ; Loggauche ; " '// Print "@ch0 PLI:'pl0' PLC:'#000000' YP:" ; Loggauche ; " '// Print "@ch0 PLI:'pl0,pl1' PLC:'#000000,#00BE00' YP:'" ; Loggauche ; "," ; Logdroite ; "'," ; "XP:'0,0,0,0'" ' waitms 300 Adcvd = Getadc(1) 'get ADC value from ch.1 Temp2 = Adcvd * 0.003222 'Get the volt value Temp2 = Temp2 / Diviseurd 'diviser la valeur en volt par la position du potentiometre gauche Logdroite = Log10(temp2) 'transformer cette valeur en dbv Logdroite = Logdroite * 20 ' Aff1 = Str(logdroite , 1) Print "@slout_d VAL:" ; Logdroite ; " Print "@ch0 PLI:'pl0,pl1' PLC:'#000000,#00BE00' YP:'" ; Loggauche ; "," ; Logdroite ; "'," ; "XP:'0,0,0,0'" ' Waitms 300 Loop '=============================================================================== ' ' ***************************** ' * Lecture des messages GUI-O* ' ***************************** '--MS-GUI-O----------------Durée de la fonction 60 msec ----------------------- Read_data: ' retourne tout ce qui est après @ xxxxxxxxxxxxxxxxxx Data_key = Inkey() '------------------------------------------------------------------------------- Select Case Data_key Case "@": 'message GUI-O ? Set Sig_sim 'Just for debbuging Input Rdata Noecho Sep = &H20 '= espace Position = 1 Guio_msg = Gettoken(rdata , Sep , Position) 'placer dans Guio_msg la commande reçue '------------------------------ Gestion des objets Météo ----------------------- Select Case Guio_msg Case "slm1": 'Potentiometre CH-1 Gauche Slm1 = Mid(rdata , 6 , 4) Print "@slm1V TXT:" ; Slm1 ; " " 'affichage numerique de la valeur du Potentiometre gauche Case "slm2" : 'Potentiometre Ch -1 Droite Slm2 = Mid(rdata , 6 , 4) Print "@slm2V TXT:" ; Slm2 ; " " 'Affichage Numerique De La Valeur Du Potentiometre droite Case "slm3": 'Potentiometre CH-2 Gauche Slm3 = Mid(rdata , 6 , 4) Print "@slm3V TXT:" ; Slm3 ; " " 'affichage numerique de la valeur du Potentiometre gauche Case "slm4" : 'Potentiometre Ch -2 Droite Slm4 = Mid(rdata , 6 , 4) Print "@slm4V TXT:" ; Slm4 ; " " 'Affichage Numerique De La Valeur Du Potentiometre droite Case "slm5": 'Potentiometre CH-3 Gauche Slm5 = Mid(rdata , 6 , 4) Print "@slm5V TXT:" ; Slm5 ; " " 'affichage numerique de la valeur du Potentiometre gauche Case "slm6" : 'Potentiometre Ch -3 Droite Slm6 = Mid(rdata , 6 , 4) Print "@slm6V TXT:" ; Slm6 ; " " 'Affichage Numerique De La Valeur Du Potentiometre droite Case "slml" : 'Potentiometre de sortie Gauche Slmlg = Mid(rdata , 6 , 4) 'lire la valeur du potentiometre gauche Slmgn = Val(slmlg) 'transformer en numerique Diviseurg = Lookup(slmgn , Table ) Case "slmd" : 'Potentiometre de sortie Droite Slmld = Mid(rdata , 6 , 4) 'lire la valeur du potentiometre droite Slmdn = Val(slmld) 'transformer en numerique Diviseurd = Lookup(slmdn , Table) 'chercher le diviseur dans la table Case "bton" 'reglage brillance ecran Light = Light + 10 If Light = 110 Then Light = 10 End If Light_s = Str(light) Print "@brs0 BRI:" ; Light_s ; " " Case "bt_fm": 'prendre une foto instantanée de la page meteo Print "@caps" Case "init": Gosub Guio_ini Set Flag_ini Case Else : Guio_msg = " " Clear Serialin End Select Case Else : Guio_msg = " " Clear Serialin Reset Sig_sim End Select Return '=============================================================================== ' ' ***************************** ' * Init sequence GUI-O* ' ***************************** ' ''--MS-GUI-O----------------==================================================== Guio_ini: Print "@sls 500" Print "@cls" Print "@clh" Print "@gse COD:0 TSC:39" 'Utiliser à la place de (chr(34) Print "@guis BGC:#2E2E2F ASR:0.4615" Print "|SORI UID:sori1 HID:sori ORI:2 SEN:0" Print "|LB UID:slm1V X:15 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0'" 'valeur au dessus de ch-1 g Print "|LB UID:slm2V X:25 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0'" 'valeur au dessus de ch-1 d Print "|LB UID:slm3V X:35 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0'" 'valeur au dessus de ch-2 g Print "|LB UID:slm4V X:45 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0'" 'valeur au dessus de ch-2 d Print "|LB UID:slm5V X:55 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0'" 'valeur au dessus de ch-3 g Print "|LB UID:slm6V X:65 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0'" 'valeur au dessus de ch-3 d Print "|LB UID:valadc X:95 Y:96 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0000'" 'valeur au dessous des leds en bas à droite (ADC ) Waitms 100 Print "|BSL UID:bslx11 X:11 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx12 X:11 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx13 X:11 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx14 X:11 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx15 X:11 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx16 X:11 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx17 X:11 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|SL UID:slm1 X:15 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000E530A VIS:1 ROT:270 BGC:#000000 SFGC:#822D0A FGC:#4EB50A SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 " Print "|LB UID:lb1 X:15 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-1'" Waitms 100 Print "|BSL UID:bslx21 X:21 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx22 X:21 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx23 X:21 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx24 X:21 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx25 X:21 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx26 X:21 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx27 X:21 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|SL UID:slm2 X:25 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 " Print "|LB UID:lb2 X:25 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-1'" Waitms 100 Print "|BSL UID:bslx31 X:31 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx32 X:31 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx33 X:31 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx34 X:31 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx35 X:31 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx36 X:31 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx37 X:31 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|SL UID:slm3 X:35 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 " Print "|LB UID:lb3 X:35 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-2'" Waitms 100 Print "|BSL UID:bslx41 X:41 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx42 X:41 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx43 X:41 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx44 X:41 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx45 X:41 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx46 X:41 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx47 X:41 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|SL UID:slm4 X:45 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 " Print "|LB UID:lb4 X:45 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-2'" Waitms 100 Print "|BSL UID:bslx51 X:51 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx52 X:51 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx53 X:51 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx54 X:51 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx55 X:51 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx56 X:51 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx57 X:51 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|SL UID:slm5 X:55 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 " Print "|LB UID:lb5 X:55 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-3'" Waitms 100 Print "|BSL UID:bslx61 X:61 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx62 X:61 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF" Print "|BSL UID:bslx63 X:61 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx64 X:61 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx65 X:61 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx66 X:61 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|BSL UID:bslx67 X:61 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000" Print "|SL UID:slm6 X:65 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 " Print "|LB UID:lb6 X:65 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-3'" Waitms 100 ' Gradation pot. input Gauche Print "|LB UID:lbc1 X:8 Y:30 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+10'" Print "|LB UID:lbc2 X:8 Y:40 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+5' " Print "|LB UID:lbc3 X:8 Y:50 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'0'" Print "|LB UID:lbc4 X:8 Y:60 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-5'" Print "|LB UID:lbc5 X:8 Y:70 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-10'" Print "|LB UID:lbc6 X:8 Y:80 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-15'" Print "|LB UID:lbc7 X:8 Y:90 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-20'" Waitms 100 ' Gradation pot. input Droite Print "|LB UID:lbd1 X:72 Y:30 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+10'" Print "|LB UID:lbd2 X:72 Y:40 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+5' " Print "|LB UID:lbd3 X:72 Y:50 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'0'" Print "|LB UID:lbd4 X:72 Y:60 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-5'" Print "|LB UID:lbd5 X:72 Y:70 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-10'" Print "|LB UID:lbd6 X:72 Y:80 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-15'" Print "|LB UID:lbd7 X:72 Y:90 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-20'" Waitms 100 'potentiometre de sortie gauche et droite Print "|LB UID:lbm X:83.5 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'MASTER'" Print "|SL UID:slml X:80 Y:60 W:28 H:2 HAH:7 HAW:7 IP:'Bout_Vol_Out.png' HAR:0 HAC:#00772200 VIS:1 ROT:270 BGC:#000000 SFGC:#ffc04c FGC:#a93c3c SHE:0 VAL:20 LVAL:0 HVAL:30 UD:1 RAD:1 SHH:1 CE:1 " Print "|SL UID:slmd X:87 Y:60 W:28 H:2 HAH:7 HAW:7 IP:'Bout_Vol_Out.png' HAR:0 HAC:#00772200 VIS:1 ROT:270 BGC:#000000 SFGC:#ffc04c FGC:#a93c3c SHE:0 VAL:20 LVAL:0 HVAL:30 UD:1 RAD:1 SHH:1 CE:1 " Waitms 100 'indicateur de sortie gauche et droite Print "|SL UID:slout_g X:92 Y:60 W:28 H:3 ROT:270 BGC:#000000 FGC:#4EB50A SFGC:#FF0000 HAW:6 HAH:6 HAR:5 HAC:#000E530A SHE:0 SHH:0 IP:" " VAL:0.0 LVAL:-20.0 HVAL:+10.0 XTC:6 LT:0.2 ACT:0 CE:1 UD:0 VIS:1 " Print "|SL UID:slout_d X:98 Y:60 W:28 H:3 ROT:270 BGC:#000000 FGC:#4EB50A SFGC:#FF0000 HAW:6 HAH:6 HAR:5 HAC:#000A530A SHE:0 SHH:0 IP:" " VAL:0.0 LVAL:-20.0 HVAL:+10.0 XTC:6 LT:0.2 ACT:0 CE:1 UD:0 VIS:1 " Waitms 100 ' Gradation leds de sortie Print "|LB UID:lb11 X:95 Y:90 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-20db'" Print "|LB UID:lb12 X:95 Y:80 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-15db'" Print "|LB UID:lb13 X:95 Y:70 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-10db'" Print "|LB UID:lb14 X:95 Y:60 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-5db'" Print "|LB UID:lb15 X:95 Y:50 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-0db'" Print "|LB UID:lb16 X:95 Y:40 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'+5db'" Print "|LB UID:lb17 X:95 Y:30 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'over'" Waitms 100 Print "|BSE UID:bseon X:5 Y:12 W:5.5 HIW:1 SHE:0 ROT:0 BTH:0.2 BGC:#a1a1a1 FGC:#a1a1a1" Print "|BT UID:bton X:5 Y:12 W:4 H:9 SHE:1 ROT:0 RAD:3 BGC:#7a7a7a SBGC:#d9d9d9 FGC:#FFFFFF FSZ:4 BTH:0 TXT:" " SVAL:'on '" Print "|BSA UID:bsao1 X:5 Y:12 W:1.1 SHE:0 ROT:0 BTH:0.3 BGC:#000000 STA:-245 ENA:65" Print "|BSL UID:bslo1 X:5 Y:12 ROT:90 FGC:#000000 LEN:1.5 BTH:0.3" Waitms 100 'vumetre de gauche et droite Print "|CB UID:Vu_g X:75 Y:16 W:10 BGC:#FF0000 FGC:00FF00 SFGC:#FF0000 HAW:1 HAH:0 HAR:0 HAC:#8ED3D3D2 SHE:0 SHHR:0 SHVR:0 SHR:0 VAL:0 LVAL:-20 HVAL:10 BTH:0.5 TXTC:#FFFFF XTC:6 YTC:0 SHN:1 NT:0.2 UD:0 ACT:0 SHT:0 VIS:0 " Print "|CB UID:Vu_d X:90 Y:16 W:10 BGC:#FF0000 FGC:00FF00 SFGC:#FF0000 HAW:1 HAH:0 HAR:0 HAC:#8ED3D3D2 SHE:0 SHHR:0 SHVR:0 SHR:0 VAL:0 LVAL:-20 HVAL:10 BTH:0.5 TXTC:#FFFFF XTC:6 YTC:0 SHN:1 NT:0.2 UD:0 ACT:0 SHT:0 VIS:0 " Waitms 100 Print "|CH UID:ch0 X:85 Y:14 W:25 BSZ:100 CHT:2 XTC:8 YTC:30 XMA:1 YMA:1 LT:0.15 DRA:0 DRAT:0 VLP:1 " '//Print "|KNO UID:kno1 X:95 Y:87 W:7 VIS:1 ROT:0 SHE:1 STR:10 STS:1.5" 'bouton en bas à droite Print "|BRS UID:brs0 HID:brs BRI:100" '//Print "|BT UID:bt_fm X:83 Y:30 W:10 H:10 OPA:0.01 VIS:1 SCI:0 " 'bouton cach� pour prendre une foto de l'affichage Print "@hls 200" Return End Table: Data 31.620! '-20 db =0,1 v,facteur de division de l'ADC en fonction de la position des potentiometre de sortie Data 28.232! '-19 db =0,112 v Data 25.095! Data 22.426! Data 20.013! Data 17.764! Data 15.810! Data 14.116! Data 12.598! Data 11.213! Data 10.006! Data 8.907! Data 7.945! Data 7.074! Data 6.311! Data 5.626! Data 5.011! Data 4.498! Data 3.982! Data 3.549! Data 3.162! Data 2.818! Data 2.512! Data 2.238! Data 1.995! Data 1.778! Data 1.585! Data 1.412! Data 1.259! Data 1.122! Data 1.000! '+ 10 Db = 3 , 162 V
-
@kl3m3n
Log of the transmission between Arduino and GUI.O with ESP8266.
Works perfectly with bluetooth!!
Bernard
Transmission GUI-O.pdf -
Check the communication lines. Be careful not to connect the RX and TX pins of the ESP8266 together with the Rx and Tx pins of the Bluetooth module.
I generally use ESP826612F in SMD or Wemos D1 mini version. Sometimes it happened that some information was missing in a very long text. I solve this problem by separating the sent text in two messages on ESP.It may also happen that the ESP does not work properly and needs to be replaced with another one.
-
@gammda
@kl3m3n
Hello everyone,
Thanks to Gammda who took the time to answer me and advise me regarding the serial reception routine on interruption rather than Ischarwaiting. It works perfectly well (see attached source code).
Regarding the erratic operation of ESP8266, you must never forget to remove the "Debug" option in config.h. before definitively programming ESP8266. This requires a lot of resources from ESP8266, which explains the "eratic" operation of GUI-O!! (but what misled me was that with Bluetooth transmission everything worked normally) If my luck can be useful, that's good!!
Kind regards, Bernard
'===============================================================================
' HW: Arduino Nano ATMEGA 328 , programmed whit BASCOM
' GUI-O Table mixage // EXPERIMENTATION !!
' GUI-O Ver 1.0.78
'==============================================================================='$sim
$regfile = "m328pdef.dat"
$crystal = 16000000
$baud = 38400
$hwstack = 50
$swstack = 50
$framesize = 50On Urxc Rxcom1_isr
Enable Urxc
Dim Rxguio As String * 40
Dim Rxdata As Bit
Dim Comchar1 As Byte'$lib "mcsbyteint.lib"
Config Adc = Single , Prescaler = 32 , Reference = Aref 'internal=1,2v, aref =3.3V
Start AdcConfig Pind.2 = Output
Cmd_vent Alias Portd.2
Reset Cmd_ventConfig Pinb.5 = Output
Sig_sim Alias Portb.5
Sig_sim = 0Config Single = Scientific , Digits = 1
Dim Slmv As String * 5
Dim Slmlg As String * 5
Dim Slmld As String * 5
Dim Slmgn As Byte
Dim Slmdn As Byte
Dim Light_s As String * 5
Dim Adcvg As Word
Dim Adcvd As Word
Dim Temp1 As Single
Dim Temp2 As Single
Dim Light As Byte
Dim Loggauche As Single
Dim Logdroite As Single
Dim Diviseurg As Single
Dim Diviseurd As Single
Dim Cmd As String * 20
Diviseurg = 3.162
Diviseurd = 3.162Enable Interrupts
Declare Sub Read_data()'===============================================================================
'
' **********************************************************************
' * Main routine, manage leds, circular bar, Graph,textes, values, *
' **********************************************************************
'+10db= 3,162v, 5db =1,778v, 0db=1v, -5db=0,562v, -10db=0,316v, -15db=0,178v, -20db=0,10v -40db=0,01
' 988 555 312 175 98 55 40 3 ADC Value'
'3,3v/1024= 0,0032 v par bit
'------------------------Duration of this MAIN 60 Msec--------------------------
Main:
DoIf Rxdata = 1 Then Reset Rxdata Gosub Read_data Rxguio = "" End If Adcvg = Getadc(0) 'get ADC value from ch.0 Temp1 = Adcvg * 0.003222 'Get the volt value Temp1 = Temp1 / Diviseurg 'diviser la valeur en volt par la position du potentiometre gauche Loggauche = Log10(temp1) 'transformer cette valeur en dbv Loggauche = Loggauche * 20 Print "@slout_g VAL:" ; Loggauche ; " Print "@ch0 PLI:'pl0' PLC:'#000000' YP:" ; Loggauche ; "
'// Print "@ch0 PLI:'pl0,pl1' PLC:'#000000,#00BE00' YP:'" ; Loggauche ; "," ; Logdroite ; "'," ; "XP:'0,0,0,0'"
Adcvd = Getadc(1) 'get ADC value from ch.1 Temp2 = Adcvd * 0.003222 'Get the volt value Temp2 = Temp2 / Diviseurd 'diviser la valeur en volt par la position du potentiometre gauche Logdroite = Log10(temp2) 'transformer cette valeur en dbv Logdroite = Logdroite * 20 Print "@slout_d VAL:" ; Logdroite ; " Print "@ch0 PLI:'pl1' PLC:'#00BE00' YP:" ; Logdroite ; "
' Print "@ch0 PLI:'pl0,pl1' PLC:'#000000,#00BE00' YP:'" ; Loggauche ; "," ; Logdroite ; "'," ; "XP:'0,0,0,0'"
Loop
'===============================================================================
'
' *****************************
' * Lecture des messages GUI-O*
' *****************************'--MS-GUI-O---------------------------------------------------------------------
Sub Read_data()
Cmd = Mid(rxguio , 1 , 1) If Cmd <> "@" Then Exit Sub End If Cmd = Mid(rxguio , 2 , 4) 'select command value If Cmd = "init" Then Gosub Guio_ini Exit Sub End If Slmv = Mid(rxguio , 6 , 4) 'get value of Slmv (can be -20 to +10 Temp1 = Val(slmv) 'convert in single If Cmd = "slm1" Then 'slider CH1 Left Print "@slm1V TXT:" ; Temp1 ; "" 'print the value above the slider Exit Sub End If If Cmd = "slm2" Then 'slider CH1 Right Print "@slm2V TXT:" ; Temp1 ; " Exit Sub End If If Cmd = "slm3" Then 'slider CH2 Left Print "@slm3V TXT:" ; Temp1 ; " Exit Sub End If If Cmd = "slm4" Then 'slider CH2 Right Print "@slm4V TXT:" ; Temp1 ; " Exit Sub End If If Cmd = "slm5" Then 'slider CH3 Left Print "@slm5V TXT:" ; Temp1 ; " Exit Sub End If If Cmd = "slm6" Then 'slider CH3 Right Print "@slm6V TXT:" ; Temp1 ; " Exit Sub End If If Cmd = "slml" Then 'Potentiometre de sortie Gauche Slmlg = Mid(rxguio , 6 , 3) 'lire la valeur du potentiometre gauche Slmgn = Val(slmlg) 'transformer en numerique Diviseurg = Lookup(slmgn , Table ) Exit Sub End If
'(
Adcvg = Getadc(0) 'get ADC value from ch.0
Temp1 = Adcvg * 0.003222 'Get the volt value
Temp1 = Temp1 / Diviseurg 'diviser la valeur en volt par la position du potentiometre gauche
Loggauche = Log10(temp1) 'transformer cette valeur en dbv
Loggauche = Loggauche * 20
Print "@slout_g VAL:" ; Loggauche ; "
Print "@ch0 PLI:'pl1' PLC:'#00BE00' YP:" ; Loggauche ; " XP:0"
' Print "@valadc TXT:" ; Adcvg ; "
Exit Sub
')If Cmd = "slmd" Then 'Potentiometre de sortie Droite Slmld = Mid(rxguio , 6 , 3) 'lire la valeur du potentiometre droite Slmdn = Val(slmld) 'transformer en numerique Diviseurd = Lookup(slmdn , Table) 'chercher le diviseur dans la table Exit Sub End If
'(
Adcvd = Getadc(1) 'get ADC value from ch.1
Temp2 = Adcvd * 0.003222 'Get the volt value
Temp2 = Temp2 / Diviseurd 'diviser la valeur en volt par la position du potentiometre gauche
Logdroite = Log10(temp2) 'transformer cette valeur en dbv
Logdroite = Logdroite * 20
Print "@slout_d VAL:" ; Logdroite ; "
' Print "@ch0 PLI:'pl0,pl1' PLC:'#000000,#00BE00' YP:'" ; Loggauche ; "," ; Logdroite ; "'," ; "XP:'0,0'"
Print "@ch0 PLI:'pl0' PLC:'#000000' YP:" ; Logdroite ; " XP:0"
Exit Sub
')If Cmd = "bton" Then 'reglage brillance ecran Light = Light + 10 If Light = 110 Then Light = 10 End If Light_s = Str(light) Print "@brs0 BRI:" ; Light_s ; " " Exit Sub End If If Cmd = "btfm" Then 'prendre une foto instantanée de la page meteo Print "@caps" Exit Sub End If
End Sub
'===============================================================================Rxcom1_isr:
Comchar1 = Inkey()
Rxguio = Rxguio + Chr(comchar1)
If Comchar1 = 10 Then ' !!!! USE 13(CR) FOR SIMULATEUR !!!!
Set Rxdata
End If
Return'===============================================================================
'
' *****************************
' * Init sequence GUI-O*
' *****************************
'
''--MS-GUI-O----------------====================================================
Guio_ini:
Disable Interrupts
Print "@sls 500"
Print "@cls"
Print "@clh"
Print "@gse COD:0 TSC:39" 'Utiliser à la place de (chr(34)
Print "@guis BGC:#2E2E2F ASR:0.4615"
Print "|SORI UID:sori1 HID:sori ORI:2 SEN:0"Print "|LB UID:slm1V X:15 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'000'" 'valeur au dessus de ch-1 g
Print "|LB UID:slm2V X:25 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'000'" 'valeur au dessus de ch-1 d
Print "|LB UID:slm3V X:35 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'000'" 'valeur au dessus de ch-2 g
Print "|LB UID:slm4V X:45 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'000'" 'valeur au dessus de ch-2 d
Print "|LB UID:slm5V X:55 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'000'" 'valeur au dessus de ch-3 g
Print "|LB UID:slm6V X:65 Y:15 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'000'" 'valeur au dessus de ch-3 d
Print "|LB UID:valadc X:95 Y:96 W:20 FGC:#fb0001 FSZ:5 FFA:'font8' TXT:'0000'" 'valeur au dessous des leds en bas à droite (ADC )
'Print "|LB UID:lb_Hneige X:20 Y:50 W:15 FGC:#00F7FF SHE:1 FSZ:5 FFA:'font2' TXT:'H.NEIGE'"
Waitms 100
Print "|BSL UID:bslx11 X:11 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx12 X:11 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx13 X:11 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx14 X:11 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx15 X:11 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx16 X:11 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx17 X:11 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|SL UID:slm1 X:15 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000E530A VIS:1 ROT:270 BGC:#000000 SFGC:#822D0A FGC:#4EB50A SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 "
Print "|LB UID:lb1 X:15 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-1'"
Waitms 100
Print "|BSL UID:bslx21 X:21 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx22 X:21 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx23 X:21 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx24 X:21 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx25 X:21 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx26 X:21 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx27 X:21 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|SL UID:slm2 X:25 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 "
Print "|LB UID:lb2 X:25 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-1'"
Waitms 100
Print "|BSL UID:bslx31 X:31 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx32 X:31 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx33 X:31 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx34 X:31 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx35 X:31 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx36 X:31 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx37 X:31 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|SL UID:slm3 X:35 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 "
Print "|LB UID:lb3 X:35 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-2'"
Waitms 100
Print "|BSL UID:bslx41 X:41 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx42 X:41 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx43 X:41 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx44 X:41 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx45 X:41 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx46 X:41 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx47 X:41 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|SL UID:slm4 X:45 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 "
Print "|LB UID:lb4 X:45 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-2'"
Waitms 100
Print "|BSL UID:bslx51 X:51 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx52 X:51 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx53 X:51 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx54 X:51 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx55 X:51 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx56 X:51 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx57 X:51 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|SL UID:slm5 X:55 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 "
Print "|LB UID:lb5 X:55 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-3'"
Waitms 100
Print "|BSL UID:bslx61 X:61 Y:30 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx62 X:61 Y:40 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#FFFFFF"
Print "|BSL UID:bslx63 X:61 Y:50 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx64 X:61 Y:60 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx65 X:61 Y:70 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx66 X:61 Y:80 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|BSL UID:bslx67 X:61 Y:90 SHE:0 ROT:0 LEN:8 BTH:0.1 FGC:#000000"
Print "|SL UID:slm6 X:65 Y:60 W:28 H:2 HAH:6 HAW:6 IP:'Bout_Vol_In.png' HAR:0 HAC:#000e530a VIS:1 ROT:270 BGC:#000000 SFGC:#822d0a FGC:#4eb50a SHE:0 VAL:0 LVAL:-20 HVAL:+10 UD:1 RAD:1 SHH:1 CE:1 "
Print "|LB UID:lb6 X:65 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'CH-3'"
Waitms 100 ' Gradation pot. input Gauche
Print "|LB UID:lbc1 X:8 Y:30 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+10'"
Print "|LB UID:lbc2 X:8 Y:40 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+5' "
Print "|LB UID:lbc3 X:8 Y:50 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'0'"
Print "|LB UID:lbc4 X:8 Y:60 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-5'"
Print "|LB UID:lbc5 X:8 Y:70 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-10'"
Print "|LB UID:lbc6 X:8 Y:80 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-15'"
Print "|LB UID:lbc7 X:8 Y:90 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-20'"
Waitms 100 ' Gradation pot. input Droite
Print "|LB UID:lbd1 X:72 Y:30 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+10'"
Print "|LB UID:lbd2 X:72 Y:40 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'+5' "
Print "|LB UID:lbd3 X:72 Y:50 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'0'"
Print "|LB UID:lbd4 X:72 Y:60 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-5'"
Print "|LB UID:lbd5 X:72 Y:70 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-10'"
Print "|LB UID:lbd6 X:72 Y:80 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-15'"
Print "|LB UID:lbd7 X:72 Y:90 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'-20'"
Waitms 100
'potentiometre de sortie gauche et droite
Print "|LB UID:lbm X:83.5 Y:98 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3 FFA:'font8' TXT:'MASTER'"
Print "|SL UID:slml X:80 Y:60 W:28 H:2 HAH:7 HAW:7 IP:'Bout_Vol_Out.png' HAR:0 HAC:#00772200 VIS:1 ROT:270 BGC:#000000 SFGC:#ffc04c FGC:#a93c3c SHE:0 VAL:20 LVAL:0 HVAL:30 UD:1 RAD:1 SHH:1 CE:1 "
Print "|SL UID:slmd X:87 Y:60 W:28 H:2 HAH:7 HAW:7 IP:'Bout_Vol_Out.png' HAR:0 HAC:#00772200 VIS:1 ROT:270 BGC:#000000 SFGC:#ffc04c FGC:#a93c3c SHE:0 VAL:20 LVAL:0 HVAL:30 UD:1 RAD:1 SHH:1 CE:1 "
Waitms 100
'indicateur de sortie gauche et droite
Print "|SL UID:slout_g X:92 Y:60 W:28 H:3 ROT:270 BGC:#000000 FGC:#4EB50A SFGC:#FF0000 HAW:6 HAH:6 HAR:5 HAC:#000E530A SHE:0 SHH:0 IP:" " VAL:0.0 LVAL:-20.0 HVAL:+10.0 XTC:6 LT:0.2 ACT:0 CE:1 UD:0 VIS:1 "
Print "|SL UID:slout_d X:98 Y:60 W:28 H:3 ROT:270 BGC:#000000 FGC:#4EB50A SFGC:#FF0000 HAW:6 HAH:6 HAR:5 HAC:#000A530A SHE:0 SHH:0 IP:" " VAL:0.0 LVAL:-20.0 HVAL:+10.0 XTC:6 LT:0.2 ACT:0 CE:1 UD:0 VIS:1 "Waitms 100 ' Gradation leds de sortie
Print "|LB UID:lb11 X:95 Y:90 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-20db'"
Print "|LB UID:lb12 X:95 Y:80 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-15db'"
Print "|LB UID:lb13 X:95 Y:70 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-10db'"
Print "|LB UID:lb14 X:95 Y:60 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-5db'"
Print "|LB UID:lb15 X:95 Y:50 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'-0db'"
Print "|LB UID:lb16 X:95 Y:40 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'+5db'"
Print "|LB UID:lb17 X:95 Y:30 ROT:0 SHE:0 ALP:0 FGC:#FFFFFF FSZ:2.7 FFA:'font8' TXT:'over'"
Waitms 100
Print "|BSE UID:bseon X:5 Y:12 W:5.5 HIW:1 SHE:0 ROT:0 BTH:0.2 BGC:#a1a1a1 FGC:#a1a1a1"
Print "|BT UID:bton X:5 Y:12 W:4 H:9 SHE:1 ROT:0 RAD:3 BGC:#7a7a7a SBGC:#d9d9d9 FGC:#FFFFFF FSZ:4 BTH:0 TXT:" " SVAL:'on '"
Print "|BSA UID:bsao1 X:5 Y:12 W:1.1 SHE:0 ROT:0 BTH:0.3 BGC:#000000 STA:-245 ENA:65"
Print "|BSL UID:bslo1 X:5 Y:12 ROT:90 FGC:#000000 LEN:1.5 BTH:0.3"
Waitms 100 'vumetre de gauche et droite
Print "|CB UID:Vu_g X:75 Y:16 W:10 BGC:#FF0000 FGC:00FF00 SFGC:#FF0000 HAW:1 HAH:0 HAR:0 HAC:#8ED3D3D2 SHE:0 SHHR:0 SHVR:0 SHR:0 VAL:0 LVAL:-20 HVAL:10 BTH:0.5 TXTC:#FFFFF XTC:6 YTC:0 SHN:1 NT:0.2 UD:0 ACT:0 SHT:0 VIS:0 "
Print "|CB UID:Vu_d X:90 Y:16 W:10 BGC:#FF0000 FGC:00FF00 SFGC:#FF0000 HAW:1 HAH:0 HAR:0 HAC:#8ED3D3D2 SHE:0 SHHR:0 SHVR:0 SHR:0 VAL:0 LVAL:-20 HVAL:10 BTH:0.5 TXTC:#FFFFF XTC:6 YTC:0 SHN:1 NT:0.2 UD:0 ACT:0 SHT:0 VIS:0 "
Waitms 100
Print "|CH UID:ch0 X:85 Y:14 W:25 BSZ:100 CHT:2 XTC:8 YTC:30 XMA:1 YMA:1 LT:0.15 DRA:0 DRAT:0 YASC:1 XASC:0 VLP:1 "
'//Print "|KNO UID:kno1 X:95 Y:87 W:7 VIS:1 ROT:0 SHE:1 STR:10 STS:1.5" 'bouton en bas à droite
Print "|BRS UID:brs0 HID:brs BRI:100"
'//Print "|BT UID:btfm X:83 Y:30 W:10 H:10 OPA:0.01 VIS:1 SCI:0 " 'bouton cach� pour prendre une foto de l'affichage
Print "@hls 200"
Enable Interrupts
ReturnEnd
Table:
Data 31.620! '-20 db =0,1 v,facteur de division de l'ADC en fonction de la position des potentiometre de sortie
Data 28.232! '-19 db =0,112 v
Data 25.095!
Data 22.426!
Data 20.013!
Data 17.764!
Data 15.810!
Data 14.116!
Data 12.598!
Data 11.213!
Data 10.006!
Data 8.907!
Data 7.945!
Data 7.074!
Data 6.311!
Data 5.626!
Data 5.011!
Data 4.498!
Data 3.982!
Data 3.549!
Data 3.162!
Data 2.818!
Data 2.512!
Data 2.238!
Data 1.995!
Data 1.778!
Data 1.585!
Data 1.412!
Data 1.259!
Data 1.122!
Data 1.000! -