0

I'm new to Arduino.

I'm passing some data from my Android phone to my Macbook via bluetooth (throught the app Sensoduino).

What I'd like to do now is to export that data to my Arduino Mini Pro.

Is there any way to achieve it?

(NOTE: I'm not able to connect my Android Phone directly to the Arduino via Sensoduino)

1
  • Could you please add more detail about what bluetooth hardware for example you are using. Also, could you elaborate a bit what "export that data to my Pro Mini" means? – Avamander Feb 10 '16 at 22:48
1

A simple bluetooth module like a HC-05 wired to your Arduino will give you a serial stream that can be read and/or written.

With the RX/TX connected to say pins 10 & 11, a SoftwareSerial() object will provide access:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
    mySerial.begin(9600);
}


void loop()
{
    int value;

    if (mySerial.available(sizeof(int)))
    {
        value = mySerial.parseInt();
    }
}

If you connect the module to pins 0 & 1 - you can just use the Arduino standard Serial functions, but it will cause problems uploading to the board. In which case you would disconnect the bluetooth module for uploading.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.