Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/********* Pleasedontcode.com ********** Pleasedontcode thanks you for automatic code generation! Enjoy your code! - Terms and Conditions: You have a non-exclusive, revocable, worldwide, royalty-free license for personal and commercial use. Attribution is optional; modifications are allowed, but you're responsible for code maintenance. We're not liable for any loss or damage. For full terms, please visit pleasedontcode.com/termsandconditions. - Project: "Temperature Tracker" - Source Code compiled for: Arduino Uno - Source Code created on: 2024-03-06 07:06:39 ********* Pleasedontcode.com **********/ /****** SYSTEM REQUIREMENTS *****/ /****** SYSTEM REQUIREMENT 1 *****/ /* turn on the led when it work */ /****** END SYSTEM REQUIREMENTS *****/ /****** DEFINITION OF LIBRARIES *****/ #include
#include
//https://github.com/adafruit/Adafruit-MLX90614-Library /****** FUNCTION PROTOTYPES *****/ void setup(void); void loop(void); /***** DEFINITION OF I2C PINS *****/ const uint8_t but_GY_906_I2C_PIN_SDA_A4 = A4; const uint8_t but_GY_906_I2C_PIN_SCL_A5 = A5; const uint8_t but_GY_906_I2C_SLAVE_ADDRESS = 90; /****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/ Adafruit_MLX90614 mlx = Adafruit_MLX90614(); /****** SYSTEM REQUIREMENTS *****/ /****** SYSTEM REQUIREMENT 1 *****/ const uint8_t ledPin = 13; void setup(void) { // put your setup code here, to run once: pinMode(ledPin, OUTPUT); // Set the LED pin as output Serial.begin(9600); while (!Serial); Serial.println("Adafruit MLX90614 test"); Wire.begin(); if (!mlx.begin(but_GY_906_I2C_SLAVE_ADDRESS)) { Serial.println("Error connecting to MLX sensor. Check wiring."); while (1); } Serial.print("Emissivity = "); Serial.println(mlx.readEmissivity()); Serial.println("================================================"); } void loop(void) { // put your main code here, to run repeatedly: digitalWrite(ledPin, HIGH); // Turn on the LED Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC()); Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C"); Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF()); Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F"); digitalWrite(ledPin, LOW); // Turn off the LED Serial.println(); delay(500); }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)