Weather station using SAMIIO, Arduino, and Raspberry Pi

This article demonstrates using SAMI with simple, off-the-shelf sensors and hardware. Specifically, we will be gathering climate data from a low-cost temperature sensor and relaying that data to the cloud via SAMI APIs. From there, we can analyze our collected data in real-time or historically. This autonomous combination of hardware, software and networking is now being referred to as IoT (Internet of Things).

Weather station using SAMIIO, Arduino, and Raspberry Pi

This article assumes you have experience uploading code to an Arduino Uno with the IDE and running a Raspberry Pi.

Hardware components we will use in our demo

  • Raspberry Pi with a network connection
  • Arduino Uno with a breadboard
  • Temperature sensor (DHT11)
  • USB and power cables, plus wiring for the breadboard

Software we will write

  • A Node.js script running on the Raspberry Pi
  • A Sketch program running on the Arduino

Step 1: Build the weather station

Connect to SAMI (it’s free, really!)

  1. First, sign into the SAMI User Portal. If you don’t have a Samsung account, you can create one at this step.
  2. Click to connect a device. Choose the already defined device type “Temp Sensor”.
  3. Name your device using your name (e.g., “Dan Temp Sensor”).
  4. Click “Connect Device…”. You’re taken back to the dashboard.
  5. Click the name of the device you just added. In the pop-up, click “Generate Device Token…”.
  6. Copy the device ID and device token on this screen. You will use these in the code.

Weather station using SAMIIO, Arduino, and Raspberry Pi board, circiut

Step 2: Set up the Arduino and the temperature sensor

Now let’s wire the sensor. We are using a DHT11 here. They are not the most accurate, but they are cheap and easy to use for our simple use case.

Using the Arduino IDE, upload the Arduino code (dht11.ino) to the Uno. This code reads the temperature data from the sensor and sends the value (in Fahrenheit) to the serial port every 2 seconds (you can change this parameter in the code later, since SAMI limits the number of messages per day).

For more detail: Weather station using SAMIIO, Arduino, and Raspberry Pi

Scroll to Top
Scroll to Top
Read previous post:
Adafruit PiTFT – 2.8″ Touchscreen Display for Raspberry Pi

Overview Is this not the cutest little display for the Raspberry Pi? It features a 2.8" display with 320x240 16-bit...