Bluetooth slider: Recieve serial bytes and if a particular char is recieved jump to function..?

edited January 2016 in Arduino

I have a project in processsing Bluetooth and Arduino . On processing of trying to achieve communication with slider To perform the conversion I am inspired by MUBASE :

http://forum.arduino.cc/index.php?topic=194804.10;wap2

void COMMANDE( int valeur) { // fonction évènement Slider de meme nom - reçoit la valeur

byte[] a= intToByteArray(valeur); // excellent function for converting int to byte array (byte[]) which is what the Ketai bluetooth
//library sends. byte[] b={'q'}; // sending the 'q' character as a byte[] bt.broadcast(b); // send identifier character bt.broadcast(a); // send (broadcast) the bluetooth slider info println("Evènement Slider PWM avec valeur = "+valeur); // message console Processing - debug

delay(10); // entre 2 prises en compte }

but intToByteArray () method ; It does not work and the error code is:

  1. ERROR in D:\DOCUME~1\ssi\LOCALS~1\Temp\android3016120574738694448sketch\src\processing\test\bprogboutonandprocfw\bprogBoutonAndProcfw.java (at line 150) byte[] a= intToByteArray(valeur); // excellent function for converting int to byte array (byte[]) which is what the Ketai bluetooth
    ^^^^^^^^^^^^^^

The method intToByteArray(int) is undefined for the type bprogBoutonAndProcfw

1 problem (1 error) BUILD FAILED D:\DOCUME~1\ssi\LOCALS~1\Temp\android3016120574738694448sketch\build.xml:15: The following error occurred while executing this line: D:\DOCUME~1\ssi\LOCALS~1\Temp\android3016120574738694448sketch\build.xml:28: Compile failed; see the compiler error output for details.

Total time: 1 second Someone would he an idea? Thanks.

Tagged:
Sign In or Register to comment.