Problem: Bluetooth HC-05 and my own C# Program

Hello,

i´m trying to make some examples with the bluetooth module hc-05 and my own program but I have problems with sending data to my arduino. In my example i will send analog values from a c# programm to the arduino and make an analogWrite with this value to an LED.
→ what does work:

  1. with hTerm i can send all analog values (0-255)
  2. I can send values to the arduino and it does an analogWrite
    3 my prog can connect to the arduino and send values

what does not work:
when i send a value between 128-255 from my prog to the arduino it doesn´t get the right value, insted of it has the value 63.
To show which value the arduino get, I attached a LCD.

I have the hc-05 connected like it is in this ref:
http://forum.arduino.cc/index.php/topic,185445.0.html
in addition, following a coment from a user at this topic

I have to add an 2k2 resistor from hc-05 tx pin to GND.

thank you guys for helping

G_R

Form1.cs (6.23 KB)

helloworldExample.ino (1.72 KB)

Hello,

For testing I have tried to use other pins on the Arduino Uno R3 for an Serial Port, but this will not work. With that I don´t get any transfere.

greez G_R

Hi,

I tested the SoftwarSerial on a diffrent pin agian (10 = rx,11 = tx)and it worked. But in this time I had to remove the additional 2k2 resistor form HC05 tx pin to arduino rx pin to get an value.

But my first problem is still there, I get not the right value that I send over my program. All values over 127 don´t get the arduino and it has 63 as value. :~

greez G_R