Building Arduino Projects for the Internet of Things
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Figure 7-3. Circuit diagram of the smarter parking system Your circuit is now comple ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Figure 7-4. Actual circuit of the smarter parking system ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Database Table (MySQL) Before you can send HTTP requests from Arduino, you need to b ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Start a text editor of your choice. ■ Note All the PHP code was developed using Brac ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS //Open a new connection to MySQL server $mysqli = new mysqli($servername, $username, ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS be using becomes http://bookapps.codifythings.com/smartparking/update. php?parkingUp ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Get the Parking Spot Count Your app is not going to directly query the database for ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS else { echo "0 results"; } $mysqli->close(); ?> Code (Arduino) The second comp ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Read Sensor Data The third section of the code, as provided in Listing 7-6 , defines ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS // Distance Calculation float distance = pulseIn(ECHOPIN, HIGH); Serial.println("[IN ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS char c = client.read(); Serial.write(c); } if (millis() - lastConnectionTime > po ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Listing 7-8. Code for Standard Arduino Functions void setup() { // Initialize serial ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Select Single View Application for the project, as shown in Figure 7-10. Screen req ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Figure 7-10. Template selection screen Fill out the details of your project as shown ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Figure 7-11. New project configuration Select the location on your machine where you ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Figure 7-12. Default files generated by Xcode Screen Layout To start designing the l ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Figure 7-14. Object library with user interface widgets This application needs three ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Since the first widget is an ImageView, you need to set an image in properties. You ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Once the ImageView properties have been set, the image will become visible on the st ...
CHAPTER 7 ■ IOT PATTERNS: ON-DEMAND CLIENTS Next, select Button and, from the Attribute Inspector, change the Title property to ...
«
4
5
6
7
8
9
10
11
12
13
»
Free download pdf