Im building an Android app like ArduDroid for BLE module from HMSoft.
I found a tutorial online for an android app and it takes care of the connectivity and it uses 3 seekbars to send information from the android app to the BLE module. So far because the app sends 3 values, 1 for each seek bar, the class has an array declared as int:
private int[] RGBFrame = {0,0,0};
// Then it creates variables to hold the values
private SeekBar mRed,mGreen,mBlue;
//Then it accesses those components from the view
mRed = (SeekBar) findViewById(R.id.seekRed);
mGreen = (SeekBar) findViewById(R.id.seekGreen);
mBlue = (SeekBar) findViewById(R.id.seekBlue);
//Finally it sends the component's value to a method that parses the data
readSeek(mRed,0);
readSeek(mGreen,1);
readSeek(mBlue,2);
Because I need to increase the seek bars to a total of 6 (one for each pwm pin), I redeclared the array as:
private int[] RGBFrame = {0,0,0,0,0,0};
But now I need to also account for 12 buttons for the 12 pins without PWM. Although I could add 12 more items to that array, it might get confusing. So I was thinking of a creating a second array for the buttons. But this would mean I need a new BLE characteristic to be able to accomodate the other data array, right?