Integrate TI SensorTag with Blynk via Node‑RED on Raspberry Pi Zero
Node‑RED provides an elegant, low‑code solution for fusing diverse IoT devices and cloud services. This guide walks you through connecting a Texas Instruments SensorTag to the Blynk mobile platform using a Raspberry Pi Zero equipped with a RedBear IoT pHAT.
Hardware Overview
- SensorTag – collects temperature, humidity, pressure, and other sensor data via Bluetooth Low Energy (BLE).
- Raspberry Pi Zero + RedBear IoT pHAT – provides BLE and Wi‑Fi connectivity, running the Node‑RED flow.
- Blynk app – runs on iOS or Android, displaying the SensorTag measurements in real time.
1. General Preparation
1.1 Download the Debian Jessie Lite image and flash it onto a microSD card (use ApplePi‑Baker on macOS).
1.2 Enable USB‑over‑Ethernet for SSH:
sudo nano /boot/config.txt
# Add at the end
dtoverlay=dwc2
sudo nano /boot/cmdline.txt
# After rootwait add
modules-load=dwc2,g_ether
Power‑cycle the Pi, then connect via USB and SSH: ssh [email protected] (default password raspberry).
1.3 Update the system:
sudo apt-get update
sudo apt-get upgrade
1.4 Set your timezone with sudo raspi-config and install rpi-update to ensure the latest firmware:
sudo apt-get install rpi-update
sudo rpi-update
2. Install the RedBear IoT pHAT
Plug the pHAT into the Pi Zero, power it on, and verify the EEPROM:
cat /proc/device-tree/hat/product
Output should read IoT pHAT v0.3. If not, follow the EEPROM update procedure on the pHAT documentation.
Configure Wi‑Fi:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Append:
network={
ssid="YOUR_SSID"
psk="YOUR_PASSWORD"
key_mgmt=WPA-PSK
}
Reboot: sudo reboot. Verify connectivity with ifconfig or SSH over Wi‑Fi.
3. Verify Bluetooth
Confirm the Bluetooth adapter is active:
hciconfig
Scan for the SensorTag:
bluetoothctl
[bluetooth]# scan on
[NEW] Device B0:B4:48:ED:B4:84 CC2650 SensorTag
[bluetooth]# connect B0:B4:48:ED:B4:84
[bluetooth]# trust B0:B4:48:ED:B4:84
[bluetooth]# quit
4. Install Node, npm and Node‑RED
Install the required packages:
sudo apt-get update
sudo apt-get install node
sudo apt-get install npm
sudo apt-get install nodered
Verify:
node -v # Should be v0.10.29
npm -v # Should be 1.4.21
For a more recent Node.js (v0.12.0), run:
wget https://s3-eu-west-1.amazonaws.com/conoroneill.net/wp-content/uploads/2015/02/node-v0.12.0-linux-arm-pi.tar.gz
tar -zxvf node-v0.12.0-linux-arm-pi.tar.gz
cd node-v0.12.0-linux-arm-pi
sudo cp -R * /usr/local/
cd ..
sudo rm -R node-v0.12.0-linux-arm-pi
node -v # Should be v0.12.0
Upgrade npm to 2.15.11:
sudo npm install -g [email protected]
npm -v
5. Install Additional Node‑RED Nodes
Install Bluetooth dependencies and set permissions:
sudo apt-get install libbluetooth-dev libudev-dev pi-bluetooth
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
In your Node‑RED directory, install the SensorTag node:
cd ~/.node-red
npm install node-red-contrib-sensortag
Verify the installation:
npm list
Install the Blynk WebSocket node:
cd ~/.node-red
npm install node-red-contrib-blynk-websockets
6. Configure Node‑RED Flow
Start Node‑RED with node-red-start and open the editor at https://localhost:1880. Build a flow that:
- Connects to the SensorTag via the
sensortagnode. - Processes the raw data (e.g., temperature, humidity).
- Publishes the values to the Blynk WebSocket node, using your
BLYNK_AUTH_TOKENand server address.
7. Launch the Blynk App
Download the Blynk app (Android) or iOS. Create a project, copy the authentication token, and configure the widget dashboard to receive the SensorTag data.
With this setup, your SensorTag measurements will flow seamlessly from the hardware, through Node‑RED, and onto your mobile device in real time.
Manufacturing process
- Accurate Raspberry Pi Temperature Profiling with Python, SQLite, and LabVIEW
- Build a Remote Temperature Sensor with Raspberry Pi and Python – Step‑by‑Step Guide
- Remote Weather Monitoring with Raspberry Pi 3 and PubNub
- Control an LED with a PIR Motion Sensor on Raspberry Pi
- Reading Button Presses via GPIO on Raspberry Pi: A Step‑by‑Step Guide
- Monitor Your Home Temperature with a Raspberry Pi Dashboard
- Capturing IR Remote Commands on Raspberry Pi without LIRC: A Python UART Approach
- Using an MCP3008 ADC to Read Analog Sensors with Raspberry Pi
- Build a Smart Robot with the Bridge Shield – Raspberry Pi & Arduino Integration
- Build a Wi‑Fi‑Controlled Raspberry Pi Robot with Python – Step‑by‑Step Guide