/* import android.content.Intent; import android.os.Bundle; import ketai.net.bluetooth.*; import ketai.ui.*; import ketai.net.*; import android.bluetooth.BluetoothAdapter; import android.view.KeyEvent; */ PImage S,Tune,Vup,Vdown,Play,Stop,Mode; void setup() {size(displayWidth,displayHeight); background(255); //size(600,600); imageMode(CENTER); S = loadImage("S.png"); Tune = loadImage("Tune.png"); Vup = loadImage("Vup.png"); Vdown = loadImage("Vdown.png"); Play = loadImage("Play.png"); Stop = loadImage("Stop.png"); Mode = loadImage("Mode.png"); /* imageloader(); vibe = new KetaiVibrate(this); isConfiguring = true; bt.start(); //start listening for BT connections bt.getPairedDeviceNames(); bt.connectToDeviceByName("HC-05"); textSize((height-width)/35); */ } void draw() { loadImages(); definebuttons(); println(mouseX,mouseY); } void loadImages() { image (S, width/12,height/12,width/12,height/12); image (Tune, width/2,height/1.5,width/1.5,height/4); image (Vup, width/1.1,height/2,width/12,height/12); image (Vdown, width/1.1,height/1.1,width/12,height/12); image (Play, width/1.5,height/3,width/12,height/12); image (Stop, width/2.5,height/3,width/12,height/12); image (Mode, width/1.96,height/6,width/10,height/10); } void definebuttons() { if (mouseYheight/3.5) { if(mouseXwidth/2 && mousePressed) { println("PLAY"); } } if ( mouseYheight/2.5 && mouseYheight/1.8 && mouseYwidth/2) { println("Chnl right"); } } if (mouseY>height/1.3 && mousePressed) { println("Volume down"); } }