The ESP-WROOM-32 is a low-power communication module that combines Wi-Fi and Bluetooth. It has an appearance similar to the NodeMCU, and the specification is as follows.
There is the pin out of ESP-WROOM-32.
You can add it by using the unofficial board URL for use in the Arduino IDE environment, and install it in the board manager.
int pinNum = 34; int distance = 0; void setup() { Serial.begin(9600); pinMode (pinNum, INPUT); } void loop() { int data = analogRead(pinNum); int volt = map(data, 0, 1023, 0, 5000); distance = 27/(volt-0.17)*1000; Serial.println(distance); delay(50); }
Leave a Reply
You must be logged in to post a comment.