Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. import reg517a.h; //import der biblio
  2.  
  3. public class reg517a.h{
  4.  
  5. sbit taster; //taster wird initialisier
  6. sfr led; //led wird initialisiert
  7.  
  8.  
  9.  
  10.  public static void main(String[] args){
  11.  
  12.     taster = new sbit; // taster eingefügt
  13.     led = new sfr;  // taster wird eingefügt
  14.    
  15.  
  16.     while(true){ //endlosschleife beginn
  17.    
  18.     if(taster!=0){ //wenn taster nicht gedrückt licht an
  19.    
  20.     led.on();
  21.  
  22.     }else{ // wenn taster gedrück licht aus
  23.    
  24.     led.off();
  25.    
  26.     }
  27.  
  28.     }
  29.  
  30. }
  31.  
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement