Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package w1o3;
- import hardware.Hardware;
- public class Controller extends Thread {
- Button b1 = new Button(2);
- Button b2 = new Button(3);
- Led l = new Led(4);
- public static void main(String[] args) {
- Controller c = new Controller();
- c.start();
- }
- public void run(){
- Hardware.showBediening();
- while(true){
- if(b1.isPressed())
- l.blinkOn();
- if(b2.isPressed())
- l.blinkOff();
- try {
- Thread.sleep(100);
- } catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement