This commit is contained in:
Make It Smart
2023-03-16 11:50:49 +03:00
parent b8c08aec9a
commit 326a4d7a13
3 changed files with 12 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@@ -0,0 +1 @@
https://youtu.be/yxsz6cjm-5I

View File

@@ -150,6 +150,16 @@ void connectToWifi() {
WiFi.config(staticIP, gateway, subnet, dns, dns2); WiFi.config(staticIP, gateway, subnet, dns, dns2);
WiFi.mode(WIFI_STA); WiFi.mode(WIFI_STA);
//If you are using the device with a powerbank, You can uncomment the ones you want to use to reduce power consuption of the project.
//The default value is 20dbm and it's power consuption is 100mW.
//when you reduce the output power it's connection range also will reduce. So you need to decide optimum value by trying yourself
//WiFi.setOutputPower(20); // Set to 20 dBm (100 mW) (default value)
//WiFi.setOutputPower(18); // Set to 18 dBm (63 mW)
//WiFi.setOutputPower(12); // Set to 12 dBm (16 mW)
//WiFi.setOutputPower(6); // Set to 6 dBm (4 mW)
WiFi.begin(ssid, password); WiFi.begin(ssid, password);
int counter = 0; int counter = 0;
@@ -274,7 +284,7 @@ void read_encoder() {
void resetEncoder() { void resetEncoder() {
motor_position_counter = 0; motor_position_counter = 0;
saveMotorPosition(); saveMotorPosition();
httpServer.send(200, "text/plain", "Ok."); httpServer.send(200, "text/plain", "Ok.");
} }