Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turtureanu/esp8266-distance-measurement
Using an ESP8266 to get the distance data from an AJ-SR04M ultrasonic sensor over a really simple REST API.
https://github.com/turtureanu/esp8266-distance-measurement
arduino arduino-esp8266 distance-sensor esp8266 sensor
Last synced: 1 day ago
JSON representation
Using an ESP8266 to get the distance data from an AJ-SR04M ultrasonic sensor over a really simple REST API.
- Host: GitHub
- URL: https://github.com/turtureanu/esp8266-distance-measurement
- Owner: turtureanu
- License: mit
- Created: 2024-08-29T14:29:46.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T15:32:15.000Z (4 months ago)
- Last Synced: 2024-11-03T20:42:18.477Z (about 2 months ago)
- Topics: arduino, arduino-esp8266, distance-sensor, esp8266, sensor
- Language: OpenSCAD
- Homepage:
- Size: 2.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP8266 distance measurement
![a photo of the ESP8266 with the sensor soldered on, without the case](./ESP8266-with-AJ-SR04M-soldered.jpg)
## Case
![a screenshot of the 3D case](./case.png)[STL File](./Case.stl) [SCAD file](./Case.scad)
## Arduino Code Logic
[Arduino code](./ESP8266.ino)
```mermaid
flowchart TD
A("Initialize Serial Communication") --> B("Initialize Wi-Fi")
B --> C("Try to Connect to WAP")
C --> D{"Is Connected?"}
D -->|Yes| H("Set Up Webserver")
D -->|No| F["Print Status to Serial Console"]
F --> G["Wait for Connection"]
G --> C
H --> I("Loop")
I --> J{"Is there an HTTP Request?"}
J -->|Yes| K["Send Distance Data as JSON over HTTP"]
J -->|No| M["Print Distance to Serial Console"]
K --> M
M --> I
```