Witam zacząłem właśnie zabawę z Bascomem , nie wiem jak zrobić aby odebranie poprawnego kodu było sygnalizowane krótkim piknięciem , piszczy mi ciągle .
Proszę poprawić tytuł - regulamin p.11.1
[zumek]
Dodano po 3 [godziny] 23 [minuty]:
zrobiłem coś takiego i działa :
Dodano po 19 [minuty]:
Nie wiem dlaczego Bascom wywala mi błąd jak wpiszę End if ?
Bez tego jest ok ale nie mogę zrobić warunku Else ?
Nie wiem o co chodzi ?
$regfile = "attiny2313.dat"
$crystal = 8000000
Config Portd.4 = Output
Config Portd.5 = Output
Portd.4 = 0
Portd.5 = 0
Wy Alias Portd.4
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , E = Portb.3 , Rs = Portb.2
Config Rc5 = Pind.2
Dim Address As Byte , Command As Byte
Enable Interrupts
Do
Getrc5(address , Command)
Command = Command And &B01111111
If Command = 1 Then Wy = 1 :
If Command = 1 Then Sound Portd.6 , 100 , 100 :
If Command = 2 Then Wy = 0 :
If Command = 2 Then Sound Portd.6 , 500 , 100 :
Cls
Lcd "Adres:" ; Address
Lowerline
Lcd "Komenda:" ; Command
Waitms 100
Loop
Proszę poprawić tytuł - regulamin p.11.1
[zumek]
Dodano po 3 [godziny] 23 [minuty]:
zrobiłem coś takiego i działa :
Do
Getrc5(address , Command)
Command = Command And &B01111111
If Command = 1 Then Wy = 1 :
If Command = 2 Then Wy = 0 :
If Command = 1 Then Gosub Dzwiek :
If Command = 2 Then Gosub Dzwiek1 :
Cls
Lcd "Adres:" ; Address
Lowerline
Lcd "Komenda:" ; Command
Waitms 100
Loop
Dzwiek:
Sound Buzer , 3 , 100
Waitms 5
Buzer = 1
Return
Dzwiek1:
Sound Buzer , 3 , 700
Waitms 15
Buzer = 1
Return
Dodano po 19 [minuty]:
Nie wiem dlaczego Bascom wywala mi błąd jak wpiszę End if ?
Bez tego jest ok ale nie mogę zrobić warunku Else ?
Do
Getrc5(address , Command)
Command = Command And &B01111111
If Command = 1 Then Wy = 1 :
End If
If Command = 2 Then Wy = 0 :
End If
If Command = 1 Then Gosub Dzwiek :
End If
If Command = 2 Then Gosub Dzwiek1 :
Else Then Gosub Dzwiek2 :
End If
Nie wiem o co chodzi ?