(SOLVED) ESP8266 + level shifter non comunica


salve,
ancora una volta mi servirebbe una mano da parte della comunity.
sto cercando di fare dei test col modulo esp8266 esp01 (quello con solo 2 gpio), per alimentarlo uso un level shifter 5 - 3.3 v.

ho usato questo schema di cablaggio un po' modificato, perche' il mio modello prevede di alimentare sia il lato 5v che il lato 3.3v sui pin centrali e rimangono quattro pin per il level shiting, die dx e due sx.
ho provato col multimetro e il level shifter funziona correttamente. se 5v in uno dei 4 pin laterali, dall'altra parte leggo 3.25v
ho scaricato questa libreria. nello specifico, provando l'esempio ip il cui codice è questo:

code: [select]
#include <arduino.h>
#include <softwareserial.h>
#include <esp8266_simple.h>

// these ssid , password connect wifi network
#define esp8266_ssid  "miossid"
#define esp8266_pass  "miapass"

esp8266_simple wifi(8,9);

// see helloworld example further comments.

void setup()
{  
  serial.begin(115200); // reduce if arduino has trouble talking fast
  serial.println("esp8266 demo sketch");

  wifi.begin(9600);  
  wifi.setupaswifistation(esp8266_ssid, esp8266_pass, &serial);    
  
  // blank line debug formatting
  serial.println();
}

void loop()
{
  
  // example show how grab ip address of your
  //  device after has connected, in case want with
  //  it.
  
  // can either 16 byte string, or long unsigned integer
  // representation.  
  
  char          ipaddressstring[16]; // 16 bytes needed
  unsigned long ipaddresslong;       // 4 bytes needed
  
  // either way, address same.
  wifi.getipaddress(ipaddressstring);
  wifi.getipaddress(ipaddresslong);
  
  // , it.
  serial.print("the string ip is: ");
  serial.println(ipaddressstring);  
  serial.print("the unsigned long ip is: ");
  serial.println(ipaddresslong);
  
  // can convert 1 other
  strcpy(ipaddressstring,"127.0.0.1");    
  wifi.ipconvertdatatypefromto(ipaddressstring,ipaddresslong);  
  serial.print("the ip address ");      serial.print(ipaddressstring);
  serial.print(" has integer value ");  serial.println(ipaddresslong);
  
  ipaddresslong = 0x36f1256b;
  wifi.ipconvertdatatypefromto(ipaddresslong,ipaddressstring);    
  serial.print("the integer value ");  serial.print(ipaddresslong);
  serial.print(" has ip address ");    serial.println(ipaddressstring);
    
  serial.println("end of demo");  
  serial.println();
  delay(5000);  
}


ma non funziona.
la seriale mi restituisce
reset: general error in loop.

il led del modulo wifi diventa rosso , quindi suppongo che si accenda correttamente e poi quando è acceso nella rete vedo un dispositivo ai-thinker xx che compare e mi ci posso connettere con un certo ip.
il problema sembra essere la comunicazione.
qualcuno puo' aiutarmi ?

questo è lo schema.
l'unica differenza come vedete nel post prima, sta nella marca del level shifter.



mi sono accorto col multimetro che lavora in modo strano. ovvero leggo sempre 5v da una parte e 3.3 v dall'altra, su tutti piedini, anche se scollegati o anche se lo stato logico dovrebbe essere 0-
e' normale?


Arduino Forum > International > Italiano > Hardware (Moderator: leo72) > (SOLVED) ESP8266 + level shifter non comunica


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor