Root Cause Data Collection: Using the Arduino by Paul Bradt & David Bradt
Author:Paul Bradt & David Bradt [Bradt, Paul]
Language: eng
Format: azw3
Published: 2017-10-15T04:00:00+00:00
SN002 code is a slightly modified version from the website above.
__________________________________________________
/*
SN002 The simplest TMP 36 Thermometer
This code is from henrysbench.capnfatz.com
*/
const int analogIn = A0;
int RawValue= 0;
double Voltage = 0;
double tempC = 0;
double tempF = 0;
void setup(){
Serial.begin(9600);
Serial.println("This is SN002 Program by P&D Analytics");
}
void loop(){
RawValue = analogRead(analogIn);
Voltage = (RawValue / 1023.0) * 5000; // 5000 to get millivots.
tempC = (Voltage-500) * 0.1; // 500 is the offset
tempF = (tempC * 1.8) + 32; // convert to F
Serial.print("Raw Value = " ); // shows pre-scaled value
Serial.print(RawValue);
Serial.print("\t milli volts = "); // shows the voltage measured
Serial.print(Voltage,0); //
Serial.print("\t Temperature in C = ");
Serial.print(tempC,1);
Serial.print("\t Temperature in F = ");
Serial.println(tempF,1);
delay(500);
}
__________________________________________________
Getting the system up and running.
The first step is to label the Arduino UNO SN002. The next is to upload the code via the IDE to the Arduino.
The code is made of two primary elements
The first part of the code sets the input values.
The next part of the code captures the data and sends it over the serial port to the computer every half second.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Linux Device Driver Development Cookbook by Rodolfo Giometti(3953)
Embedded Programming with Modern C++ Cookbook by Igor Viarheichyk(3738)
Implementing Cellular IoT Solutions for Digital Transformation by Dennis McCain(3659)
Embedded Linux Development Using Yocto Project - Third Edition by Otavio Salvador & Daiane Angolini(3501)
TinyML Cookbook by Gian Marco Iodice(3423)
Simplifying 3D Printing with OpenSCAD by Colin Dow(2856)
TinyML Cookbook by Gian Marco Iodice & Ronan Naughton(2620)
Fusion 360 for Makers by Lydia Sloan Cline(2229)
Networking A Beginner's Guide by Bruce Hallberg(2227)
Hands-On Linux for Architects by Denis Salamanca(2068)
But How Do It Know? by J. Clark Scott(2039)
Computers For Seniors For Dummies by Nancy C. Muir(2021)
Raspberry Pi and MQTT Essentials by Dhairya Parikh(1976)
Arduino Project Handbook, Volume 2: 25 Simple Electronics Projects for Beginners by Geddes Mark(1960)
9781803246888-ENHANCING DEEP LEARNING WITH BAYESIAN INFERENCE by Unknown(1917)
Hack and HHVM by Owen Yamauchi(1898)
31 Days Before Your CompTIA A+ Exams (Shanette Luellen's Library) by Benjamin Patrick Conry(1874)
MicroPython Projects by Jacob Beningo(1757)
Hands-On Internet of Things with MQTT by Tim Pulver(1727)
