Inserisci la tua mail per essere sempre aggiornato:

Sensore di temperatura con Arduino

Etichette: ,

tramite Liquidware Antipasto di Matt il 16/02/10
A bunch of people have written in to say they are enjoying the new TempSensor (ps thanks Rich for the bug fix in the code, now it works perfectly), and that makes me and Justin and Paul and Chris quite happy. It was an Open Source Hardware collaboration from start to finish, sharing schematics and code with each other. The goal was to create a set of sensors that were bullet proof.

Chris also spent a bunch of time coding up a special version of the Antipasto Arduino IDE (the Antipasto branch of the Arduino IDE), so that anyone who wants can literally pick up the TempSensor, wire it into analog ports 2, 3, 4 and 5, and be up and running in no time.

Here's proof:

Step 1: Download the Antipasto Arduino IDE

First download the Arduino IDE from here.

Install it and test out a simple Blink sketch on the Arduino to ensure that it works

Step 2: Connect the TempSensor to the Arduino

Insert the pins so that the TempSensor is facing downwards, off the bottom of the Arduino.

The TempSensor's pins should be placed into the Arduino's analog header, into pins 2, 3, 4, and 5.

Step 3: Load the Example Code

This is from the File->Examples->Library-LibTemperature->GetLocalTemperature menu option.

* GetLocalTemperature
* An example sketch that prints the
* local temperature to the PC's serial port
* Tested with the TMP421-Breakout
* Temperature Sensor from Modern Device
#include "Wire.h"

LibTemperature temp = LibTemperature(0);

void setup() {

void loop() {
Serial.print("Temp: ");
Serial.println(" degC");

Step 4: Hit Compile

This is the little triangular button.

Step 5: Download the Program to the Arduino

Select the right port, and the right Arduino board, naturally, and then press download.

Step 6: Open the Serial Terminal

And you'll see something like this:


Se ti è piaciuto l'articolo, iscriviti al feed per tenerti sempre aggiornato sui nuovi contenuti del blog! Se invece vorresti vedere pubblicato un articolo in particolare mandami una richiesta

Articoli correlati

0 commenti:

Posta un commento