My favorites
▼
|
Sign in
rocketnumbernine
Open source project code from www.rocketnumbernine.com
Project Home
Downloads
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
AVR
/
MAX6675
/
MAX6675.h
r13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef MAX6675_H
#define MAX6675_H
#include <SPI.h>
/*
* A Simple MAX6675 library.
Example usage:
MAX6675 thermocouple(8); // A MAX6675 chip select pin is connected to arduino pin 8 (plus the SPI clock and MISO pins)
short temp = thermocouple.read(); // read the temperature of the device - returned as 4*the temp in degrees centigrade
Serial.print(temp/4); Serial.print("."); Serial.println(temp%4 *25);
Use Freely.
*/
class MAX6675
{
private:
uint8_t cs;
public:
// initialize MAX6675 with chip select pin attached to the specified arduino pin
MAX6675(uint8_t pin);
// if SPI is used for another device after the constructor has been called setup() can be used to reconfigure
void setup();
// return the temperature in centigrade * 4.
int16_t read();
};
#endif
Show details
Hide details
Change log
r11
by and...@rocketnumbernine.com on Nov 28, 2011
Diff
First Version
Go to:
/trunk/AVR/MAX6675
/trunk/AVR/MAX6675/MAX6675.h
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 833 bytes, 31 lines
View raw file
Powered by
Google Project Hosting