/* * HotHotHeat * * Compile with the Arduino IDE (http://arduino.cc); is deployed against a * Atmel Butterfly - so you also need the Butteruino project * (http://code.google.com/p/butteruino/) * * ...will * 1) Read the Butterfly temperature sensor and output * the result permanently to UART. * * 2) Read a reed sensor and output * the result permanently to UART * * Contact: Norbert Wigbels * (http://foobla.wigbels.de/uber-foobla/) * * Format: <# of Sensor> * Example: 1; Temperature in Celsius * tbd. */ #include #include int inputPin = PBPIN4; int value = 0; void setup() { Serial.begin(9600); pinMode(inputPin, INPUT); } void getSamples(){ Serial.print("1"); Serial.print("\t"); Serial.print(TempSense.getTemp(CELSIUS)); Serial.println(); value = digitalRead(inputPin); if (value == HIGH) { Serial.println("HIGH"); } else { Serial.println("LOW"); } } void loop() { TempSense.overSample = true; getSamples(); delay(400); }