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)

asked Feb 10, 2016 at 22:37
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? Commented Feb 10, 2016 at 22:48

1 Answer 1

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.

answered Feb 10, 2016 at 23:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.