Device is offline

Hye! We already configured the Arduino Mega with GPRS SIM900 with current sensor. We want to receive the data via Blynk apps. Here is ur code. But the problem is in blynkapps, it shows the device is offline while it is connected.

#define BLYNK_PRINT Serial

// Select your modem:
//#define TINY_GSM_MODEM_SIM800
#define TINY_GSM_MODEM_SIM900
//#define TINY_GSM_MODEM_M590
//#define TINY_GSM_MODEM_A6
//#define TINY_GSM_MODEM_A7
//#define TINY_GSM_MODEM_BG96
//#define TINY_GSM_MODEM_XBEE

// Default heartbeat interval for GSM is 60
// If you want override this value, uncomment and set this option:
//#define BLYNK_HEARTBEAT 30

#include <TinyGsmClient.h>
#include <BlynkSimpleTinyGSM.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "HXpRfORzTv_83PSSkDU9bsNgE49mcGVv";

// Your GPRS credentials
// Leave empty, if missing user or pass
char apn[] = "net";
char user[] = "";
char pass[] = "";

// Hardware Serial on Mega, Leonardo, Micro
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(10, 11); // RX, TX

// or Software Serial on Uno, Nano
//#include <SoftwareSerial.h>
//SoftwareSerial SerialAT(10, 11); // RX, TX
TinyGsm modem(SerialAT);

float reading = 0; 
float currentValue = 0;
float powerValue = 0;

void sendSensor()
{
reading = analogRead(A5); //Raw data reading
currentValue = (reading - 510) * 5 / 1024 / 0.04 - 0.24; 
powerValue = ( currentValue * 254);

Serial.print("\t Amps = "); //shows the current value 
Serial.println(currentValue); //the '2' allows you to display 2 digit
Serial.print("\t Watts = "); //shows the current value 
Serial.println(powerValue, 2); //the '2' allows you to display 2 digit
delay(3);
}

void setup(){
// Debug console
Serial.begin(9600);

delay(10);

// Set GSM module baud rate
SerialAT.begin(115200);
delay(3000);

// Restart takes quite some time
// To skip it, call init() instead of restart()
Serial.println("Initializing modem...");
modem.restart();

// Unlock your SIM card with a PIN
//modem.simUnlock("1234");

Blynk.begin(auth, modem, apn, user, pass);
}

void loop()
{
Blynk.run();
}```

Please edit your post and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Pete.

But not correctly!
I gave you triple backticks that you could copy and paste, but you didn’t use them and used three dots instead.
Try again.

Pete.

ok done.

That’s very fast to use with SoftwareSerial.

What do you see in your serial monitor?

Pete.

Just a symbol Blynk. So change it to 9600?