■ CONTENTS
xi
■Chapter 7: IoT Patterns: On-Demand Clients .............................. 139
Learning Objectives ............................................................................. 140
Hardware Required ............................................................................. 140
Software Required ............................................................................... 141
Circuit .................................................................................................. 141
Database Table (MySQL) ...................................................................... 144
Code (PHP) ........................................................................................... 144
Database Connection ............................................................................................ 145
Receive and Store Sensor Data ............................................................................ 146
Get the Parking Spot Count .................................................................................. 148
Code (Arduino) ..................................................................................... 149
External Libraries.................................................................................................. 149
Internet Connectivity (Wireless) ............................................................................ 149
Read Sensor Data ................................................................................................. 150
Code (iOS) ............................................................................................ 153
Project Setup ........................................................................................................ 153
Screen Layout ....................................................................................................... 157
Screen Logic ......................................................................................................... 165
The Final Product ................................................................................ 171
Summary ............................................................................................. 175
■Chapter 8: IoT Patterns: Web Apps ............................................. 177
Learning Objectives ............................................................................. 177
Hardware Required ............................................................................. 178
Software Required ............................................................................... 178
Circuit .................................................................................................. 179
Database Table (MySQL) ...................................................................... 181
Code (PHP) ........................................................................................... 182
xi
■Chapter 7: IoT Patterns: On-Demand Clients .............................. 139
Learning Objectives ............................................................................. 140
Hardware Required ............................................................................. 140
Software Required ............................................................................... 141
Circuit .................................................................................................. 141
Database Table (MySQL) ...................................................................... 144
Code (PHP) ........................................................................................... 144
Database Connection ............................................................................................ 145
Receive and Store Sensor Data ............................................................................ 146
Get the Parking Spot Count .................................................................................. 148
Code (Arduino) ..................................................................................... 149
External Libraries.................................................................................................. 149
Internet Connectivity (Wireless) ............................................................................ 149
Read Sensor Data ................................................................................................. 150
Code (iOS) ............................................................................................ 153
Project Setup ........................................................................................................ 153
Screen Layout ....................................................................................................... 157
Screen Logic ......................................................................................................... 165
The Final Product ................................................................................ 171
Summary ............................................................................................. 175
■Chapter 8: IoT Patterns: Web Apps ............................................. 177
Learning Objectives ............................................................................. 177
Hardware Required ............................................................................. 178
Software Required ............................................................................... 178
Circuit .................................................................................................. 179
Database Table (MySQL) ...................................................................... 181
Code (PHP) ........................................................................................... 182
