
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
Hallo ich habe an meiner Station drei Rollos angeschlossen zwei an die internen Relais und eins an die externen. Das habe ich mit den Beispielen hinbekommen. Jetzt möchte einen Dämmerungsensor (Fotodiode) an einen AD-Port anschließen, das kleine Testprogramm hat auch funktioniert aber in meinem laufendem Programm haut es anscheinend nicht mit den Ports hin. Hat jemand eine Liste welcher Port zu welcher Klemme gehört an meiner Station Auszug aus meinem Programm: ' '----ACHTUNG-ACHTUNG BEIM SCHLAFZIMMER IST OFF UND ON VERTAUSCHT------- '----------------------------------------------------------------------- '-------------------------- '------ I/O PORTS --------- '-------------------------- define ADC8 ad[8] define LIGHT port[16] 'werden fr die Relais. und LED ben�igt define SDA as port[9] define SCL as port[10] '-------------------------- '---- SYSTEM MEMORY ------- '-------------------------- define EXTPORT as byteport[4] define POTI ad[1] define b byte[11] '-----erste Teil des Dämmerungschalters----- define LED1 as port[25] define LED2 as port[26] define LED3 as port[27] define LED4 as port[28] define NIKLASHOCH as port[29] 'REL1 define ANNIKAHOCH as port[30]'REL2 30 define SCHLAFHOCH port[1] ' DIG:REL OBEN1 define NIKLASRUNTER as port[31] 'REL3 31 define ANNIKARUNTER as port[32]'REL4 32 define SCHLAFRUNTER port[2] 'DIG:REL UNTEN 2 import "C:\Programm\CCB\basicpp\LIB\GET_KEY.BAS" import "C:\Programm\CCB\basicpp\LIB\GET_VALUE.BAS" 'damit wird der Bildschirm und anderes Inizialisiert '(nur zum Anfang erforderlich) #INIT LCD.INIT SDA=on SCL=on EXTPORT=OFF 'jetzt werden alle LED und Relais ausgeschaltet damit 'kein Rolladenmotor durchbrennt und nichts falsches angezeigt wird. NIKLASHOCH=OFF SCHLAFHOCH=ON ANNIKAHOCH=OFF NIKLASRUNTER=OFF SCHLAFRUNTER=ON ANNIKARUNTER=OFF LED1=OFF LED2=OFF LED3=OFF LED4=OFF LCD.POS 1,1 LCD.PRINT " " LCD.POS 2,1 LCD.PRINT " " PAUSE 15 #SCHLEIFE define INVALUE as word b=POTI LCD.INIT LCD.POS 1,1 'LCD.PRINT "CODE EINGABE" LCD.PRINT b '---------hier soll der wert erstmal ausgegeben werden---- LIGHT=off '----------------------------------------------------- ' '----------------------------------------------------- INVALUE=GET_VALUE() '------ START REQUESTING A VALID CODE (1357) --------- if INVALUE=1 then goto NIKLASHOCH if INVALUE=4 then goto NIKLASRUNTER if INVALUE=44 then goto NIKLASHALBRUNTER if INVALUE=2 then goto ANNIKAHOCH if INVALUE=5 then goto ANNIKARUNTER if INVALUE=55 then goto ANNIKAHALBRUNTER if INVALUE=3 then goto SCHLAFHOCH if INVALUE=6 then goto SCHLAFRUNTER if INVALUE=66 then goto SCHLAFHALBRUNTER if INVALUE=12 then goto KINDERHOCH if INVALUE=45 then goto KINDERRUNTER if INVALUE=123 then goto ALLEHOCH if INVALUE=456 then goto ALLERUNTER 'if (hour=8 and minute>=15) then goto ALLEHOCH LCD.POS 2,1 LCD.PRINT "unbekannte Eing." pause 100 goto SCHLEIFE '----------------------------------------------------- #NIKLASHOCH NIKLASRUNTER=OFF LCD.POS 1,1 LCD.PRINT " Niklas Rollo " LCD.POS 2,1 LCD.PRINT " wird geoeffnet " NIKLASHOCH=ON PAUSE 1500 NIKLASHOCH=OFF goto SCHLEIFE '----------------------------------------------------- #NIKLASRUNTER NIKLASHOCH=OFF LCD.POS 1,1 LCD.PRINT " Niklas Rollo " LCD.POS 2, Meine Homepage: http://wandbilder.net |
| Antwort schreiben |