Servo sterowanie Esp8266

Masz pomysł na funkcjonalność lub koncepcję na rozwój projektu. Opisz wszystko tutaj.
Awatar użytkownika
Duch__
Posty: 1779
Rejestracja: śr sie 24, 2016 7:26 pm
Lokalizacja: Opole

I get something like this and I don't know why it doesn't connect to WIFI after the reset. I selected my WIFI ssid and writed only password.

Kod: Zaznacz cały

*WM: [2] <- HTTP WiFi save  
*WM: [3] Method: POST
*WM: [2] Parameters 
*WM: [2] -------------------- 
*WM: [2] server: svrX.supla.org
*WM: [2] email: my@email.pl
*WM: [2] name: Dimmer
*WM: [2] status: SuplaDevice initialized
*WM: [2] -------------------- 
*WM: [3] Sent wifi save page 
*WM: [2] process connect 
*WM: [2] Connecting as wifi client... 
*WM: [1] STA static IP:
*WM: [2] setSTAConfig static ip not set 
*WM: [3] WIFI station disconnect 
*WM: [1] CONNECTED:
*WM: [1] Connecting to NEW AP: ssid
*WM: [3] Using Password: password
*WM: [3] WiFi station enable 
*WM: [3] enableSTA PERSISTENT ON 
*WM: [1] connectTimeout not set, ESP waitForConnectResult... 
local IP: 192.168.2.122
subnetMask: 255.255.255.0
gatewayIP: 192.168.2.1
Signal Strength (RSSI): -56 dBm
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] Connect to new AP [SUCCESS] 
*WM: [1] Got IP Address: 
*WM: [1] 192.168.2.122 
Should save config
*WM: [2] disconnect configportal 
*WM: [2] restoring usermode STA
*WM: [2] wifi status: WL_CONNECTED
*WM: [2] wifi mode: STA
*WM: [1] config portal exiting 
connected...yeey :)
saving config
{
  "Supla_server": "svrX.supla.org",
  "Email": "my@email.pl",
  "Supla_name": "Dimmer"
}config saved
wifi Station disconnected

 ets Jan  8 2013,rst cause:2, boot mode:(3,2)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
vac02aff5
~ld
⸮
GUID : XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AUTHKEY : YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
mounted file system
reading config file
opened config file
{"Supla_server":"svrX.supla.org","Email":"my@email.pl","Supla_name":"Dimmer"}
parsed json
Pos: 0
Using protocol version 8
Obrazek
elmaya
Posty: 1482
Rejestracja: śr cze 27, 2018 5:48 pm
Lokalizacja: El Saucejo - Sevilla

for me It looks like this.

Kod: Zaznacz cały

GUID : xxxxxxxx
AUTHKEY : xxxxxxxx
mounted file system
reading config file
opened config file
{"Supla_server":"beta-cloud.supla.org","Email":"mail@mail.com","Supla_name":"Servo"}
            parsed json
Pos: 0
in begin
Using protocol version 8
local IP: 192.168.1.106
subnetMask: 255.255.255.0
gatewayIP: 192.168.1.1
Signal Strength (RSSI): -29 dBm
Establishing connection with: beta-cloud.supla.org (port: 2015)
Connected
What Supla library do you use?
have you tried with the compiled version?
elmaya
Posty: 1482
Rejestracja: śr cze 27, 2018 5:48 pm
Lokalizacja: El Saucejo - Sevilla

Duch__ pisze: wt sty 14, 2020 11:10 pm I get something like this and I don't know why it doesn't connect to WIFI after the reset. I selected my WIFI ssid and writed only password.

Kod: Zaznacz cały

*WM: [2] <- HTTP WiFi save  
*WM: [3] Method: POST
*WM: [2] Parameters 
*WM: [2] -------------------- 
*WM: [2] server: svrX.supla.org
*WM: [2] email: my@email.pl
*WM: [2] name: Dimmer
*WM: [2] status: SuplaDevice initialized
*WM: [2] -------------------- 
*WM: [3] Sent wifi save page 
*WM: [2] process connect 
*WM: [2] Connecting as wifi client... 
*WM: [1] STA static IP:
*WM: [2] setSTAConfig static ip not set 
*WM: [3] WIFI station disconnect 
*WM: [1] CONNECTED:
*WM: [1] Connecting to NEW AP: ssid
*WM: [3] Using Password: password
*WM: [3] WiFi station enable 
*WM: [3] enableSTA PERSISTENT ON 
*WM: [1] connectTimeout not set, ESP waitForConnectResult... 
local IP: 192.168.2.122
subnetMask: 255.255.255.0
gatewayIP: 192.168.2.1
Signal Strength (RSSI): -56 dBm
*WM: [2] Connection result: WL_CONNECTED
*WM: [3] lastconxresult: WL_CONNECTED
*WM: [1] Connect to new AP [SUCCESS] 
*WM: [1] Got IP Address: 
*WM: [1] 192.168.2.122 
Should save config
*WM: [2] disconnect configportal 
*WM: [2] restoring usermode STA
*WM: [2] wifi status: WL_CONNECTED
*WM: [2] wifi mode: STA
*WM: [1] config portal exiting 
connected...yeey :)
saving config
{
  "Supla_server": "svrX.supla.org",
  "Email": "my@email.pl",
  "Supla_name": "Dimmer"
}config saved
wifi Station disconnected

 ets Jan  8 2013,rst cause:2, boot mode:(3,2)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
vac02aff5
~ld
⸮
GUID : XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AUTHKEY : YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
mounted file system
reading config file
opened config file
{"Supla_server":"svrX.supla.org","Email":"my@email.pl","Supla_name":"Dimmer"}
parsed json
Pos: 0
Using protocol version 8
Surely you have selected a Flash size without SPIFFS and this is necessary to store credentials.
doing tests I have noticed that if I do not erase the flash of the module it tries to connect with the blank credentials and that effect occurs.
To avoid blocking I have changed these two lines of the code.

Kod: Zaznacz cały

char Supla_server[81]=("Unknown server address");   //  it was before     char Supla_server[81];
char Email[81]=("Unknown email address");                 //  it was before      char Email[81];
Awatar użytkownika
Duch__
Posty: 1779
Rejestracja: śr sie 24, 2016 7:26 pm
Lokalizacja: Opole

Everything is OK now. I forgot about "v2 Higher Bandwitch". My mistake.
Obrazek
Awatar użytkownika
byniom
Posty: 640
Rejestracja: sob sty 07, 2017 1:17 pm

Czy można jakoś ustawić aby servo pracowało w zakresie od 0 do 50% przy korzystaniu z ustawień on off ?
elmaya
Posty: 1482
Rejestracja: śr cze 27, 2018 5:48 pm
Lokalizacja: El Saucejo - Sevilla

byniom pisze: czw sty 23, 2020 12:15 pm Czy można jakoś ustawić aby servo pracowało w zakresie od 0 do 50% przy korzystaniu z ustawień on off ?
edytuj ten wiersz:
int pos = map(_brightness, 0, 100, 0,180);
gdzie 0,180 to pozycja minimalna i maksymalna.
int pos = map(_brightness, 0, 100, 0,90);
dla minimum 0 i maksymalnie 90 (50%)

Kod: Zaznacz cały

void set_rgbw() {
    int pos = map(_brightness, 0, 100, 0,90);  // from 0 to 50%
      Serial.print("Pos: "); Serial.println(pos); 
      myservo.write(pos);              // tell servo to go to position in variable 'pos'
    
}
Awatar użytkownika
byniom
Posty: 640
Rejestracja: sob sty 07, 2017 1:17 pm

Dziekuję :)
Piotr682
Posty: 5
Rejestracja: pt sie 04, 2017 4:05 pm

Dzień dobry
Soft przydatny, fajnie działa jednak mam drobny problem, mianowicie po skompilowaniu w Arduino IDE i wgraniu softu po kilku godzinach urządzenie rozłącza się i ma problem z ponownym połączeniem (próby połączenie z serwerem widać w terminalu) po resecie łączy się natychmiast jednak bez niego nie nawiązuje połączenia.Prosiłbym o sugestie gdzie popełniam błąd
1.jpg
1.jpg (160.44 KiB) Przejrzano 3201 razy
elmaya
Posty: 1482
Rejestracja: śr cze 27, 2018 5:48 pm
Lokalizacja: El Saucejo - Sevilla

are you using this code?

viewtopic.php?p=58473#p58473
Piotr682
Posty: 5
Rejestracja: pt sie 04, 2017 4:05 pm

Tak, tego. Skompilowany (gotowiec) download/file.php?id=9045soft wgrany po skonfigurowaniu pracuje poprawnie regularnie wysyla
3.jpg
3.jpg (325.49 KiB) Przejrzano 3177 razy

natomiast skompilowany w Aduino IDE po konfiguracji wifi łączy się a po jakimś czasie
2.jpg
2.jpg (194.5 KiB) Przejrzano 3177 razy


biblioteki https://github.com/SUPLA/arduino/tree/develop
https://github.com/bblanchon/ArduinoJson/tree/v5.13.2
Wifimanager-development
esp8266TrueRandom
Arduino 1.8.10
ODPOWIEDZ

Wróć do „Pomysły i koncepcje”