Step by Step Guide


In this project, you will build a simple weather station using the Pixie M1. The DHT11 sensor will measure temperature and humidity, and the IPS screen will display the readings in real-time. This project introduces you to reading sensor data and showing it visually on a display.

1. What You'll Need

2. Make the Connections

DHT11 Sensor Module

  • G (Ground) → Breadboard ground rail (blue/negative row)
  • VIN → Pixie M1 3V3 pin
  • S (Signal) → Pixie M1 Pin 1

IPS Display (ST7735S)

  • VIN → Pixie M1 3V3 pin
  • GND → Breadboard ground rail (blue/negative row)
  • SCL (CLK) → Pixie M1 Pin 2
  • SDA (DIN) → Pixie M1 Pin 3
  • RES → Pixie M1 Pin 4
  • DC → Pixie M1 Pin 5CS → Pixie M1 Pin 6
  • BLK (Backlight) → Pixie M1 3V3 pin

3. Connect to PC & Upload Code

  • Install Arduino IDE and Setup Axiometa PIXIE M1 if you haven't already
  • Connect the Pixie M1 to your computer using the USB-C cable
  • Select the correct board in Arduino IDE:
  • Go to Tools → Board →  Axiometa Pixie M1
  • Copy and Paste the code you can find at the end of this page.
  • Upload code (CMD+U or CTRL+U)

4. Test

After uploading, the IPS display should turn on and show temperature an humidity readings.

  • Touch the DHT11 sensor or breathe on it to see the changes in temperature and humidity. 

Next Steps:

  • Change the display colors or text for better visibility
  • Add a minimum/maximum temperature display.
  • Store historical readings in EEPROM or send them over WiFi to a server. 
Back to blog

Arduino Code

example.ino
#include <Adafruit_GFX.h>
#include <Adafruit_ST7735.h>
#include <DHT.h>
#include <SPI.h>

// === Pin Definitions ===
#define DHTPIN      1
#define DHTTYPE     DHT11

#define TFT_CS      8
#define TFT_RST     17
#define TFT_DC      14
#define TFT_MOSI    11
#define TFT_SCLK    10

// === Setup ===
DHT dht(DHTPIN, DHTTYPE);
SPIClass mySPI(FSPI);  // Use FSPI for custom SPI pins
Adafruit_ST7735 tft = Adafruit_ST7735(&mySPI, TFT_CS, TFT_DC, TFT_RST);

void setup() {
  Serial.begin(115200);
  dht.begin();

  mySPI.begin(TFT_SCLK, -1, TFT_MOSI);  // No MISO
  tft.initR(INITR_MINI160x80);
  tft.setSPISpeed(8000000);
  tft.setRotation(3);
  tft.fillScreen(ST77XX_WHITE);

  tft.setTextSize(2);
  tft.setTextColor(ST77XX_RED, ST77XX_WHITE);
  tft.setCursor(10, 10);
  tft.print("DHT11");
}

void loop() {
  float temp = dht.readTemperature();
  float hum  = dht.readHumidity();

  tft.setTextSize(2);
  tft.setTextColor(ST77XX_BLACK);

  // === Clear old values line-by-line ===
  tft.fillRect(0, 30, 160, 20, ST77XX_WHITE);  // Temp line
  tft.fillRect(0, 50, 160, 20, ST77XX_WHITE);  // Humidity line

  if (isnan(temp) || isnan(hum)) {
    tft.setCursor(10, 30);
    tft.print("Sensor error");
  } else {
    tft.setCursor(10, 30);
    tft.print("T: ");
    tft.print(temp, 1);
    tft.print(" C");

    tft.setCursor(10, 50);
    tft.print("H: ");
    tft.print(hum, 1);
    tft.print(" %");
  }

  delay(2000);
}