Home Thermometer: Difference between revisions
(Created page with "{{Project |ProjectSkills=arduino |ProjectStatus=Finished |ProjectNiche=Electronics |ProjectPurpose=Infrastructure }} === Why === === What === === Sourcecode ===") |
No edit summary |
||
| Line 6: | Line 6: | ||
}} | }} | ||
=== Why === | === Why === | ||
So, I received some [http://www.seeedstudio.com/wiki/Electronic_Brick_Starter_Kit electronic brick kit] and no specific purpose for it. | |||
=== What === | === What === | ||
I have now combined the thermistor+opamp board and the lcd board with an old arduino I still had around. This gets me a serial outputting thermometer with a lcd readout. | |||
=== Sourcecode === | === Sourcecode === | ||
<pre> | |||
<nowiki> | |||
#include <LiquidCrystal.h> // include a library headfile | |||
int sensorPin = A5; | |||
int sensorValue = 0; | |||
LiquidCrystal lcd(10,11,12,13, A0, A1, A2); | |||
void setup() | |||
{ | |||
Serial.begin(57600); | |||
lcd.begin(16, 2); | |||
} | |||
void loop() | |||
{ | |||
sensorValue=analogRead(sensorPin); | |||
float x = map(sensorValue,250,700,13,439); | |||
x /= 10.0; | |||
Serial.print(sensorValue); | |||
Serial.print(" "); | |||
Serial.println(x); | |||
lcd.setCursor(1,0); | |||
lcd.print ("T: "); | |||
lcd.print (x); | |||
lcd.print (" "); | |||
lcd.setCursor(1,1); | |||
lcd.print ("X: "); | |||
lcd.print (sensorValue); | |||
lcd.print (" "); | |||
delay(1000); | |||
} | |||
</nowiki> | |||
</pre> | |||
Revision as of 00:09, 16 February 2014
| NURDspace Project | |
|---|---|
| Participants | User:buzz |
| Skills | |
| Status | |
| Niche | |
| Purpose | |
| Tool | |
| Location | |
| Cost | |
| Tool category | |
{{{Name}}}Property "Tool Name" (as page type) with input value "{{{Name}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. Property "Tool Image" (as page type) with input value "File:{{{Picture}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. {{{Picture}}} {{#if:{{{Tool}}} | [[Tool Owner::{{{ProjectParticipants}}} | }} {{#if:{{{Tool}}} | [[Tool Cost::{{{Cost}}} | }}
Why
So, I received some electronic brick kit and no specific purpose for it.
What
I have now combined the thermistor+opamp board and the lcd board with an old arduino I still had around. This gets me a serial outputting thermometer with a lcd readout.
Sourcecode
#include <LiquidCrystal.h> // include a library headfile
int sensorPin = A5;
int sensorValue = 0;
LiquidCrystal lcd(10,11,12,13, A0, A1, A2);
void setup()
{
Serial.begin(57600);
lcd.begin(16, 2);
}
void loop()
{
sensorValue=analogRead(sensorPin);
float x = map(sensorValue,250,700,13,439);
x /= 10.0;
Serial.print(sensorValue);
Serial.print(" ");
Serial.println(x);
lcd.setCursor(1,0);
lcd.print ("T: ");
lcd.print (x);
lcd.print (" ");
lcd.setCursor(1,1);
lcd.print ("X: ");
lcd.print (sensorValue);
lcd.print (" ");
delay(1000);
}