BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Help with DS18b20 sketch

Can’t get the temperature sensor to read… can connect BLE to Blynk and control pin13 led.
running a DSD Tech BLE HM10 on Arduino Uno

//************LiveWIRE Temperature*************************************************
 
//
#include <SimpleTimer.h>
#define BLYNK_PRINT Serial
#include <SoftwareSerial.h>
#include <BlynkSimpleSerialBLE.h>
SoftwareSerial SwSerial(11,12); // RX, TX

// Auth Token in the Blynk App.
char auth[] = "jo-CmOxau_rzOY7W4NV9OVCzbRnERu7C";

SimpleTimer timer;

SoftwareSerial SerialBLE(11,12); //Rx Tx

//TEMPERATURE
// First we include the libraries
#include <OneWire.h> 
#include <DallasTemperature.h>

// Data wire is plugged into pin 2 on the Arduino 
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices   
OneWire oneWire(ONE_WIRE_BUS); 

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

int tempC;
int tempF;

void setup()
{
  Serial.begin(9600);
  SerialBLE.begin(9600);
  Blynk.begin(SerialBLE, auth);

while (Blynk.connect() == false) {
    //Wait until connected
  }
  
  sensors.begin();  
  sensors.setResolution(10);
  timer.setInterval(2000L, sensor); 
}

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

void sensor()
{
  sensors.requestTemperatures();
  tempC = sensors.getTempCByIndex(0);
  tempF = sensors.getTempFByIndex(0);
  Serial.println(tempF);
  Blynk.virtualWrite(V5, tempF);
  Blynk.virtualWrite(V6, tempC);
}