This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_MAX31865.h> | |
// Use software SPI: CS, DI, DO, CLK | |
//Adafruit_MAX31865 thermo = Adafruit_MAX31865(3, 2, 1, 0); | |
// use hardware SPI, just pass in the CS pin | |
Adafruit_MAX31865 thermo = Adafruit_MAX31865(D1,D2,D3,D4); | |
// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000 | |
#define RREF 430.0 | |
// The 'nominal' 0-degrees-C resistance of the sensorS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.verifyEmail = functions.auth.user().onCreate(async(user) => { | |
try { | |
const token = crypto.randomBytes(48); | |
await admin.firestore().collection("users").doc(user.uid).set({ | |
name: user.displayName, | |
}); | |
await admin.firestore().collection("activationTokens").doc(user.uid).set({ | |
token: token.toString('hex'), | |
expires: Date.now() + ( 3600 * 1000 * 24) | |
}); |
NewerOlder