Skip to content

Temperature Sensor Wireling

TinyCircuits Accelerometer Wireling product photo

This Wireling features the PCT2075 Temperature Sensor. This sensor has a range of -55°C up to 125°C and communicates over the I²C bus.

Technical Details
  • Temperature range from -55°C up to +125°C
  • 11 bit ADC that offers a temperature resolution of 0.125°C
  • Temperature accuracy of:
    • ±1 °C (max.) from -25 °C to + 100 °C
    • ±2 °C (max.) from -55 °C to + 125 °C
  • Programmable temperature threshold and hysteresis set points during operation
  • Supply current of <1.0 µA in shut-down mode for power conservation
  • Stand-alone operation as thermostat at power-up

    TinyDuino Power Requirements

    • Voltage: 3.0V - 5.5V 
    • Current: 70.0 µA (Normal Mode).  Due to the low current, this board can be run using the TinyDuino coin cell option
    • Current: <1.0 µA (Shut-Down Mode)

    Pins Used

    • A5/SCL - I²C Serial Clock line
    • A4/SDA - I²C Serial Data line


    • 10mm x 10mm (.393 inches x .393 inches)
    • Max Height (from the lower bottom of Wireling to upper top Wireling Connector): 3.70mm (0.15 inches)
    • Weight: 1 gram (.04 ounces)


    To interface with any TinyCircuits Arduino board, you will need the Arduino IDE and a Micro USB Cable

    There are multiple processor/adapter combinations that can be used with Wirelings. Use the following table to find the combination that works for you.

    Processor Adapter
    *TinyDuino and USB TinyShield Wireling Adapter TinyShield
    *TinyZero Wireling Adapter TinyShield
    *TinyScreen+ Wireling Adapter TinyShield
    WirelingZero N/A
    *RobotZero N/A
    Arduino Wireling Arduino Shield
    Raspberry Pi Wireling Pi Hat

    * These processors have a 32-pin connector and can have multiple Wireling Adapter TinyShields stacked to increase the number of Wireling ports up to a maximum of 32 total Wireling ports.

    In order to interface with Wirelings, you'll need the appropriate number of Wireling Cables and the Wireling.h Library (You can download this from GitHub as linked, or from the Library Manager in the Arduino IDE).

    You will also need the Accelerometer Wireling and the included example Arduino sketch.

    Wireling Code
    Port 0 Temperature Sensor Example Sketch

    Hardware Assembly

    Depending on the development system you choose, you will need to put together a TinyDuino stack using the 32-pin tan connectors, or you will just need to plug in your Wireling to Port 0 using a Wireling Cable. (You can change this port in the included Arduino Sketch using the selectPort() function)

    NOTE: Be mindful when inserting Wireling Cables - the connector pins inside the 5-pin connectors on Wirelings can be bent when cables are inserted at an angle.

    Software Setup

    For this Wireling, you will need to download the TinyCircuits PCT2075 Arduino library:

    Download PCT2075 Arduino Library

    To install an Arduino library, check out our Library Installation Help Page.

    If you have not already, download the example sketch included above under the Materials section and open it in the Arduino IDE.

    Make the correct Tools selections for your development board. If unsure, you can double check the Help page that mentions the Tools selections needed for any TinyCircuits processor.

    Upload Program

     * PCT2075 Temperature Sensor Wireling Example 
     * Reads and outputs PCT2075 values to the Serial Monitor when uploaded, 
     * including Temperature in degrees Celsius/Fahrenheit, Thyst - hysteresis, 
     * Tos - threshold, and the configuration register.
     * Initiated: 8-10-2017 by Brandon Farmer for TinyCircuits
     * Updated: 8-8-2019 by Laveréna Wienclaw for TinyCircuits
    #include <Wire.h>
    #include <TinyCircuits_PCT2075.h>
    #include <Wireling.h>
    TinyCircuits_PCT2075 tempSensor = TinyCircuits_PCT2075();
    #if defined (ARDUINO_ARCH_AVR)
    #define SerialMonitorInterface Serial
    #elif defined(ARDUINO_ARCH_SAMD)
    #define SerialMonitorInterface SerialUSB
    void setup() {
      while(!SerialMonitorInterface);  // Blocks sensor printing data until Serial Monitor is opened
      // Enable and Power wirelings
      Wire.begin(); // begin I2C communication
    //  const int tempPin = 0;       //IO Pin D2 = Interrupt Pin 0 
      //Initialize the sensor with config settings
      tempSensor.begin(PCT2075_ACTIVE_LOW, PCT2075_COMPARATOR, PCT2075_NORMAL, PCT2075_FAULT_6X);
    //  pinMode(tempPin, INPUT_PULLUP);
    //  attachInterrupt(digitalPinToInterrupt(tempPin), interruptServiceRoutine, FALLING);
      tempSensor.wake(); // Wake up the module
    void loop() {
      float rawTemp = tempSensor.readTemp() / 32.0; // Divide by 32 to get rid of empty 5 LSB
      float tempC = (rawTemp * 0.125); // Conversion to degreesC noted on page 11 of datasheet
      float tempF = (tempC * 1.8 + 32); // Conversion from degreeC to degreeF
      if (tempSensor.checkMode() == 0) {
        SerialMonitorInterface.print("Temp.C = ");
        SerialMonitorInterface.print(" C");
        SerialMonitorInterface.print("Temp.F = ");
        SerialMonitorInterface.print(" F");
        SerialMonitorInterface.print("Thyst = "); // Hysteresis 
        SerialMonitorInterface.print("Tos = "); // Threshold
        SerialMonitorInterface.print("Config: ");
        SerialMonitorInterface.print(tempSensor.readConfig(), BIN);
        SerialMonitorInterface.print("Mode = ");
    //    tempSensor.sleep();
      else {
        SerialMonitorInterface.println("SENSOR IN SLEEP MODE!"); 
        SerialMonitorInterface.println(tempSensor.readConfig(), BIN);

    To test the sensor, open the Serial Monitor and expose it to a change in temperature. This can be observed by covering the sensor with a finger, or applying cool/warm air.


    You can make a weather station with this Wireling and a few others:

    Weather Station Project


    Contact Us

    If you have any questions or feedback, feel free to email us or make a post on our forum. Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it.

    Thanks for making with us!