This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package br.ufscar.dc.dsw; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
public class AcessaBD { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import io.vavr.control.Option; | |
import jakarta.servlet.http.HttpServletRequest; | |
import jakarta.servlet.http.HttpServletResponse; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.util.logging.Logger; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example; | |
import jakarta.servlet.ServletException; | |
import jakarta.servlet.annotation.WebServlet; | |
import jakarta.servlet.http.HttpServlet; | |
import jakarta.servlet.http.HttpServletRequest; | |
import jakarta.servlet.http.HttpServletResponse; | |
import io.vavr.control.Option; | |
import java.io.IOException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include <Firebase_ESP_Client.h> | |
#include <addons/TokenHelper.h> | |
#include <addons/RTDBHelper.h> | |
// configurações da rede WI-FI | |
#define WIFI_SSID "" | |
#define WIFI_PASSWORD "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <PubSubClient.h> | |
#include <WiFi.h> | |
const char* ssid = "Wokwi-GUEST"; | |
const char* password = ""; | |
const char *mqtt_broker = "broker.mqttdashboard.com"; | |
const char *topic = "arthunix"; | |
const char *mqtt_username = "arthunix"; | |
const char *mqtt_password = "arthunix"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "DHT.h" | |
#include <WiFi.h> | |
#include <PubSubClient.h> | |
#include <ArduinoJson.h> | |
#define DHTTYPE DHT22 | |
#define DHTPIN 4 | |
DHT dht(DHTPIN, DHTTYPE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "DHT.h" | |
#include <WiFi.h> | |
#include <PubSubClient.h> | |
#define DHTTYPE DHT22 | |
#define DHTPIN 4 | |
DHT dht(DHTPIN, DHTTYPE); | |
const char* ssid = "Wokwi-GUEST"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
#include "time.h" | |
const char* ssid = "Wokwi-GUEST"; | |
const char* password = ""; | |
const char* ntpServer1 = "pool.ntp.org"; | |
const char* ntpServer2 = "time.nist.gov"; | |
const long gmtOffset_sec = -10800; | |
const int daylightOffset_sec = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WiFi.h> | |
// configura o nome e a senha do wifi | |
const char* ssid = "Wokwi-GUEST"; | |
const char* password = ""; | |
int ledPin = 2; | |
WiFiServer server(80); | |
void setup() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int ledPin = 2; | |
// the setup function runs once when you press reset or power the board | |
void setup() { | |
pinMode(ledPin, OUTPUT); | |
} | |
// the loop function runs over and over again forever | |
void loop() { | |
digitalWrite(ledPin, HIGH); |