Change keitai library baud rate

edited February 2016 in Android Mode

Found the solution. Didnt know how to delete post.

thanks!

Tagged:

Answers

  • Please, could you tell about the solution? Because, I am faced with the similar problem

  • Same Here! Could you please give a hint?!

  • edited February 2016

    im sorry i took so long to answer, my email inbox is a mess.

    I have checked the code I was working on when I started this discussion and there`s nothing about baud rate, for what I remember what I did was just changing the baud rate of the bluetooth module that was receiving the data from the app, the module was connected to an arduino, and it worked fine. All there is about keetai are the following lines

    before setup:

    import ketai.net.bluetooth.*;

    KetaiBluetooth bt;

    *I also had to put this because it was giving me an error, not sure why but It worked after i put this, also outside setup and draw

    void onBluetoothDataEvent(String who, byte[] data) { }

    inside setup

    if (bt == null) { bt = new KetaiBluetooth(this); bt.connectDevice("30:14:11:21:17:14"); }

    then, Ive used functions to send data to the module, each of them sent different number of arguments, example:

    void clearAll(byte matriz) { byte[] mensagem=new byte[]{ 4, matriz }; bt.broadcast(mensagem); }

    This worked fine using processing 3, mac osx, hc-06 bluetooth module, arduino uno, and like I said, i have only changed baud rate using arduino`s IDE to comunicate with the module.

    Hope that helps, sorry I took all this time to comment.

Sign In or Register to comment.