
Overview
This sensor SharpGP2Y0A21YK, boasts a small package and very low current consumption, takes a continuous distance reading and returns a corresponding analog voltage with a range of 10cm (4") to 80cm (30"). It can be used in TVs, personal computers, cars and so on.
Features:
- Grove interface compatible
- Wide supply voltage range: 2.5V-7V
Interface:
The sensor is quite small and use a tiny connector called a JST connector. These connectors have three wires: ground, vcc, and the output. Because the sensor fires continuously and don't need any clocking to initiate a reading, it is easy to interface with any microcontroller.
Tech specs
Technical Details
Weight |
G.W 8g |
Part List
Grove - 80cm Infrared Proximity Sensor |
1 |
Grove Cable |
1 |
Get Inspired
My project has a Nodemcu ESP8266 which is controlling a 7-segment display through the http server using html form.

… remote monitoring and control. 2. Embed a web server in the device Embedding a web server inside the IoT device allows you to visualize the data using a web browser. It requires the device to have network connectivity, and it is usually implemented connecting the device to a Wi-Fi access point or with the device creating its own WiFi hotspot. Although creating your own web server implementation can be done, one of the most widespread solutions is to make use of the library ESPAsyncWebServer. It allows your IoT device to serve custom HTML pages presenting the data. This is a very flexible and customizable solution, yet complex and mostly suitable for skilled users. There are plenty of insightful examples like the following ones: ESP32 Web Server - Arduino IDE | Random Nerd TutorialsArduino Project Hub - NodeMCU ESP8266 AJAX Enabled Web Server Arduino Project Hub - WiFi Robot Car / RC Car NodeMCU Web ServerESP32 Web Server: Display Sensor Readings in Gauges | Random Nerd Tutorials The scope of this solution is typically local — you need to be on the same network as the device — although with a more advanced configuration by enabling port forwarding in the router, the device could be accessed remotely from anywhere. One of the main advantages is its low latency, as the data shown in the web page comes directly from the device without any processing. On the other hand, it is a solution that requires a high programming skill level and additionally, due to the immutable nature of the firmware, every change in a dashboard requires code recompilation and firmware reflashing. Furthermore, embedding a web server or a Bluetooth stack within the device can be resource-intensive. This may limit the device's capabilities or require a more powerful microcontroller, increasing both cost and complexity. 3. Send data to an external system with plotting capabilities IoT devices can send data to external systems using different protocols, such as