This file contains 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
// https://medium.com/@jonsamp/how-to-set-up-https-on-localhost-for-macos-b597bcf935ee | |
// cd ~/ | |
// mkdir .localhost-ssl | |
// create a self signed key and certificate with next command | |
// sudo openssl genrsa -out ~/.localhost-ssl/localhost.key 2048 | |
// sudo openssl req -new -x509 -key ~/.localhost-ssl/localhost.key -out ~/.localhost-ssl/localhost.crt -days 3650 -subj /CN=localhost | |
// now you have to drag and drop the crt file into your keychain app, so when the browser opens the callback https://localhost url, it doesnt | |
// think that the self signed ssl cert for localhost that we just generated is a mitm attack | |
// stuff is here: | |
// ~/.localhost-ssl/localhost.crt |
This file contains 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
//THE SAMPLE CODE ON THIS PAGE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
//INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
//ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | |
//INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SUSTAINED BY YOU | |
//OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
//CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY WAY OUT OF THE USE OF | |
//THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
// |
This file contains 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 <Wire.h> | |
#define PHADDRESS 0x4D | |
int RoomTempI2CAddress = B1001011; | |
float volt7 = 0.6939; | |
float volt10= 0.3846; | |
float calibrationTempC = 20; |
This file contains 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 <Wire.h> | |
#include <stdlib.h> | |
#define PHADDRESS 0x4D | |
int RoomTempI2CAddress = B1001011; | |
float volt4 = 0.95; | |
float volt7 = 0.67; | |
float calibrationTempC = 20; |