Float magnet switch interrupts atmega328p and RN2483 sends data It was so easy to my mind but it is really not. I have a float switch which goes high when water is floating. So I connect the switch to INT0 pin of MCU. So when water is not floating everything is OK. When the water is floating I send data. I declare the interrupt as follows:

attachInterrupt (digitalPinToInterrupt (switch), float, RISING);


Where float is

void float()
{
detachInterrupt(0);
digitalWrite (LED, HIGH);    
txReturn = myRN.txCnf("1");
}  


And my main loop is

attachInterrupt (digitalPinToInterrupt (BUTTON), switchPressed, RISING);
digitalWrite (LED, LOW);
LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);


I can't understand why my led is not going LOW and why I interrupt is useless after the first successful time. I am aware that I must keep interrupts routines short and by txReturn.txCnf("1"); I don't but I can not understand where my logic is wrong.
float is already defined for floating point number, so you cannot use it for your function that detects when the sensor is floating on water.  Try calling it something else.

Also, instead of detaching and reattaching the interrupt, use a state machine.  When the interrupt is triggered, you will be able to run different code in the main loop.

unsigned int state;
void setup(){
  state=1;
  attachInterrupt(0,changestate,RISING);
}
void loop(){

switch (state) {
case 1: // do something
// add code here
break;

case 2: // do something else
// add code here
break;
}
}

void changestate(){
if(state==1){state=2;} // interrupt changes state
}