simultaneous mannual and automated controll

hi there

I want to develop logic on aurdino where i am controlling an LED from two place one from buetooth( HC05) and other mannuall control a simple switch
the condition are listed :
the action which is performed most recent has to be completed for example if bulb is assumed to be on so if by mannuall switch it can be turned it off also if done same by bluetooth it can be off

if bulb is on with help of mannuall switch then it can be off by both switch as well as bluetooth any of them

if bulb is off then it can be switched from any of two option i.e. either bluetooth or switch

Make one variable to control the state of the LED. Control the state of that variable from both the switch code and the BT code.

What is the switch, a push button? How is it wired? What is the message from BT that controls the LED?

Please post the code that you have so far. What does the code do? How is that different from what you want to do?

I want to develop logic on aurdino where i am controlling an LED from two place one from buetooth( HC05) and other mannuall control a simple switch

What have you tried so far ?

It sounds simple. The LED is on one of 2 states, on or off. Input from either control changes the state of the LED.

Where are you stuck ?