Help for connecting bluetooth

hi, i need send data from arduino to smartphone(android app) via bluetooth. show diagram i need when i press on FSR sensor send signal to android app "this 1 Pressure'. can any give any idea for this i use : 1- arduino UNO. 2-FSR sensor. 3- HC-05 Wireless Bluetooth RF Transceiver Module serial RS232 TTL for arduino.

int fsrAnalogPin = 0; // FSR is connected to analog 0
int LEDpin = 13;      // connect Red LED to pin 11 (PWM pin)
int fsrReading;      // the analog reading from the FSR resistor divider
int LEDbrightness;

void setup(void) {
  Serial.begin(9600);   // We'll send debugging information via the Serial monitor
  pinMode(LEDpin, OUTPUT);
}

void loop(void) {
  fsrReading = analogRead(fsrAnalogPin);
  Serial.print("Analog reading = ");
  Serial.println(fsrReading);

  // we'll need to change the range from the analog reading (0-1023) down to the range
  // used by analogWrite (0-255) with map!
  LEDbrightness = map(fsrReading, 0, 1023, 0, 255);
  // LED gets brighter the harder you press
  analogWrite(LEDpin, LEDbrightness);

  delay(100);
}

|500x366

You appear to have the Rx/Tx wires wrong way round.

You can test this programme by using the serial monitor and the connect bluetooth without alteration once it is proven.

You might find the following background notes useful

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

Nick_Pyner:
You appear to have the Rx/Tx wires wrong way round.

You can test this programme by using the serial monitor and the connect bluetooth without alteration once it is proven.

You might find the following background notes useful

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

thanks i will try now and i will back

Hey I'm trying to do the same thing (output the sensor value via Bluetooth). What's the best way to do this? I know I have to wire the FSR to the A0 pin. But what's a sketch I can use to send the FSR values via Bluetooth to the Arduino serial monitor on my PC?

Nick_Pyner: http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino

Consider yourself karma'ed.

Of course, my real problem is that I want to write an andriod app to drive the arduino. Using an app over bluetooth means that you now have an unlimited number of buttons and analog inputs, and any kind of gauge or display that you can code up or borrow. Away with having to jam those tiny little switches into a breadboard!

But, first you gotta work out how to write an android app :( .

PaulMurrayCbr: Consider yourself karma'ed.

Thanx, Glad to hear it helped

But, first you gotta work out how to write an android app

Maybe, but better to check there isn't already an Android app that suits. Then check the Android forum.

I used HyperTerminal program running in my PC to send commands to Bluetooth connected to Arduino. The setup was some thing like https://www.youtube.com/watch?v=_yICs2Zr4XA

Later I created an Android app to send commans to Arduino.

Thanks Sarouje! I downloaded the trial version for HyperTerminal and watched the Youtube link. My setup is very similar, except rather than receive commands to my Arduino board, I'm sending data from the board to my laptop. I'm going to give HyperTerminal a try and see if it works. I will update soon. My end goal is to make an app that receives the data as a force in grams or lb's, so if you know of any source codes for apps or something that would help, please feel free to share!

Still no luck. This topic is also in this thread:

http://forum.arduino.cc/index.php?topic=217906.0