Editing
Temperature sensor
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[File:Sensor-Temperature.svg|right]] The Smart Sense temperature sensor measures temperatures between 2°C and 100°C. It is mounted in a stainless steel tube so that it can be immersed in most types of liquid. The sensor connects to one of the analogue sensor inputs. Once the sensor is connected the Smart Move software will display the name of the sensor and label the appropriate input ‘Temp’. The screen will also display the current temperature. Try holding the end of the sensor and watch the reading change. == Using the sensor to control an output == There may be times when you want to turn on or off one of the outputs depending on the reading from the temperature sensor. One example may be to switch on a warning buzzer if the temperature of a liquid falls below a certain level. The procedure "Warning" below will turn on output 1 when the temperature falls below 15°C. === Procedure: Warning === REPEAT IF TEMP IS LESS THAN 15 THEN SWITCH ON 1 ELSE SWITCH OFF 1 FOREVER === How it works === The second line of this procedure takes a reading from the sensor and either switches on or off output 1 depending on the current value. In order to constantly check the sensor the REPEAT...FOREVER loop repeats this statement. == Data capture == The readings from the temperature sensor can be stored on disk. The procedure "Cooling" below will store the temperature once per second for 3 minutes. === Procedure: Cooling === RESET CLOCK START CLOCK FILE 1,"Cool" REPEAT STORE 1,TEMP WAIT 1 UNTIL TIME IS GREATER THAN :3:0:0 CLOSE 1 === How it works === The first two lines reset and start the clock. The next line opens the file to save the reading to. Line four is the beginning of a REPEAT...UNTIL loop. This time the loop will continue until the clock has reached 3 minutes. The lines within the loop store the temperature once per second. The last line of the procedure closes the disk file. == Controlling data capture == The procedure "Night" below gives an example of data capture controlled by another sensor. In this case the temperature is only stored when the light level drops below 50. This could be used to monitor temperature and light during the night. === Procedure: Night === FILE 1,"Samples" PRINT "Logging - Press space to stop" REPEAT IF LIGHT IS LESS THAN 50 THEN STORE 1,TEMP WAIT 60 UNTIL INKEY = 32 CLOSE 1 [[Category:Sensors]]
Summary:
Please note that all contributions to Smart Box may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Smart Box:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information