/********* Pleasedontcode.com **********
Pleasedontcode thanks you for automatic code generation! Enjoy your code!
- Terms and Conditions:
You have a non-exclusive, revocable, worldwide, royalty-free license
for personal and commercial use. Attribution is optional; modifications
are allowed, but you're responsible for code maintenance. We're not
liable for any loss or damage. For full terms,
please visit pleasedontcode.com/termsandconditions.
- Project: "Potentiometer Display"
- Source Code NOT compiled for: Arduino Pro Mini 3.3V
- Source Code created on: 2024-10-01 20:39:01
********* Pleasedontcode.com **********/
/****** SYSTEM REQUIREMENTS *****/
/****** SYSTEM REQUIREMENT 1 *****/
/* read and provide pot value via wifi */
/****** SYSTEM REQUIREMENT 2 *****/
/* if main code is too long so split code in other */
/* files. */
/****** END SYSTEM REQUIREMENTS *****/
/****** DEFINITION OF LIBRARIES *****/
#include // https://github.com/Tvde1/WiFiPicker
#include "PotentiometerReader.h" // Include the PotentiometerReader header
/****** FUNCTION PROTOTYPES *****/
void setup(void);
void loop(void);
/***** DEFINITION OF ANALOG INPUT PINS *****/
const uint8_t pot_Potentiometer_Vout_PIN_A0 = A0;
/****** DEFINITION OF LIBRARIES CLASS INSTANCES*****/
// Initialize the WiFiPicker object
WiFiPicker wifiPicker; // Create an instance of WiFiPicker
PotentiometerReader potReader(pot_Potentiometer_Vout_PIN_A0); // Create an instance of PotentiometerReader
void setup(void)
{
// Start the WiFiPicker service
wifiPicker.start(); // Call the start method of WiFiPicker
Serial.begin(115200); // Start serial communication for debugging
}
void loop(void)
{
// Read the potentiometer value
int potValue = potReader.readValue(); // Get the potentiometer value
// Print the potentiometer value to the Serial Monitor
Serial.print("Potentiometer Value: ");
Serial.println(potValue);
delay(1000); // Delay for a second before the next reading
}
/* END CODE */