bluetooth communication between 2 arduino

i have a school project to flash an LED by bluetooth like this picture. please help me i am newbie

Aren't the other 30 to 60 students also newbies?

Who set you that task? They were an idiot. There is no resistor in seriese with that LED, that is how I know they were an idiot.

Who set you that task? They were an idiot. There is no resistor in seriese with that LED, that is how I know they were an idiot

i dont care about the circuit. i only need how the program to flash on the LED by bluetooth. i forget puttinng a resistor series with LED.

Have a look at Serial Input Basics. Bluetooth communication is just “serial by wireless”

If the images are irrelevant to the problem, why waste bandwith posting them ?

…R

indra_yanto:
i only need how the program to flash on the LED by bluetooth.

You need to know a bit more than that. Flashing the LED is the easy part. Your real problem is more to do with configuring the bluetooth modules, and you can start by being a bit more forthcoming about which modules you are using.

It is difficult to make out the details on that JPG of the circuit due to the poor resolution.
But appears that one of the Bluetooth module is the master and will send a message to the slave Bluetooth module to briefly turn on the LED when the button is pressed.

Programming the Bluetooth modules will depend on which model they are.
It is a secret that only you know.

i dont care about the circuit. i only need how the program to flash on the LED by bluetooth.

Start out by flashing the LED using the serial monitor, next connect the arduinos together using wires and do the same, then finally bring in the wireless bluetooth connection between the arduinos. Below is simple LED control test code.

// zoomkat 8-6-10 serial I/O string test
// type a string in serial monitor. then send or enter
// for IDE 0019 and later

int ledPin = 13;
String readString;

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT); 
  Serial.println("serial on/off test 0021"); // so I can keep track
}

void loop() {

  while (Serial.available()) {
    delay(3);  
    char c = Serial.read();
    readString += c; 
  }

  if (readString.length() >0) {
    Serial.println(readString);

    if (readString == "on")     
    {
      digitalWrite(ledPin, HIGH);
      Serial.println("LED ON");
    }
    if (readString == "off")
    {
      digitalWrite(ledPin, LOW);
      Serial.println("LED OFF");
    }
    readString="";
  } 
}

indra_yanto:
i dont care about the circuit.

In which case you will never truly succeed in electronics. Take up study in something that you do care about and stop wasting our time.