Schupp icon

Untitled

Schupp | PRO | 04/05/21 08:34:28 AM UTC | 0 ⭐ | 396 👁️ | Never ⏰ | []
text |

920 B

|

None

|

0 👍

/

0 👎

  // this example is public domain. enjoy!
// https://learn.adafruit.com/thermocouple/
 #include "max6675.h"
#include "BluetoothSerial.h"
 #if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
 BluetoothSerial SerialBT;
int thermoDO = 4;
int thermoCS = 16;
int thermoCLK = 17;
 MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
 void setup() {
  Serial.begin(115200);
SerialBT.begin("ESP32test");
    // wait for MAX chip to stabilize
  delay(500);
}
 void loop() {
  // basic readout test, just print the current temp
    Serial.print(round(thermocouple.readCelsius()));
    Serial.println("");
  SerialBT.print("x:");
  SerialBT.println(round(thermocouple.readCelsius()));
 // SerialBT.println(";");
   // For the MAX6675 to update, you must delay AT LEAST 250ms between reads!
   delay(1000);
}

Comments