code for sensor

NIR LED is my transmitter/input and photodiode is my receiver/output of the circuit. So how should i code it correctly? how should i use the analogread(), or digitalread(), these function? Thank you

Below is my currently used code
Below attached is the project sample i am following

#include "SoftwareSerial.h"
int BluetoothData;
int analogInPin = A0; // Analog input pin that the potentiometer is attached to
int out =2;
int sensorValue = 0; // value read from the pot
SoftwareSerial HC05(4,5); // RX, TX

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
pinMode(out, OUTPUT);
HC05.begin(9600);
}

void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
Serial.print("sensor value = " );
Serial.println(sensorValue);

delay(200);

if(sensorValue>700)
{
digitalWrite(out,1);
}
else
{
digitalWrite(out,0);
}
if (HC05.available())
{
BluetoothData=HC05.read();
Serial.println(BluetoothData);
}
}

Smartphone Based Non-Invasive Glucose Monitoring.pdf (328 KB)

What does your code do now? What values are you seeing in your Serial.prints?

Steve

in serial monitor, sometimes it shows 230, 234, 235, 231, 230 like this and if i reopen arduino ide again, it shows 78, 80, 81, 77, 79, it seems a little bit constant, just sometimes not same as previously, dono why...

my code is to get reading from the analog output of my hardware which is my photodiode and send the value as digital input to my smartphone through bluetooth which is connected with my arduino.

So how i should apply the analogread(), analogwrite(), digitalread(), digitalwrite() things??
And do you understand the "if sensor value>700" that part, if can explain to me please, thank you

thanks for replying