ARDUINO PRO MICRO SPARKFUN - 5v / 16MHz (BEHAVIOR MEDICINE PROJECT)

Best regard

With a group of colleagues, we are developing a technological project to measure the indices of behavioral medicine (stress, anxiety, depression, among others). For this we are using an arduino Pro Micro to transfer the data of the sensors to an APP-Android (Smartphone).

Once we connect the arduino Pro Micro with the Bluetooth (HC-05), this one is connected because in the APP we have a heart image and a sound that simulates the heartbeat; but fails to transfer the data that the sensors are registering to the APP.

Our question is, is there a special connection or a special code to program the Arduino Pro Micro and connect it to the bluetooth module (HC-05).

Thanks in advance for your attention, we are attentive to your comments.

ATT: UECCI Group

This is our connection (Image of connection of Arduino pro micro and bluetooth)

This is our Application (Image of our APP)

This is our connection (Image of connection of Arduino pro micro and bluetooth)
This is our Application (Image of our APP)

I think not read
image guide

these are the images, I appreciate your recommendations and comments.

Well just one image and not too helpful at that. No sensors on the diagram and no idea what the App is that is supposed to be receiving g the data,

these are the images, I appreciate your recommendations and comments.

Buy an arduino pro micro sparkfun, it's 5v / 16MHZ (mega32u4). I'm trying to transfer two analog data to an Android application. The bluetooth can connect to the smartphone, but the data does not record them; ie the data of the analog inputs, are not transferred, do not pass the data.

I want to know if the arduino pro micro sparkfun, has some connection configuration in particular or some code that generates the transmission of the data. ???

Thank you very much for your attention, I am attentive to your comments.

ATT: Ing. Biomedical J.D.

want to know if the arduino pro micro sparkfun, has some connection configuration in particular or some code that generates the transmission of the data. ???

I don't know but I would very much think not. Even if their is a Bluetooth path into your device you have to know the data format that the device is expecting to see. Without that information I can't see how it is going to work.

Basically you transfer the data through a serial link to and from the the Bluetooth device, but it is how the data is formatted that allows the device to recognise that it is data. So you need to know for example if the data is sent in packets with a header footer and check sum. Is it sent in bytes? Is it sent as an ASCII string and if so what that string "says".

It is probably best to get the device that it is supposed to talk to and try and reverse engineer that, only then can you think about emulating that device with an Arduino.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Please post the code you have so we can advise of how to get your data transferred.
Does your code work without trying to use the Bluetooth?

Thanks.. Tom... :slight_smile:

Grumpy_Mike and TomGeorge, thank you very much for your comments.

This is the code I am using.

//funciona con rx0 conectado al BT
int  analogpin=A0;
int  analogpin1=A1;

float sensorvalor;
float rango;
float sensorvalor1;
float rango1;

char dato_temperatura;
char datos_serial;
char enviar_dato ;
char buffer[10];

void setup()
{
//____configuracion de velocidad
  Serial.begin(9600);      //Inicia la velocidad en 9600 baudios

float lectura_sensor()
{
  sensorvalor = analogRead(analogpin);
  rango =(float (sensorvalor));  //(sensorvalor*(5.0/21)));
  return rango;}
float lectura_sensor1()
{
   sensorvalor1 = analogRead(analogpin1);
  rango1 =(float (sensorvalor1*(5.0/24)));
  return rango1;
}   

void loop()
{
  int temp = lectura_sensor();
   int temp1 = lectura_sensor1();
 ///este es el orden que debe ir para recibirse en la aplicacion
  sprintf(buffer,"%d,%d",temp,temp1);//(,%d,dist)    concadena varias variables  diferentes como int, char en una sola cadena, aprovecho la coma para dividir en appinventor los datos
  Serial.println(buffer);
 delay(1000);

So, I connect the arduino pro micro to the PC, same as this one in the image number 2, I run the code on the arduino platform, the bluetooth lights, my smartphone detects bluetooth (HC-05) and is paired and connected, the heart that is in the APP in the image number 2, begins to beat because the program detects that the bluetooth is connected correctly to the smarptohe and application, beats the heart.

But the data of the sensors are not transferred, which are those of the input A0 and A1. and the Arduino Pro micro connection, RX and TX LEDs do not light, as there is no communication.

RX and TX LEDs do not light, as there is no communication.

No the LEDs do not light up because that is done by the USB host. You would not expect them to in a stand alone mode.

So why are you writing the data twice? What does the buffer array do you don't seem to fill it at all. Then their is all the stuff in reply #6.

Even if your code was doing what you think what makes you think it is going to be in the same format as the app expects?