Contents - Programming With Node-RED
Contents - Programming With Node-RED
Dogan Ibrahim
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 1 • Raspberry Pi 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.4 Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
●5
Programming with Node-RED
4.17 Project 9 – Getting the weather reports – Display the local weather report . . . . . 70
4.22 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
●6
6.6 Project 24 – Displaying local temperature and humidity on the LCD . . . . . . . . . . 120
6.9 Project 27 – DHT11 temperature and humidity sensor with LCD Display . . . . . . . 124
●7
Programming with Node-RED
8.6 Project 36 – Using gauges to display the temperature and humidity . . . . . . . . . . 158
8.10 Project 40 – Using switch and text nodes to control an LED . . . . . . . . . . . . . . . 165
9.3 Project 43 – Controlling multiple LEDs from a mobile phone – UDP based
communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
9.7 Project 47 – Sending the temperature and humidity to the mobile phone –
TCP based communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
10.2 Project 50 – S
toring timestamped temperature and
humidity data in a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
●8
11.4 Project 55 – Receiving GPS data – Extracting the latitude and longitude . . . . . . 208
11.7 Project 58 – Connecting Raspberry Pi and Arduino Uno using USB ports . . . . . . 220
11.8 Project 59 – Sending serial data from Raspberry Pi to Arduino over RF Radio . . . 222
12.4 Project 60 - D
isplaying the temperature, humidity,
and pressure (environmental events) . . . . . . . . . . . . . . . . . . . . . . 227
12.10 Project 64 – Random flashing LED lights having random colours . . . . . . . . . . . 238
12.13 Project 66 – Scrolling the pressure readings on the LED matrix . . . . . . . . . . . 242
●9
Programming with Node-RED
13.4 Project 68 – Displaying the ambient temperature in the debug window . . . . . . . 248
13.6 Project 70 – Displaying the ambient temperature as gauge and chart . . . . . . . . 251
● 10
18.10 Project 79 – Controlling an LED using ESP8266 NodeMCU with MQTT – LED
connected to ESP8266 NodeMCU . . . . . . . . . . . . . . . . . . . . . . . 293
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
● 11