Embedded Computing
  • About
  • Blog
  • Hardware
    • Which Platform?
    • Controller Platforms >
      • Adafruit Platform >
        • Adafruit Feather M0
      • Arduino Plaform >
        • Arduino Primo and Primo Core
        • Arduino Uno
        • Arduino M0 Pro
        • Arduino mini Pro
        • Arduino Zero
        • Arduino Tian
        • Shields for Arduino Uno
      • BBC micro:bit
      • chipKIT Plaform >
        • chipKIT Uno32 and uC32
        • chipKIT WF32 and WiFire
        • Compatibility
        • chipKIT PGM Programmer-Debugger
        • 4D Systems PICadillo-35T
        • Shields for chipKIT Uno32
      • 4D Systems Platform >
        • 4D Systems PICadillo-35T
        • 4D Systems gen4-IoD-28T
      • DFRobot Platform >
        • DFRobot BLuno
        • DFRobot Wido
      • ESP8266 Platform >
        • ESP8266-01
        • NodeMCU Board
        • 4D Systems gen4-IoD-28T
      • LaunchPad Plaform >
        • LaunchPad MSP430G2
        • Standalone MSP430G2955
        • LaunchPad MSP430FR2331
        • LaunchPad MSP430FR2433
        • LaunchPad MSP430FR4133 and MSP430FR6989 with LCD
        • LaunchPad MSP430FR5529
        • LaunchPads MSP430FR5969 Pins Maps
        • LaunchPad MSP432: RTOS for Everyone
        • MSP432P4111 LaunchPad Pins Map
        • Stellaris LM4F120 LaunchPad
        • LaunchPad TM4C123 Tiva C Series
        • Connected LaunchPad TM4C129 Tiva C Series
        • LaunchPad CC1310 Sub-1 GHz
        • LaunchPad CC3200 WiFi
        • LaunchPad CC3220 S - SF WiFi
        • LaunchPad CC3235 S - SF WiFi
        • LaunchPad Hercules
        • LaunchPad MSP430FR5994
        • SensorTag CC1350
        • Launchpad SensorTag kit CC1352R Pins Maps
      • Microduino Plaform >
        • Microduino
      • Microsoft Azure IoT DevKit
      • Particle Platform >
        • Particle Core
        • Particle Photon
        • Particle Tools
      • Protostack Platform >
        • Protostack Boards
      • Teensy Plaform >
        • Teensy 3.0
        • Teensy 3.1
    • Computer Platforms >
      • BeagleBone Platform >
        • BeagleBone Green Wireless
      • Mediatek Platform >
        • Mediatek LinkIt One
        • Mediatek LinkIt Smart 7688 Duo
      • UDOO Platform >
        • UDOO Neo
    • Legacy Platforms >
      • Cosa, an Alternative Framework for AVR Boards
      • Digistump Platform >
        • Digispark
        • Oak
      • Intel Platform >
        • Intel Curie with Neural Network
        • Intel Edison
      • LightBlue Bean
      • Little Robot Friends
      • Maple Plaform >
        • LeafLabs Maple
      • RedBear Platform >
        • RedBearLab CC3200
        • RedBearLab WiFi Mini
        • RedBear Duo
      • Wiring Plaform >
        • Wiring S
        • Wiring Play Shield
    • Boards and Plugs
    • I²C Logic Level Converter
    • Peripherals >
      • BoosterPacks for LaunchPads >
        • iMeter BoosterPack
        • Anaren CC110L AIR BoosterPack
        • CC2650 BLE BoosterPack
        • CC3100 WiFi LaunchPad
        • Audio BoosterPack
        • Breadboard BoosterPack
        • BoosterPack Pins
        • Capacitive Touch BoosterPack
        • CapTIvate Development Kit
        • CapTIvate Touch Keypad BoosterPack
        • Educational BoosterPack MK-II
        • Fuel Tank BoosterPack MK-II
        • Grove BoosterPack
        • Pervasive Displays e-Paper EPD Extension Kit Gen 2
        • LCD 2.2" With Touch BoosterPack
        • Nokia 7110 LCD BoosterPack
        • microSD-Card BoosterPack
        • 4D Systems BoosterPack Adaptor
        • Universal 1.8" Colour LCD BoosterPack
      • Shields
      • Grove System
      • Sensors >
        • Serial GPS Unit
        • I²C Voltage-Current-Power INA219 Sensor
        • I²C Inertial Measurement Unit
        • I²C True Colour Sensor >
          • Arduino Hardware
          • Arduino Software
          • Arduino TX-C Digital Two Bits Connection
          • Robo Pro Program and Results
          • True Colour Sensor Calibration
          • True Colour Sensor Integration
          • Extensive Tests: Hardware
          • Extensive Tests: Software
          • Extensive Tests: Results
          • Step-by-Step Instructions
        • Pressure Sensor
      • Actuators >
        • I²C Stepper Motor Controller
        • I²C Haptic Controller
    • Displays >
      • General Purpose 3.5" Screen
      • Pervasive Displays e-Paper Screens >
        • Pervasive Displays e-Paper BWY Screens
        • Pervasive Displays e-Paper BWR Screens
        • Pervasive Displays e-Paper EPD Extension Kit Gen 2
        • Pervasive Displays e-Paper EPD Extension Kit
        • FRAM-based E-Paper Screen Controller
      • Kentec 3.5" LCD with Touch BoosterPack for Stellaris
      • Sharp Memory LCD BoosterPack 128
      • Universal 1.8" Colour LCD BoosterPack
      • The 2.2" LCD with Touch BoosterPack
      • The 2.8" HY28A LCD Screen
      • High-Definition 480x320 3.5" Screen With Touch and Fonts
      • Kentec 3.5" LCD SPI with Touch BoosterPack
      • 4D Systems Intelligent Screens >
        • 4D Systems gen4-uLCD-35DCT-CLB​
        • 4D Systems μLCD-32PT (SGC) Screen
        • 4D Systems uLCD-32WPTU Screen
        • 4D Systems Arduino Adaptor
        • 4D Systems BoosterPack Adaptor
      • East Rising 5" LCD with RA8875, Touch, Fonts, Flash and SD-card
      • East Rising 5" LCD with SSD1963, Touch, Flash and SD-card
  • Software
    • The IDE Question >
      • The Battle of IDEs
      • More IDE Options
      • Looking for a Better IDE
      • Assessing the Next Generation of IDEs
    • Exploring RTOS with Galaxia >
      • Event Library
      • Semaphore Library
      • Mailbox Library
      • Timer Library
      • Clock Library
      • SWI Library
      • Task Library
    • Ultra-Low Power with EnergyTrace >
      • Ultra-Low Power with MSP430
      • Ultra-Low Power with Energia MT and Galaxia
    • Using Integers Instead of Reals
  • IoT
    • IoT Platforms: Which Hardware?
    • IoT Services: Which Solution? >
      • Recommended IoT Solutions >
        • IoT with Node-RED
        • IoT OTG with Blynk
        • IoT BLE with Blynk and CC2650 BoosterPack
        • Private IoT with Blynk on Local Server
        • Plug-and-Play IoT with dweet and freeboard
        • IoT with Sparkfun Data and analog.io
        • Advanced IoT Data Processing with ThinkSpeak
        • IoT Hub with Zapier
        • Send Mail with SMTP2GO
      • Platform-Specific IoT Solutions >
        • IoT with Particle
        • IoT with LightBlue Bean and Node-RED
        • IoT with LinkIt One
      • Other IoT Solutions >
        • IoT with Sub-1 GHz Sensor Network
        • IoT with Project Things by Mozilla
        • IoT with Losant
        • IoT with Exosite
        • Data and Action IoT with Xively and Zapier
        • IoT with PubNub and freeboard
        • IoT Hub with Temboo
        • IoT with Cayenne MQTT
      • Not tested IoT Solutions >
        • IoT with Microsoft Azure
        • IoT with IBM Bluemix
        • IoT with MQTT and 2lemetry
        • IoT with Parse
      • Notification Solutions
    • Get Date and Time from Internet with NTP
    • Fast and Easy WiFi Connection with QR-Code
  • Tools
    • How to Start?
    • Reference >
      • Asking for Help
      • LaunchPads and BoosterPacks Pins Maps
      • Ruler
      • Standards for Connectors
    • Training >
      • Texas Instruments Workshops
      • Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x
      • Embedded Systems - Shape The World: Microcontroller Input/Output — MOOC edX UTAustinX UT.6.10x
      • Embedded Systems - Shape The World: Multi-Threaded Interfacing — MOOC edX UTAustinX UT.6.20x
      • Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x
      • Systems Thinking with Texas Instruments Robotics System Learning Kit
    • Books >
      • Getting Started with the MSP430 LaunchPad
      • Getting Started with Arduino
      • Arduino Cookbook
    • IDEs >
      • Texas Instruments Code Composer Studio 6
      • Texas Instruments Code Composer Studio Cloud
      • Energia
      • Tools for Documentation
    • Equipment >
      • Saleae Logic Analyser >
        • First Generation Logic Analyser
        • Second Generation Analog and Logic Analyser
        • Logic Software
      • Rigol DS1102E Oscilloscope
      • XDS110 Debug Probe with EnergyTrace​
      • Segger J-Link Programmer-Debugger >
        • Segger J-Link EDU Programmer-Debugger
        • Segger J-Link EDU mini Programmer-Debugger
        • Segger J-Link Software
        • Connecting to Boards >
          • Segger J-Link with Arduino Due​
          • Segger J-Link with LaunchPad MSP432
          • Segger J-Link with Adafruit Feather M0
          • Segger J-Link with Adafruit Feather nRF52
          • Segger J-Link with Arduino Primo Core
    • The 404 Collection
  • Projects
    • Libraries >
      • Master I²C Software Library
      • Date and Time Library
      • LCD_screen Library Suite >
        • Concepts and Scope >
          • Compatibility with Serial_LCD
          • Integers Only
          • Fast SRAM Support
          • Supported Screens
          • Turning an Image into a C-Array
          • Roadmap
        • Training Video
        • LCD_graphics Library >
          • LCD_graphics — Clock
          • LCD_graphics — Gauge
        • LCD_GUI Library >
          • LCD_GUI — Label
          • LCD_GUI — Button
          • LCD_GUI — Area
          • LCD_GUI — Dialog Window
          • LCD_GUI — Menu
          • LCD_GUI — Slider
          • LCD_GUI — Text Box
        • Download Library
        • Install Libraries on Energia 1.6.10E18
        • Examples >
          • Life Game
          • Digital Micrometer on VGA Display
          • Touch Screen GPS
      • Others Libraries
    • smartDevices >
      • I²C smartColours Smart Sensor
      • I²C smartRFID Smart Sensor
      • I²C smartLED Display
      • I²C smartControls Smart Device
      • I²C smartWiFi Smart Device
      • I²C smartBLE Smart Device
      • I²C smartNode Smart Device
    • IoT Projects >
      • Low Power Home Network Weather Monitoring
      • Weather and Security Station with Blynk
      • SensorTag to Blynk Using Node-RED
      • Pervasive Reporting
    • Other Projects >
      • FRAM-based E-Paper Screen Controller
      • General Purpose 3.5" Screen
      • Colour Recognition with Neural Network
      • A Low Power Weather Station
      • Digital Volt-Amp-Watt Meter
      • Mobile Measurement with LCD Display
      • Screen with SRAM for GUI
      • Volt-Amp-Watt-Meter for Grove
      • Multi-Touch Project with CapTIvate

Weather and Security Station with Blynk

This commented project is an introduction to the different elements provided by Blyink in a real application.

The project includes a LaunchPad CC3200, a Grove BoosterPack, and  the following Grove modules: a BMP180 barometer and thermometer, a DHT hygrometer and thermometer, a PIR sensor and a relay.

On the Blynk application, I've defined 6 virtual pins and one digital output pin, listed below:
  •  V0    temperature from BMP180, read
  •  V1    pressure from BMP180, read
  •  V2    temperature from DHT, read
  •  V3    humidity from DHT, read
  •  V4    alarm LED, read
  •  V5    reset from remote, write
  • D23  A/C relay
Picture

Prepare the Hardware

The hardware includes a LaunchPad CC3200 and a Grove BoosterPack with 4 elements: 
  • a PIR detector (input pin 27), 
  • a DHT22 temperature and humidity sensor (input pin 24), 
  • a BMP180 pressure sensor (I²C port) and 
  • a relay (output pin 23).

​The Grove system makes connections very easy. Just plug and play!
Picture

Create a New Project

Create a new project, select the board as Generic Board and name it. 

E-mail the authorisation string and copy-paste it on the project.
Picture
Picture
Picture

Add the Displays for Temperature, Pressure and Relative Humidity

For each element, select it from the list.

A new pane appears. Name the element (here oC).
Picture
Picture
Picture
Associate the element to a pin (here V0 for virtual 0), set the minimum and maximum (here 40), set the frequency (here every 10 seconds) and choose the option (here Line). 

Finally, press OK to add it to the project.
Picture
Picture
Picture
Do the same for the pressure with virtual pin V1.
Picture
Picture
On the sketch, the code uses the BLYNK_READ() function. 

The function is called by the application on the iPhone, reads the data from the BMP180 sensor, and sends the two values, temperature to virtual 0 and pressure to virtual 1.


Picture
Same definitions of the elements on the interface for the data from the DHT sensor, with  temperature to virtual 2 and pressure to virtual 3.

Similar BLYNK_READ() function on the sketch applies for the DHT sensor, with temperature to virtual 2 and relative humidity to virtual 3.

Picture
Picture

Add the Alarm LED and the Reset Push Button

The LED turns red and stays on when the alarm is detected by the PIR sensor.

Select the LED element and associate it to the V4 virtual pin.
Picture
The PIR sensor is checked every second. If an intrusion is detected, the red LED on the board is turned on and the alarm flag raised accordingly. 

The value of the alarm flag is sent to virtual pin 4.
Picture
The RESET button is a push button and sends a message to virtual pin 5.
Picture
On the sketch, the code uses the BLYNK_WRITE() function.

The function is called by the application on the iPhone and reads the  state of the button from virtual 5, then clears the alarm flag if true.
Picture

Add the A/C Switch

The A/C button is a switch button associated with digital pin 23. The signal on pin 23 drives the relay. Select blue as colour of the button.
Picture
This application can also run on a local server, for example a BeagleBone. Check out the Private IoT with Blynk on Local Server.

Download

  • Blynk for LaunchPad CC3200 library
  • BMP180, DHT and PIR are standard libraries
  • Main sketch on the right
blynkweather.ino
File Size: 3 kb
File Type: ino
Download File

Powered by Create your own unique website with customizable templates.