Arduino UNO and BT module

Hi! i don't know if this is the right section, but i try anyway, let me know if i have to change :wink:
i have a problem with Arduino UNO and my BT module:
i connect the module to the computer, it found all and it result to be connected to the serial port COM5 (i use win8 -_-)
but when i try this little sample program the serial monitor window and the window of the program stops working:

    char val;   
    int ledpin = 13; //Impostate il pin LED che preferite  
    void setup() {  
      pinMode(ledpin, OUTPUT);   
      Serial.begin(9600);   
    }  
    void loop() {  
      if( Serial.available() )   
      {  
        val = Serial.read();   }  
      if( val == 'L' )   {  
        digitalWrite(ledpin, HIGH);   
      }   
      else {   
        digitalWrite(ledpin, LOW);   }  
      delay(100);   
    }

and the BT module appear offline.
I try all the things possible and i don't know what to do!! is it possible that i have to change something on my win8 properties? any suggestion or solution?

The detail of BT module?

sonnyyu:
The detail of BT module?

is this one http://www.megalab.it/images/contents2/41160/big.jpg
http://t2.gstatic.com/images?q=tbn:ANd9GcQAKf58_Hx0hGWHYbAS5X347R4HLLmhgLTDjAQGq96Y29r9g23f

a single BT module with 4 pins, vcc gnd rx and tx it doesn't have any kind of brand on it it's an JY-MCU V1.05

i connect the module to the computer, it found all and it result to be connected to the serial port COM5 (i use win8 -_-)

module, Is it Arduino?

and the BT module appear offline.

Arduino appear offline?

sonnyyu:

and the BT module appear offline.

Arduino appear offline?

no, module is the bluetooth module, i put the BT on my Arduino, i connect gnd vcc and rx tx pins on Arduino board and attach the alimentation (not trough the pc but trough an external cable) i search with the pc the bluetooth devices and it found "linvor" that is the bt. i insert the key "1234" and connect to the pc the bluetooth that appear connected to the COM5. but when i go to check the bluetooth evices connected my linvor appear offline. i think that "offline" means that it is in standby state.

Getting the JY-MCU bluetooth board to WORK!

Warning: the Bluetooth chip is rated for 3.1V to 4.2V

use one of Logic Level Converter here will be safe move.

[Interfacing_with_Bluetooth_JY-MCU](http://wiki.pinguino.cc/index.php/Interfacing with Bluetooth JY MCU)

sonnyyu:
Getting the JY-MCU bluetooth board to WORK!

http://www.youtube.com/watch?v=OtMuOpII-hU

Warning: the Bluetooth chip is rated for 3.1V to 4.2V

use one of Logic Level Converter here will be safe move.

[Interfacing_with_Bluetooth_JY-MCU](http://wiki.pinguino.cc/index.php/Interfacing with Bluetooth JY MCU)

HI! thank you a lot! really..now with this tutorial it's working ;D