Simple Arduino/dsPIC serial data transfer to Android by using bluetooth

64 views
Skip to first unread message

yazida...@gmail.com

unread,
Aug 10, 2014, 5:58:49 AM8/10/14
to mitappinv...@googlegroups.com


Hello guys. I am building a simple app to display generated values (numbers) from arduino code. for my code, it will output numbers from 0 to 10 and keep on looping. so i want to display the output on my android app. Label 4 is expected to display the output.  i've found some references from this forum (in reference to SCOTTFROMSCOTT) but still unable to accomplish my app successfully. my arduino code is very simple as shown below.


-------------------------------------------------------
byte mydata=0;

void setup() {
    Serial.begin(9600);
}
void loop() {
 mydata=mydata+1;
    Serial.print(byte(mydata));
    Serial.print(",");
  
    delay(100);
    
    if(mydata==10){
    mydata=0;
    Serial.println("\n");
    }
}
---------------------------------------------------------

And my codeblock is as shown below

could someone help me with this. THANKS IN ADVANCE.


Reply all
Reply to author
Forward
0 new messages