This shows you the differences between two versions of the page.
iothings:proiecte:2021:3d_object_representation [2022/01/20 17:30] andrei_daniel.nita |
iothings:proiecte:2021:3d_object_representation [2022/01/26 22:14] (current) andrei_daniel.nita |
||
---|---|---|---|
Line 10: | Line 10: | ||
The gyroscope/accelerometer/temperature measurements will be read from the sensor at regular time intervals. | The gyroscope/accelerometer/temperature measurements will be read from the sensor at regular time intervals. | ||
- | These measurements will be stored on the ESP32. The server running on the ESP32 will transmit the data to the client side, where they will be displayed on the web page. | + | These measurements will be stored on the ESP32. The server running on the ESP32 will transmit the data to the client side, where it will be displayed on the web page. |
{{ https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/3d_schematic.jpg?500x250 }} | {{ https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/3d_schematic.jpg?500x250 }} | ||
Line 50: | Line 50: | ||
**1. Arduino IDE C Code** | **1. Arduino IDE C Code** | ||
- | |||
- | {{ https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/arduino_loop_1.jpg?300x200}} | ||
In order to use our sensor readings, communicate with the ESP32, connect to the WiFi and handle the web server, we are going to need the following **libraries**: | In order to use our sensor readings, communicate with the ESP32, connect to the WiFi and handle the web server, we are going to need the following **libraries**: | ||
Line 62: | Line 60: | ||
* WiFi | * WiFi | ||
* Arduino_JSON | * Arduino_JSON | ||
- | |||
- | {{ https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/arduino_setup_1.jpg?300x400}} | ||
**Functions** | **Functions** | ||
Line 73: | Line 69: | ||
getTemp() - get temperature readings | getTemp() - get temperature readings | ||
</code> | </code> | ||
+ | |||
+ | **Setup and Loop Functions** | ||
+ | |||
+ | {{https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/arduino_setup_1.jpg?300x400}} | ||
+ | {{https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/arduino_loop_1.jpg?300x200}} | ||
**Server Handling** | **Server Handling** | ||
- | The asynchronous web server is created on port 80. The Wi-Fi connection is established and the SPIFFS is mounted. | + | The asynchronous web server is created on port 80. The Wi-Fi connection is established and SPIFFS is mounted. |
The sensor readings are sent to the server every time a new reading occurs. | The sensor readings are sent to the server every time a new reading occurs. | ||
Line 89: | Line 90: | ||
}); | }); | ||
</code> | </code> | ||
- | |||
- | {{ https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/flowchart_3d.jpg?280x525}} | ||
**Sensor Readings** | **Sensor Readings** | ||
Line 106: | Line 105: | ||
} | } | ||
</code> | </code> | ||
+ | |||
+ | **Process Flowchart Diagram** | ||
+ | |||
+ | {{ https://ocw.cs.pub.ro/courses/_media/iothings/proiecte/2021/flowchart_3dd.jpg?300x400 }} | ||
**2. HTML and JS** | **2. HTML and JS** | ||
Line 155: | Line 158: | ||
[[https://randomnerdtutorials.com/esp32-mpu-6050-accelerometer-gyroscope-arduino/]] | [[https://randomnerdtutorials.com/esp32-mpu-6050-accelerometer-gyroscope-arduino/]] | ||
+ | |||
+ | [[https://randomnerdtutorials.com/esp32-web-server-spiffs-spi-flash-file-system/]] |