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);
}
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?
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 .
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!