#include <ESP8266WiFi.h> #include <OneWire.h> #include <DallasTemperature.h> #define ONE_WIRE_BUS 2 OneWire oneWire(ONE_WIRE_BUS); DallasTemperature sensors(&oneWire); float tempc; WiFiServer server(80); void setup() { Serial.begin(9600); WiFi.mode(WIFI_AP); WiFi.softAP("CrushHack", "crushing"); server.begin(); sensors.begin(); } void loop() { sensors.requestTemperatures(); WiFiClient client = server.available(); client.print(sensors.getTempCByIndex(0)); Serial.println(sensors.getTempCByIndex(0)); delay(500); }