No edit summary |
No edit summary |
||
Line 17: | Line 17: | ||
<pre> | <pre> | ||
<nowiki> | <nowiki> | ||
#include <LiquidCrystal.h> | #include <LiquidCrystal.h> | ||
int sensorPin = A5; | int sensorPin = A5; |
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> 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); }