
30.Aug.2023
Request from Mcu as "iot.milivolt.com.tr/receive_data.php?deg1=xx°2=yy"
It is processed by the Web Server.
Description of receive_data.php file:
The file is written in PHP to retrieve data, insert it into the database, and return notification messages during operations.
The $servername, $username, $password, and $dbname variables contain information required to access the database.
The $_GET superglobal array receives data sent by HTTP GET request (deg1 and deg2).
A connection to the database is created with the new mysqli() function. If a connection error occurs, the die() function displays the error message and the process is terminated.
Data is added to the database with theINSERT INTO SQL statement. The $sql variable contains this SQL statement.
$conn->query($sql)===TRUEif the query was run successfully "Data was added successfully." message is displayed, otherwise error details are given with the error message.
The database connection is closed with the ->close() method.
This PHP file is used to save incoming temperature and humidity data to a database. When the request is made, this file adds data to the database and returns the result of the operation.
file content of receive_data.php:
<?php
// Database information
$servername="localhost"; // Server name or IP address
$username="milivoltcomtr_iot"; // Database username
$password="123456789"; // Database user password
$dbname="milivoltcomtr_iot"; // Database name
// Get incoming data with GET request
$deg1=$_GET['deg1']; // Initial data (temperature)
$deg2=$_GET['deg2']; // Second data (moisture)
// Create database connection
$conn=new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Database connection error: " . $conn->connect_error);
}
// Add the data to the database
$sql="INSERT INTO dht (temp, humd) VALUES ('$deg1', '$deg2')";
if ($conn->query($sql)===TRUE) {
echo "Data successfully added."; // Return this message if data was added successfully
} else {
echo "Error adding data: " . $conn->error; // Return error message if error occurred
}
$conn->close(); // Close the database connection
?>

Mobile programming Fundamentals for Control Applications
Fundamentals of mobile application development for control of electronic systems
05.04.2023

With the Flutter-Dart language, can we write an artificial intelligence program that takes a picture and lists the objects in it?
Flutter-Dart language, artificial intelligence program
06.04.2023

Writing Applications that control Electronic Devices with Flutter-Dart Programming Language
Controlling Electronic Devices remotely
06.04.2023

Controlling Wifi Devices with Flutter-Dart
Control of remote devices with Android apps, Wifi-based control applications
07.04.2023

Developing an Application to Send Data to a Bluetooth-enabled Thermal Printer with Flutter
Mobile app developed with Flutter explains the step-by-step process of sending text to a Bluetooth-enabled thermal printer. Contains information about printer commands and Bluetooth communications
11.01.2024

Application Development Example with Flutter and Arduino
Learn to connect mobile devices with embedded systems! In this article, learn step by step how to develop an app using Flutter and Arduino
01.03.2024

Bluetooth Speaker Project with Flutter - Audio data transfer
In this project we will try to understand how the Bluetooth speaker system is designed and how to develop it. We will examine the basics of Android programming, MCU programming-embedded system design.
24.07.2023

Extracting Data from Database and Creating Graphs with Flutter and PHP
Learn how to pull data from a database and create a line chart using Flutter and PHP
27.08.2023

IoT System Design 1 – Temperature and Humidity Monitoring System
IoT system design with ESP 12f. Monitoring of temperature, humidity in web & mobile. Arduino, DHT11 sensor.
30.08.2023

IoT System Design 2- Sending Temperature and Humidity Data to Web Server with Arduino
Learn the steps to send temperature and humidity data from DHT11 sensor with Arduino to web server via ESP 12f
30.08.2023

IoT System Design 4- Creating a Web Interface
Learn how data is pulled from the IoT system and used graphically.
30.08.2023

IoT System Design 5- Mobile Application Visualizing IoT Data with Flutter
Code descriptions of an application that pulls, graphs, and lists IoT data with Flutter.
30.08.2023

Mobile Application Development for Smart Homes
In this article, you can find the steps and examples of mobile application development using WiFi communication
01.09.2023

Developing Mobile Applications with Artificial Intelligence – Voltmeter Interface Application
The mobile application developed with artificial intelligence visualizes the microcontroller volt measurement with numerical data.
12.09.2023

Mobile Application Interface Development Study for Smart Homes
Ways to develop mobile applications with Flutter for smart home and workplace systems
16.09.2023

Designing an Air Quality Measurement System 1 – Basic definitions of Air Quality
Air Quality Measurement System design and air quality parameters. PM2.5, CO, NO2, O3, SO2 measurement
02.10.2023

Designing an Air Quality Measurement System 2- MQ-135 Gas Sensor Review
MQ-135 Gas Sensor: A powerful sensor used to monitor air quality and detect gases. Offers precise measurement
02.10.2023

Designing an Air Quality Measurement System 3 - Measurement with MQ-135 and DHT-11
Designing an Air Quality Measurement System - Measurement with MQ-135 and DHT-11.
10.10.2023

Designing an Air Quality Measurement System 4 – Air Quality Monitoring Mobile Application
Air Quality Monitoring Mobile Application. Receive air quality data via Bluetooth, parse it in JSON format
10.10.2023