Audio Mixer Question
-
Re : GUI-O Audio MIXER
Hello Gammda,
I'm talking to you because I see that you are the only one on this forum to use BASCOM.
I took over your audio mixer project published on March 16, 2022. I modified it somewhat by removing the -60db to over LEDs and replaced by two sliders to display the values of the two ADC converters (ch0-ch1). Everything works correctly [TableMixage.bas](Type de fichier non valide. Les types autorisés sont : .png, .jpg, .bmp, .txt, .pdf, .jpeg) if in the main routine, I do not activate lines 86 to 96. (reading and display on the 2 output sliders). If I activate these lines, the Ischarwaiting() = 1 function no longer works!!
Do you have any idea of the problem?
Kind regards, Bernard ```
code_text
`'===============================================================================
'' HW: Arduino Nano ATMEGA 328
' GUI-O Datalogger
' GUI-O Ver 1.0.78
'==============================================================================='$sim
$regfile = "m328pdef.dat"
$crystal = 16000000
$baud = 19200 '38400
$hwstack = 128
$swstack = 128
$framesize = 128Config Serialin = Buffered , Size = 50
Enable Interrupts
'https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=2543&highlight=gettoken
$lib "GetToken.Lib"
$external Gettoken
Declare Function Gettoken(strinput As String , Byval Bseparator As Byte , Byval Bcount As Byte ) As StringDim Sep As Byte
Dim Position As ByteConfig Adc = Single , Prescaler = Auto , Reference = Aref 'internal=1,2v, aref =3.3V
Start AdcConfig 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 Light_s As String * 5
Dim Adcvg As Word
Dim Adcvd As Word
Dim Val_vug As Single
Dim Temp1 As Single
Dim Val_vud As Single
Dim Temp2 As Single
Dim Db_outg As Byte 'Single
Dim Db_outd As Byte 'Single
Dim Light As Byte
Dim Flag_ini As Bit
Reset Flag_iniDb_outd = 0
'Gosub Set_led_g
Db_outg = 0
'Gosub Set_led_dDo
If Ischarwaiting() = 1 Then 'message GUI-O ?
Gosub Read_data
End IfIf 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,13v
' 988 555 312 175 98 55 40 ADC Value'
'3,3v/1024= 0,0032 v par bit
'--MS-GUI-O---------------------------------------------------------------------
Main:
DoIf Ischarwaiting() = 1 Then 'message GUI-O ?
Gosub Read_data
End If
'********* If y use this, Ischarwaiting() do not run !! ***********************
'(
While Sig_sim = 0
Adcvg = Getadc(0) 'get ADC value from ch.0
Temp1 = Adcvg * 0.0032 'Get the volt value
Print "@slout_g VAL:" ; Temp1 ; " " 'print on Slider'Print "@valadc TXT:" ; Temp1 ; " Adcvd = Getadc(1) 'get ADC value from ch.1 Temp2 = Adcvd * 0.0032 'Get the volt value Print "@slout_d VAL:" ; Temp2 ; "" 'print on Slider
Wend
')
'******************************************************************************
Waitms 50
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 'activer la led sur Arduino Nano
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_msgCase "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 Print "@Vu_g VAL:" ; Slmlg ; "" 'afficher sur le vu metre circulaire gauche Case "slmd": 'Potentiometre de sortie Droite Slmld = Mid(rdata , 6 , 4) 'lire la valeur du potentiometre droite Print "@Vu_d VAL:" ; Slmld ; "" 'afficher sur le vu metre circulaire droite 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� 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
End Select
Guio_msg = " "
Clear Serialin
Reset Sig_sim
Return'===============================================================================
'
'
'
'
'===============================================================================
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 )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:'+5db' "
Print "|LB UID:lbc3 X:8 Y:50 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'0db'"
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:'+5db' "
Print "|LB UID:lbd3 X:72 Y:50 ROT:0 SHE:1 FGC:#FFFFFF ALP:0 FSZ:3.5 FFA:'font8' TXT:'0db'"
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'"
'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:0 LVAL:-20 HVAL:+10 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:0 LVAL:-20 HVAL:+10 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 LVAL:0.1 HVAL:4 XTC:6 LT:0.2 ACT:0 CE:1 UD:1 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 LVAL:0.1 HVAL:4 XTC:6 LT:0.2 ACT:0 CE:1 UD:1 VIS:1 "
'( ' Leds de sortie Gauche
Print "|SI UID:si1 X:98 Y:90 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#009900 SHE:0 EN:1 OPA:0.2" '72
Print "|SI UID:si2 X:98 Y:80 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#009900 SHE:0 EN:1 OPA:0.2" '65
Print "|SI UID:si3 X:98 Y:70 W:1.5 VIS:1 ROT:0 BGC:#b0c4de FGC:#009900 SHE:0 EN:1 OPA:0.2" '58
Print "|SI UID:si4 X:98 Y:60 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#009900 SHE:0 EN:1 OPA:0.2" '51
Print "|SI UID:si5 X:98 Y:50 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#FFC300 SHE:0 EN:1 OPA:0.2" '44
Print "|SI UID:si6 X:98 Y:40 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#FFC300 SHE:0 EN:1 OPA:0.2" '37
Print "|SI UID:si7 X:98 Y:30 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#990000 SHE:0 EN:1 OPA:0.2"
Waitms 100 ' Leds de sortie Droite
Print "|SI UID:sj1 X:92 Y:90 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#009900 SHE:0 EN:1 OPA:0.2"
Print "|SI UID:sj2 X:92 Y:80 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#009900 SHE:0 EN:1 OPA:0.2"
Print "|SI UID:sj3 X:92 Y:70 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#009900 SHE:0 EN:1 OPA:0.2"
Print "|SI UID:sj4 X:92 Y:60 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#009900 SHE:0 EN:1 OPA:0.2"
Print "|SI UID:sj5 X:92 Y:50 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#FFC300 SHE:0 EN:1 OPA:0.2"
Print "|SI UID:sj6 X:92 Y:40 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#FFC300 SHE:0 EN:1 OPA:0.2"
Print "|SI UID:sj7 X:92 Y:30 W:1.5 VIS:1 ROT:0 BGC:#B0C4DE FGC:#990000 SHE:0 EN:1 OPA:0.2"
')
'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:1 ACT:0 SHT:1 "
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:1 ACT:0 SHT:1 "
Waitms 100
'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`` -
It is possible that you are using a While - Wend loop that never ends because the Sig_Sim parameter is always "0".
Check your code and change the Sig_sim variable to 1 at some point during runtime.Maybe you should try changing the While - Wend with an IF - ENDIF statement.
Alternatively, maybe modify Ischarwaiting() with serial interrupts something like this:
On Urxc Rxcom1_isr
Enable Urxc
Dim Rxdata1$ As String * 80
Dim Rxdata As BitDim Comchar1 As Byte
Enable Interrupts
DoIf Rxdata = 1 Then
Reset Rxdata1
Print Rxdata1$ 'do something with your received data
End If
LoopRxcom1_isr:
Comchar1 = Inkey()
Rxdata1$ = Rxdata1$ + Chr(comchar1)
If Comchar1 = 13 Then ' detect end of line can be 10 or any other char.
Set Rxdata
End If
Return, but it will completely change the concept of your code.