Also wenn du es GANZ GÜNSTIG haben willst musst du nur ne
IR-Fernbedienung nehmen und dann so was in deinen Code einbauen:
Dieses Programm würde dir z.B. an nem Display anzeigen, welche taste du gedrückt hast.Code:============================================= ' Infrartot - Fernbedinung - LCD Adress and Comand '============================================= $regfile = "m8def.dat" $crystal = 8000000 Config Pinb.0 = Input Config Rc5 = Pinb.0 'Einfach ne Fotodiode zwischen Masse und PinB.0 Portb.0 = 1 'Pullup aktivieren Enable Interrupts Dim Address As Byte , Command As Byte , Dispon As Bit Initlcd Cls Initlcd Cls Home Upper Lcd "Waiting for RC5" Dispon = 1 Do Getrc5(address , Command) Home Lower Lcd "---No Command---" If Address <> 255 Then 'clear the toggle bit 'the toggle bit toggles on each new received command 'toggle bit is bit 7. Extended RC5 bit is in bit 6 Command = Command And &B01111111 Home Lower Lcd "-- " ; Address ; " -- " ; Command ; " --" If Command = 12 Then Dispon = Not Dispon If Dispon = 1 Then Display On Else Display Off End If End If Wait 1 End If Waitms 10 Loop End
Kannst nun einfach ne Fernbedienung von nem DVD Player u.A. nehmen, weil da schon schön Pfeiltasten sind und FERTIG!







Zitieren

Lesezeichen