1/39
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the default MQTT communication ports?
a) 80 and 443
b) 1883 and 8883
c) 21 and 22
d) 110 and 995
d) 110 and 995
In MQTT, which device typically acts as the central communication hub?
a) Sensor
b) Publisher
c) Broker
d) Subscriber
c) Broker
Which function in PubSubClient is used to connect to the MQTT broker?
a) mqtt.begin()
b) client.connect()
c) connectMQTT()
d) mqtt.start()
b) client.connect()
What is a “topic” in MQTT terminology?
a) A type of sensor
b) A unique ID for each ESP32
c) A channel to send and receive messages
d) The IP address of the border
c) A channel to send and receive messages
In a typical ESP32 MQTT setup, which connection is established first?
a) MQTT
b) WiFi
c) Serial
d) BLE
b) WiFi
What is a possible reason for client.connect() returning false?
a) Incorrect topic format
b) Wrong WiFi credentials
c) Broker nor reachable
d) Delay() function missing
c) Broker nor reachable
Which part of MQTT handles routing of published messages?
a) ESP32
b) Callback function
c) Topic
d) Broker
d) Broker
Which keyword defines an MQTT subscription in PubSubClient?
a) listen()
b) subscribe()
c) observe()
d) connect()
b) subscribe()
What is the main reason to use MQTT instead of HTTP in IoT?
a) Supports encryption
b) Lightweight and real-time
c) Simpler code
d) Uses more bandwidth
b) Lightweight and real-time
Which HTTP method is used to retrieve data from a server?
a) POST
b) PUT
c) GET
d) PUSH
c) GET
What must be called after an HTTP request to release memory on ESP32?
a) http.stop()
b) http.close()
c) http.disconnect()
d) http.free()
a) http.stop()
What does HTTP status code 200 mean?
a) Server not found
b) Request accepted but no response
c) Success
d) Forbidden
c) Success
Which function gets the response payload from a server after a request?
a) http.getText()
b) http.read()
c) http.getResponse()
d) http.getString()
d) http.getString()
What might cause http.begin() to fail?
a) Bad WiFi password
b) Invalid URL
c) Missing Serial.begin()
d) Low battery
b) Invalid URL
Which data types should be used to hold HTTP response content?
a) int
b) json
c) String
d) bool
c) String
What can you use to delay requests to prevent server overload?
a) WiFI.sleep()
b) delay(1000)
c) esp.restart()
d) http.pause()
b) delay(1000)
What kind of data is best sent using URL parameters in a GET request?
a) Login credentials
b) Temperature values
c) Password reset tokens
d) File uploads
b) Temperature values
To read JSON from a server, which Arduino library is commonly used?
a) WiFiClientSecure
b) Arduinojson
c) ESPAsyncWebServer
d) JsonSerial
b) Arduinojson
What is a possible risk of frequent HTTP requests without delay on ESP32?
a) Faster response
b) Memory overflow
c) Reduced WiFi signal
d) JSON corruption
b) Memory overflow
What should you always do before calling http.GET() or http.POST()?
a) Check MAC address
b) Print local IP
c) Call http.begin
d) Call http.stop()
c) Call http.begin
In which mode does the ESP32 connect to a router like a regular client device?
a) Access Point
b) Station
c) Wi-Fi Direct
d) Bridge
b) Station
What is the main advantage of using the ESP32 in Station mode (STA)?
a) It connects multiple devices to each other
b) It provides the fastest data rate
c) It allows internet access through a router
d) It avoids the need for a password
c) It allows internet access through a router
What does the ESP32 act as when in Access Point (AP) mode?
a) DNS Server
b) Local client
c) Router
d) Web browser
c) Router
What is a benefit of Wi-Fi Direct on ESP32?
a) Supports OTA updates
b) Provides long-range connectivity
c) Enables fast peer-to-peer data transfer
d) Connects to cellular networks
c) Enables fast peer-to-peer data transfer
Which mode enables the ESP32 to connect to the internet and provide a local network at the same time?
a) STA
b) AP
c) STA + AP
d) Wi-Fi Direct
c) STA + AP
Before using Firebase in your ESP32 code, what must you initialize?
a) Serial
b) Firebase.begin()
c) FirebaseHost()
d) WiFi.scan()
b) Firebase.begin()
What are the two key strings required to connect ESP32 to Firebase Realtime Database?
a) SSID and Password
b) Firebase URL and API Key
c) Database URL and Firebase Secret
d) MAC Address and Port
c) Database URL and Firebase Secret
In Firebase Realtime Database, data is structured as:
a) Relational tables
b) Arrays
c) JSON tree
d) Key-value flat files
c) JSON tree
Which method is used to read an integer from Firebase?
a) Firebase.get()
b) Firebase.getInt()
c) Firebase.readInt()
d) Firebase.pullInt()
b) Firebase.getInt()
Firebase’s REST API works over which protocol?
a) FTP
b) MQTT
c) HTTP/HTTPS
d) WebSocket only
c) HTTP/HTTPS
To send a float value to Firebase, you would use:
a) Firebase.setFloat()
b) Firebase.postFloat()
c) Firebase.setNumber()
d) Firebase.writeFloat()
a) Firebase.setFloat()
What happens if you write data to a non-existing path in Firebase?
a) Error
b) Firebase ignores it
c) It creates new path
d) ESP32 disconnects
c) It creates new path
What is the correct data format for Firebase.setJSON() input?
a) Plain string
b) Arduino JsonObject
c) char[]
d) int[]
b) Arduino JsonObject
Why should you avoid deeply nested paths in Firebase with ESP32?
a) JSON can’t handle them
b) Arduino can’t parse it
c) It increase memory usage
d) Firebase doesn’t support nested data
c) It increase memory usage
What is the proper path format when accessing nested data in Firebase?
a) “sensor->temperature”
b) “sensor/temperature”
c) “sensor.temperature”
d) “sendor|temperature”
b) “sensor/temperature”
Which communication protocol is supported by ESP32 for sensor interfacing?
a) 12C
b) SPI
c) UART
d) All of the above
d) All of the above
What does the analogRead() function return on the ESP32?
a) Voltage (0-5V)
b) Digital HIGH or LOW
c) Integer value
d) String values
c) Integer value
Which sensor would you use to detect motion?
a) MQ-2
b) DHT22
c) PIR
d) BMP180
c) PIR
What is the purpose of an 12C address in sensor communication?
a) To uniquely identify each device on the bus
b) To allow multiple ESP32 to communicate
c) To enable communication between sensors
d) To provide more power for sensors
a) To uniquely identify each device on the bus
Which sensor would you use to detect the intensity of light?
a) BMP180
b) MQ-2
c) LDR
d) DHT11
c) LDR