ESP8266 First Examples and Advices [DHT,DS18B20,LDR,PWM,EMONLIB]

3,874 views
Skip to first unread message

Juan Pinto

unread,
May 25, 2015, 5:53:20 PM5/25/15
to sou...@googlegroups.com
First steps for using Arduino IDE + ESP
 
(Thank You Dario)
This is the procedure from the Arduino/ESP8266 Github
  • Install Arduino 1.6.4 from the Arduino website.
  • Start Arduino and open Perferences window.
  • Enter http://arduino.esp8266.com/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
  • Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
Once done, install manually (not from the library manager) souliss friariello-porting
-------------------------------------------------------------------------------------------
This page is very usefull, most of the info explained here is related to the readme.md
 
To use this integration and examples you need to download some libraries.
  
DHT Integration:
-Example
 // Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/DynamicAddressing.h"         // Use dynamic addressing
//#include "conf/DisableEEPROM.h"


// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"    


// Include framework code and libraries
//#include <SPI.h>
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"


// Include and Configure DHT11 SENSOR
#include "DHT.h"
#define DHTPIN 13     // what pin we're connected to
#define DHTTYPE DHT11   // DHT 11
DHT dht
(DHTPIN, DHTTYPE, 15);


// This identify the number of the LED logic
#define TEMPERATURE         0
#define HUMIDITY            2


void setup()
{  
   
Initialize();
   
   
Serial.begin(115200);
   
Serial.println("DHTxx test!");
    dht
.begin();
   
   
// Connect to the WiFi network and get an address from DHCP
   
Setup_ESP8266();                          
   
SetAsGateway(myvNet_esp8266);       // Set this node as gateway for SoulissApp  
   
SetAddressingServer();
   
// This node will serve all the others in the network providing an address
   
   
Set_Temperature(TEMPERATURE);
   
Set_Humidity(HUMIDITY);
}


void loop()
{
   
// Here we start to play
    EXECUTEFAST
() {                    
        UPDATEFAST
();  
       
        FAST_2110ms
()
       
{
           
Logic_Temperature(TEMPERATURE);
           
Logic_Humidity(HUMIDITY);
       
}
             
       
// Here we handle here the communication with Android
        FAST_GatewayComms
();                                        
   
}
    EXECUTESLOW
() {
 UPDATESLOW
();


            SLOW_10s
() {  
   
// Read temperature and humidity from DHT every 10 seconds  
           
float h = dht.readHumidity();
             
// Read temperature as Celsius
             
float t = dht.readTemperature();
             
             
// Check if any reads failed and exit early (to try again).
             
if (isnan(h) || isnan(t) || isnan(f)) {
               
Serial.println("Failed to read from DHT sensor!");
               
//return;
             
}
           
             
Serial.print("Humidity: ");
             
Serial.print(h);
             
Serial.print(" %\t");
             
Serial.print("Temperature: ");
             
Serial.print(t);
             
Serial.print(" *C ");


             
             
Souliss_ImportAnalog(memory_map, TEMPERATURE, &t);
           
Souliss_ImportAnalog(memory_map, HUMIDITY, &h);
           
}
   
}
}    

-Wiring. You can power from 3.3v directly the DHT and connect DATA to any PIN. 
 
Dallas Integration
In most cases OneWire library isn't on the Arduino IDE or have an Older version, be sure to download the ESP one: https://github.com/esp8266/Arduino/tree/esp8266/libraries/OneWire
- Example: 
// Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/DynamicAddressing.h"         // Use dynamic addressing


// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"    


// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"


// This identify the number of the SLOT logic
#define DALLAS              0


#include <OneWire.h>
#include <DallasTemperature.h>
#define DALLASPIN 4 //Se declara el pin donde se conectará la DATA
OneWire ourWire(DALLASPIN); //Se establece el pin declarado como bus para la comunicación OneWire
DallasTemperature sensors(&ourWire); //Se instancia la librería DallasTemperature


void setup()
{  
   
Initialize();
   
   
Serial.begin(115200);


    sensors
.begin(); //Se inician los sensores DS18B20
   
// Connect to the WiFi network and get an address from DHCP
   
Setup_ESP8266();                          
   
SetAsGateway(myvNet_esp8266);       // Set this node as gateway for SoulissApp  


   
Set_Temperature(DALLAS);
}


void loop()
{
    EXECUTEFAST
() {                    
        UPDATEFAST
();  


        FAST_910ms
()    {
         
// Acquire temperature from the microcontroller ADC
          sensors
.requestTemperatures(); //Prepara el sensor para la lectura
         
float dallas = sensors.getTempCByIndex(0);
         
Souliss_ImportAnalog(memory_map, DALLAS, &dallas);
       
}      


        FAST_2110ms
()
       
{
           
Logic_Temperature(DALLAS);
       
}
         
// Here we handle here the communication with Android
        FAST_GatewayComms
();                                        
   
}
}

- Wiring. You can power with 3.3v. You need a 4k7 resistor from VCC to DATA PIN, you can use any pin.
 
EmonLib Integration

Due the limitations on the ADC pin I'll use an ATTINY to get the data and send via SoftwareSerial to the ESP, so first steps needs to be done before.
Load the sketch to Attiny:
 
  • Start Arduino and Load the Arduino as ISP example to an Arduino (any of them)
  • Connect to the Attiny following this scheme:

  • ​Open Perferences window.
  • Enter https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas. Note: I've an error if I put the esp and the attiny separated by comma, but you can add the attiny and when its programmed leave only the ESP one.
  • Open Boards Manager from Tools > Board menu and install attiny platform (and don't forget to select your Attiny 1mhz Internal Clock board from Tools > Board menu after installation).
  • Select on Tools Arduino as ISP 
  • Load this sketch to the Attiny:
  • Sketch Attiny: 
#include <SoftwareSerial.h>
#include "EmonLib.h"             // Include Emon Library
EnergyMonitor emon1;             // Create an instance


SoftwareSerial TinySerial(3, 4); // RX, TX
#define LED 1
#define CT  A1


void setup()  
{
 
// Open serial communications and let us know we are connected
 
TinySerial.begin(9600);  // SET TO 1200 ON RECEIVER, I DONT KNOW WHY
 pinMode
(LED, OUTPUT);
 emon1
.current(CT, 10);       // Current: input pin, calibration.
}


void loop()
{
 
float current = emon1.calcIrms(1480);
 
TinySerial.print(current);
  delay
(100);
  digitalWrite
(LED,!digitalRead(LED));
}

The Current Sensor I use is SCT-013-000 and connecto to the PIN A1 of the Attiny using this scheme:

​Where RVD = 10kohm and Burden is 220ohm.
3.3v on vIn for Attiny is ok and does not affect to the meassure. I added a Activity led on pin 1 of Attiny, but this is optional.
Serial TX from the Attiny is on Pin 4 and must be connected to the RX from ESP.
Now on ESP we need to use for debug purposes the Serial1 (TX on GPIO2) and the Standard Serial Pins to receive data from Attiny, only the RX pin is used.  Note: This Serial1 only trasmit.
 
Due the ESP GPIO2 must be connected to GND to load sketches and the RX must be released from the Attiny before load a sketch I added a jumper, I'll use the same jumper to connect both, with this solution we avoid possible problems when we are loading sketches to the ESP.
 
And finally this is the example for ESP that reads the meassurement from attiny and push to Souliss
ESP example
 // Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/DynamicAddressing.h"         // Use dynamic addressing


// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"    

// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"

// This identify the number of the LED logic
#define CURRENT             0
#define WATTS               2

void setup()
{  
   
Initialize();
   
   
Serial.begin(9600);
   
Serial1.begin(115200);

   
// Connect to the WiFi network and get an address from DHCP
   
Setup_ESP8266();                          
   
SetAsGateway(myvNet_esp8266);       // Set this node as gateway for SoulissApp  

   
// This node will serve all the others in the network providing an address
   
   
Set_Current(CURRENT);
   
Set_Power(WATTS);
}


void loop()
{
   
    EXECUTEFAST
() {                    
        UPDATEFAST
();  
       
        FAST_510ms
()    {
           
Logic_Current(CURRENT);
           
Logic_Power(WATTS);
       
}
        FAST_710ms
()    {
           
float current = 0;
           
if(Serial.available()){
               
float current = Serial.parseFloat();
               
Serial1.println(current);
               
               
Souliss_ImportAnalog(memory_map, CURRENT, &current);
               
float watt = current*230;
               
Souliss_ImportAnalog(memory_map, WATTS, &watt);
           
}
       
}
       
// Here we handle here the communication with Android
        FAST_GatewayComms
();                                        
   
}
}    
 
 
Lux Integration
-Library:  No library needed, just a function to map values on example.
-Wiring: ADC pin from ESP have a range from 0 to 1v, so we need to use a voltage divider to down the range from 3.3v to 1, I tried with 220ohm and 100ohm resistors (1.031v) and works well.
-Scheme:  (Sorry by this, I explain better if needed)
3.3v --- 220ohm ---- LDR ---- 100 ohm ----- GND
                             LDR ----  -  ADC ----- 10kohm ------ GND
- Example:
// Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/DynamicAddressing.h"         // Use dynamic addressing


// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"    


// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"


// This identify the number of the LED logic
#define LDR                 0


#define SensorLDR_pin   A0


//NUEVA FUNCION PARA LEER LDR Y PASARLO A KLUX:


// Light calibration data
// out[] holds the values wanted in lux/10
static const unsigned int out[] = { 7, 30, 45, 65, 150, 300, 450, 2100, 13000};  // x10  //ULTIMO VALOR REFERENCIA
static const unsigned int in[]  = { 100, 350, 430, 500, 680, 780, 950, 1005, 1024 };  // 0 - 1024


void setup()
{  
   
Initialize();
   
   
Serial.begin(115200);


   
// Connect to the WiFi network and get an address from DHCP
   
Setup_ESP8266();                          
   
SetAsGateway(myvNet_esp8266);       // Set this node as gateway for SoulissApp  


   
// This node will serve all the others in the network providing an address
   
Set_T54(LDR);
}


void loop()
{
   
    EXECUTEFAST
() {                    
        UPDATEFAST
();  
       
        FAST_2110ms
()
       
{
           
Logic_T54(LDR);
       
}
       
        FAST_7110ms
()
       
{
             
float ldr_read = get_lux(in, out, 16)/10.0;  //ORIGINAL
             
if (ldr_read == 0) ldr_read = 0.01;
             
Souliss_ImportAnalog(memory_map, LDR, &ldr_read);
       
}
       
       
// Here we handle here the communication with Android
        FAST_GatewayComms
();                                        
   
}
}    
   
   
//////////////////////////////////////////////////////////////////////////////
// Calculate lux based on rawADC reading from LDR returns value in lux/10
//////////////////////////////////////////////////////////////////////////////
int get_lux(const unsigned int* _in, const unsigned int* _out, byte size)
{
 
       
// take care the value is within range
 
// val = constrain(val, _in[0], _in[size-1]);


 
int val = analogRead(A0);
       
Serial.print("AnalogRead: ");
       
Serial.println(val);
 
if (val <= _in[0]) return _out[0];
 
if (val >= _in[size-1]) return _out[size-1];


 
// search right interval
 
byte pos = 1;  // _in[0] allready tested
 
while(val > _in[pos]) pos++;


 
// this will handle all exact "points" in the _in array
 
if (val == _in[pos]) return _out[pos];


 
// interpolate in the right segment for the rest
 
return map(val, _in[pos-1], _in[pos], _out[pos-1], _out[pos]);
}


PWM Integration
Library: No library needed, just use the last core from the Boards Managed
Note: analogWrite(PIN, VALUE*4) Value on ESP It's 0-1024 range instead the 0-255 from the Arduino, just add *4  to send the right value.
Example:
// Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/DynamicAddressing.h"         // Use dynamic addressing


// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"    


// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"


// This identify the number of the SLOT logic
#define LEDPWM              9


//PWM pin
#define LEDPWMP 5


void setup()
{  
   
Initialize();
   
Serial.begin(115200);
   
// Connect to the WiFi network and get an address from DHCP
   
Setup_ESP8266();                          
   
SetAsGateway(myvNet_esp8266);       // Set this node as gateway for SoulissApp  


   
// This node will serve all the others in the network providing an address
   
Set_DimmableLight(LEDPWM);
   
    pinMode
(LEDPWMP, OUTPUT);


}


void loop()
{
   
    EXECUTEFAST
() {                    
        UPDATEFAST
();  
       
        FAST_50ms
() {   // We process the logic and relevant input and output every 50 milliseconds
           
Logic_DimmableLight(LEDPWM);                        
            analogWrite
(LEDPWMP, mOutput(LEDPWM+1)*4);
       
}


       
// Here we handle here the communication with Android
        FAST_GatewayComms
();                                        
   
}
    EXECUTESLOW
() {
 UPDATESLOW
();


            SLOW_10s
() {  // Read temperature and humidity from DHT every 110 seconds  
               
Timer_DimmableLight(LEDPWM);              
           
}            


   
}
}    

I hope this can help many people to get your nodes working easily.

Regards! :P

Juan Pinto

unread,
May 25, 2015, 9:12:14 PM5/25/15
to sou...@googlegroups.com
I have an error on LDR example, on the calling to the function:
             float ldr_read = get_lux(in, out, 16)/10.0;  //ORIGINAL
The 16 needs to be changed to 9 ( it's the size of in and out arrays )

I added a #define sizeofarray 9 before : 
             static const unsigned int out[] = { 7, 30, 45, 65, 150, 300, 450, 2100, 13000};  // x10  //ULTIMO VALOR REFERENCIA
And I changed the callng to the function like this:
             float ldr_read = get_lux(in, out, sizeofarray)/10.0;  //ORIGINAL

I'll upload the examples tomorron to GITHUB but can you edit the first post (Dario) and change the 16 with a 9?

Anyway this function isn't totally calibrated, I need some time to take more readings and make more accurate meassures.

Regards

Lesjaw Ardi™ ♂

unread,
May 26, 2015, 12:30:54 AM5/26/15
to sou...@googlegroups.com
Juan, do you have air conditioner node example? typical T32..

thank you

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/9ab76cdf-bf56-49b4-9c48-c3e2b23c9c16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Di Maio, Dario

unread,
May 26, 2015, 1:49:26 AM5/26/15
to sou...@googlegroups.com

Hi Juan,

A lot of useful information here!

Please consider that the reference branch is now friariello and friariello-porting, cause have been merged.

Thanks,
Dario.

From Mobile.

Di Maio, Dario

unread,
May 26, 2015, 8:44:59 AM5/26/15
to sou...@googlegroups.com
Hi Juan,

could you please try this sketch?

/**************************************************************************
    Souliss - Hello World
    
    This is the basic example, control one LED via a push-button or Android
    using SoulissApp (get it from Play Store).  
    
    Run this code on one of the following boards:
      - ESP8266 as SoC
        
***************************************************************************/

// Configure the framework
#include "bconf/MCU_ESP8266.h"                         
#include "conf/Gateway.h"                  

/*
  If you are using W5200 or ENC28J60, you just need to  change 
  the #include "conf/ethW5100.h" with   #include "conf/ethW5200.h" 
  or #include "conf/ethENC28J60.h"

  This assume that your SPI Chip Select (CS) is on pin 10 as in 
  most of the Ethernet shield.
*/

// Include framework code and libraries
#include <SPI.h>
#include "Souliss.h"

// This identify the number of the LED logic
#define MYLEDLOGIC          0               

// Define the network configuration according 
// to your router settings
uint8_t ip_address[4]  = {192, 168, 1, 77};
uint8_t subnet_mask[4] = {255, 255, 255, 0};
uint8_t ip_gateway[4]  = {192, 168, 1, 1};
#define Gateway_address 77
#define myvNet_address  ip_address[3]  
#define myvNet_subnet   0xFF00
#define myvNet_supern   Gateway_address

void setup()
{   
    Initialize();

     // Set network parameters
    Souliss_SetIPAddress(ip_address, subnet_mask, ip_gateway);
    SetAsGateway(myvNet_address);  
    
    // Define a simple LED light logic
    Set_SimpleLight(MYLEDLOGIC);        
    
    // We connect a pushbutton between 5V and pin2 with a 
    // pulldown resistor between pin2 and GND, the LED is 
    // connected to pin9 with a resistor to limit the 
    // current amount
    pinMode(2, INPUT);   // Hardware pulldown required
    pinMode(9, OUTPUT);  // Power the LED
}

void loop()
{ 
    // Here we start to play
    EXECUTEFAST() {                     
        UPDATEFAST();   
        
        // We process the logic and relevant input 
        // and output every 50 milliseconds
        FAST_50ms() {   
            // Use the pin2 as ON/OFF toggle command
            DigIn(2, Souliss_T1n_ToggleCmd, MYLEDLOGIC);  

            // Drive the LED as per command
            Logic_SimpleLight(MYLEDLOGIC);    

            // Use the pin9 to give power to the LED according to the logic
            DigOut(9, Souliss_T1n_Coil, MYLEDLOGIC);                
        } 
              
        // Here we handle here the communication
        FAST_GatewayComms();                                        
        
    }
} 

Juan Pinto

unread,
May 26, 2015, 10:24:36 AM5/26/15
to sou...@googlegroups.com
Ok, I'll try this night and share the results with BMP180 too... It's possible to edit my first post? or maybe a Wiki page or examples on github it's a better option?
 
Regards

dcarvetta

unread,
May 26, 2015, 11:08:25 AM5/26/15
to sou...@googlegroups.com
Juan, please explain this line, thanks.
What does mean "15" ?

DHT dht(DHTPIN, DHTTYPE, 15);
                                              ^
                                              ^
-----------------------------------------------

Juan Pinto

unread,
May 26, 2015, 11:51:46 AM5/26/15
to sou...@googlegroups.com
Its for faster MCU.
 
 
// NOTE: For working with a faster chip, like an Arduino Due or Teensy, you// might need to increase the threshold for cycle counts considered a 1 or 0.// You can do this by passing a 3rd parameter for this threshold. It's a bit// of fiddling to find the right value, but in general the faster the CPU the// higher the value. The default for a 16mhz AVR is a value of 6. For an// Arduino Due that runs at 84mhz a value of 30 works.// Example to initialize DHT sensor for Arduino Due:

 

And the value 15 is get from https://github.com/esp8266/Arduino Section: Other libraries (not included with the IDE):

DHT11 - initialize DHT as follows: DHT dht(DHTPIN, DHTTYPE, 15);

Regards

Di Maio, Dario

unread,
May 26, 2015, 11:54:01 AM5/26/15
to sou...@googlegroups.com
Could you please collect all these tested libraries as zip file?

Thanks,
Dario.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
May 26, 2015, 11:56:38 AM5/26/15
to sou...@googlegroups.com
Sure, I'll do when am in home.
 
Regards

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
May 26, 2015, 6:06:59 PM5/26/15
to sou...@googlegroups.com
I updated Souliss to the last github and the last ESP on Boards Manager, I tried to compile your sketch and get this on log:
In file included from F:\Mis Documentos\Arduino\___arduino-1.6.4\libraries\souliss/frame/vNet/vNet.h:52:0,
                 
from F:\Mis Documentos\Arduino\___arduino-1.6.4\libraries\souliss/Souliss.h:42,
                 
from sketch_may26a.ino:27:
F
:\Mis Documentos\Arduino\___arduino-1.6.4\libraries\souliss/frame/vNet/drivers/mcu_esp8266/ethESP8266/vNetDriver_eth.h:33:21: fatal error: WiFiUdp.h: No such file or directory
 
#include "WiFiUdp.h"

Im sure that WiFiUdp.h is on 
f:\Mis Documentos\Arduino\___arduino-1.6.4\libraries\WiFi\src\

I tried to compile the e08 and works ok.

You forget:  #include <ESP8266WiFi.h>, and:
// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"
 It loads and works ok on IP 77. :)

-------------------------------------------------------------------------------------------------------------------------------

And here is the zip with the libraries I use.

About the new library I can't use my examples :S

You must change this:
Setup_ESP8266();                           
SetAsGateway(myvNet_esp8266);

With this:
GetIPAddress();    
SetAsGateway(myvNet_dhcp);

Regards

El martes, 26 de mayo de 2015, 14:44:59 (UTC+2), Dario Di Maio escribió:
libraries.zip

Juan Pinto

unread,
May 26, 2015, 6:11:11 PM5/26/15
to sou...@googlegroups.com
And a Gift, a BMP180 example with Barometric Pressure and Temperature readed via I2C :)

If you need debug on Serial instead Serial1 just change it with Serial. 



// Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/DynamicAddressing.h"         // Use dynamic addressing


// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"    


// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"


// This identify the number of the LED logic
#define PRESSURE0    0
#define BMP180TEMP    2


// SDA and SCL pins can be configured, you need to edit SFE_BMP180/SFE_BMP180.cpp line 38. Preconfigured at 14, 12.
#include <SFE_BMP180.h>
#include <Wire.h>
#define ALTITUDE 20.0 // Altitude of reading location in meters


// You will need to create an SFE_BMP180 object, here called "pressure":
SFE_BMP180 pressure
;




void setup()
{  
   
Initialize();

   
Serial1.begin(115200);
   
// Connect to the WiFi network and get an address from DHCP

                 
   
GetIPAddress();    
   
SetAsGateway(myvNet_dhcp);       // Set this node as gateway for SoulissApp  


   
if (pressure.begin())
       
Serial1.println("BMP180 init success");
   
else
     
{
             
// Oops, something went wrong, this is usually a connection problem,
             
// see the comments at the top of this sketch for the proper connections.
       
             
Serial1.println("BMP180 init fail\n\n");
             
     
}
   
   
}


void loop()
{
   
    EXECUTEFAST
() {                    
        UPDATEFAST
();  
       
       
// Here we handle here the communication with Android

        FAST_GatewayComms
();                                        
   
}
    EXECUTESLOW
() {
 UPDATESLOW
();


            SLOW_10s
() {  // Read temperature and humidity from DHT every 110 seconds  



             
Souliss_GetPressure_BMP180(PRESSURE0,BMP180TEMP);
             
           
}
     
}
}    
   
   


/***************************************************************************/
/*                         BMP180 I2C READING FUNCTION                     */
/***************************************************************************/
float Souliss_GetPressure_BMP180(uint8_t SLOT_PRESSURE, uint8_t SLOT_TEMPERATURE){
 
 
boolean DEBUG_PRESSURE = 0;
 
 
char status;
 
double T,P,p0,a;


 
// Loop here getting pressure readings every 10 seconds.


 
// If you want sea-level-compensated pressure, as used in weather reports,
 
// you will need to know the altitude at which your measurements are taken.
 
// We're using a constant called ALTITUDE in this sketch:
 
 
if(DEBUG_PRESSURE){
   
Serial1.println();
   
Serial1.print("provided altitude: ");
   
Serial1.print(ALTITUDE,0);
   
Serial1.print(" meters, ");
   
Serial1.print(ALTITUDE*3.28084,0);
   
Serial1.println(" feet");
 
}  
 
// If you want to measure altitude, and not pressure, you will instead need
 
// to provide a known baseline pressure. This is shown at the end of the sketch.


 
// You must first get a temperature measurement to perform a pressure reading.
 
 
// Start a temperature measurement:
 
// If request is successful, the number of ms to wait is returned.
 
// If request is unsuccessful, 0 is returned.


  status
= pressure.startTemperature();
 
if (status != 0)
 
{
   
// Wait for the measurement to complete:
    delay
(status);


   
// Retrieve the completed temperature measurement:
   
// Note that the measurement is stored in the variable T.
   
// Function returns 1 if successful, 0 if failure.


    status
= pressure.getTemperature(T);
   
if (status != 0)
   
{
     
if(DEBUG_PRESSURE){
       
// Print out the measurement:
       
Serial1.print("temperature: ");
       
Serial1.print(T,2);
       
Serial1.print(" deg C, ");
       
Serial1.print((9.0/5.0)*T+32.0,2);
       
Serial1.println(" deg F");
     
}    
     
// Start a pressure measurement:
     
// The parameter is the oversampling setting, from 0 to 3 (highest res, longest wait).
     
// If request is successful, the number of ms to wait is returned.
     
// If request is unsuccessful, 0 is returned.


      status
= pressure.startPressure(3);
     
if (status != 0)
     
{
       
// Wait for the measurement to complete:
        delay
(status);


       
// Retrieve the completed pressure measurement:
       
// Note that the measurement is stored in the variable P.
       
// Note also that the function requires the previous temperature measurement (T).
       
// (If temperature is stable, you can do one temperature measurement for a number of pressure measurements.)
       
// Function returns 1 if successful, 0 if failure.


        status
= pressure.getPressure(P,T);
       
if (status != 0)
       
{
         
if(DEBUG_PRESSURE){
           
// Print out the measurement:
           
Serial1.print("absolute pressure: ");
           
Serial1.print(P,2);
           
Serial1.print(" mb, ");
           
Serial1.print(P*0.0295333727,2);
           
Serial1.println(" inHg");
         
}
         
// The pressure sensor returns abolute pressure, which varies with altitude.
         
// To remove the effects of altitude, use the sealevel function and your current altitude.
         
// This number is commonly used in weather reports.
         
// Parameters: P = absolute pressure in mb, ALTITUDE = current altitude in m.
         
// Result: p0 = sea-level compensated pressure in mb


          p0
= pressure.sealevel(P,ALTITUDE); // we're at 1655 meters (Boulder, CO)
         
if(DEBUG_PRESSURE){
           
Serial1.print("relative (sea-level) pressure: ");
           
Serial1.print(p0,2);
           
Serial1.print(" mb, ");
           
Serial1.print(p0*0.0295333727,2);
           
Serial1.println(" inHg");
         
}
         
// On the other hand, if you want to determine your altitude from the pressure reading,
         
// use the altitude function along with a baseline pressure (sea-level or other).
         
// Parameters: P = absolute pressure in mb, p0 = baseline pressure in mb.
         
// Result: a = altitude in m.


          a
= pressure.altitude(P,p0);
         
if(DEBUG_PRESSURE){
           
Serial1.print("computed altitude: ");
           
Serial1.print(a,0);
           
Serial1.print(" meters, ");
           
Serial1.print(a*3.28084,0);
           
Serial1.println(" feet");
         
}
         
float pressure = p0;
         
float temperature = T;
         
Souliss_ImportAnalog(memory_map, SLOT_PRESSURE, &pressure);
         
Souliss_ImportAnalog(memory_map, SLOT_TEMPERATURE, &temperature);
         
return p0;
       
}
       
else if(DEBUG_PRESSURE) Serial1.println("error retrieving pressure measurement\n");
     
}
     
else if(DEBUG_PRESSURE) Serial1.println("error starting pressure measurement\n");
   
}
   
else if(DEBUG_PRESSURE) Serial1.println("error retrieving temperature measurement\n");
 
}
 
else if(DEBUG_PRESSURE) Serial1.println("error starting temperature measurement\n");
 
}

Regards

El lunes, 25 de mayo de 2015, 23:53:20 (UTC+2), Juan Pinto escribió:
...

dcarvetta

unread,
May 27, 2015, 7:24:35 AM5/27/15
to sou...@googlegroups.com
Hi Juan, I tried first your example (DHT).
Consider that I use 1.6.1 IDE with Friariello latest commit w/out problem.
I tried to compile your sketch, but I have many errors as follows.

In file included from C:\Users\Carvetta\Desktop\ESP8266\arduino-1.6.1-esp8266\arduino-1.6.1\hardware\esp8266com\esp8266\cores\esp8266/Arduino.h:34:0,
                 
from C:\Users\Carvetta\Desktop\ESP8266\arduino-1.6.1-esp8266\arduino-1.6.1\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src/WiFiClient.h:24,
                 
from C:\Users\Carvetta\Desktop\ESP8266\arduino-1.6.1-esp8266\arduino-1.6.1\hardware\esp8266com\esp8266\libraries\ESP8266WiFi\src/ESP8266WiFi.h:32,
                 
from e08_Hello_ESP8266_test0002_Juan_version.ino:16:
e08_Hello_ESP8266_test0002_Juan_version
.ino: In function 'void loop()':
e08_Hello_ESP8266_test0002_Juan_version
.ino:78:49: error: 'f' was not declared in this scope
Errore durante la compilazione

If I remove below lines, then the compilation is Ok.

             // Check if any reads failed and exit early (to try again).

             
//if (isnan(h) || isnan(t) || isnan(f)) {
             
//   Serial.println("Failed to read from DHT sensor!");
             
//   return;
             
// }
Any idea about this issue ?????





Juan Pinto

unread,
May 27, 2015, 9:37:41 AM5/27/15
to sou...@googlegroups.com
Sorry, another error :( I work on the sketches on github to get this updated.
 
You need to change this:
 if (isnan(h) || isnan(t) || isnan(f)) {
With this:
 
 if (isnan(h) || isnan(t) {
 
This is because my first example get the reading on Farenheit too :S
 
Regards.

Lesjaw Ardi™ ♂

unread,
May 27, 2015, 9:40:14 AM5/27/15
to sou...@googlegroups.com

Do you need Fahrenheit? If not just remove it..
Remove this || isnan(f)

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Lesjaw Ardi™ ♂

unread,
May 27, 2015, 9:42:35 AM5/27/15
to sou...@googlegroups.com
but if you want farenheit add this line

// Read temperature as Fahrenheit
  float f = dht.readTemperature(true);

and send this to Souliss with :
Souliss_ImportAnalog(memory_map, TEMPERATURE, &f);

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

dcarvetta

unread,
May 27, 2015, 9:52:16 AM5/27/15
to sou...@googlegroups.com
Dear Juan, Lesjaw,
Compilation now should be OK.




Juan Pinto

unread,
May 27, 2015, 10:01:32 AM5/27/15
to sou...@googlegroups.com
I maded a Repository with the examples on it:
 
Regards

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

dcarvetta

unread,
May 27, 2015, 10:54:26 AM5/27/15
to sou...@googlegroups.com
Ok, guys, the DHT is ok.
Thanks a lot !!
Screenshot_2015-05-27-16-53-24.png

dcarvetta

unread,
May 27, 2015, 1:03:40 PM5/27/15
to sou...@googlegroups.com
Hi Juan, very good your job !
PS: I can't see the schemes as follows:
1) connecto to the PIN A1 of the Attiny;
2) connect to the Attiny for programming.
Could you please send both us , thanks ?

Juan Pinto

unread,
May 27, 2015, 1:34:18 PM5/27/15
to sou...@googlegroups.com
Yes, I'll add to the GITHUB readme when I know how to do that... xD  I don't know why are not seen on the ML
 
Regards

Juan Pinto

unread,
May 27, 2015, 1:52:53 PM5/27/15
to sou...@googlegroups.com
 

El miércoles, 27 de mayo de 2015, 19:03:40 (UTC+2), dcarvetta escribió:

dcarvetta

unread,
May 27, 2015, 1:59:02 PM5/27/15
to sou...@googlegroups.com
Excellent job, Juan !!

Di Maio, Dario

unread,
Jun 2, 2015, 3:39:07 AM6/2/15
to sou...@googlegroups.com

Hi Juan,

could you please update your sketches according to the latest commit? The change is in the setup() function for DHCP.

Please consider that you could now install Souliss for ESP via the Library Manager with target release 7.0.5.

It would be great have also a table of pins that could be used with ESP8266, because isn't clear which one are for SPI, I2C or general purpose.

Dario.

From Mobile.

...

Juan Pinto

unread,
Jun 2, 2015, 10:13:02 AM6/2/15
to sou...@googlegroups.com
I think this is what you want, take a look to the changes:
 
If it's ok I'll modify other nodes.
 
Talking about the Pins on ESP you can use any pin to any ON/OFF/PWM/I2C function, just define it before.
 
Here is the info about:
 
And a table:

SPI Note from Readme:
HSPI for pins 12-15 and CLK functions for pins 0, 4 and 5.
 
And finally a PinOUT of ESP12 Model:
Regards

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Jun 2, 2015, 11:08:19 AM6/2/15
to sou...@googlegroups.com

Hi Juan,

yes is it :)

What isn't clear for me is the oin functions, I cannot found further details. Have you some read for further understanding?

Thanks,
Dario.

From Mobile.

You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
Jun 2, 2015, 11:18:24 AM6/2/15
to sou...@googlegroups.com
Sorry, I don't understand you :P What do you mean when you say "ion functions"? You're asking for the pins that can be used for DigitalWrite etc??
 
Regards.

Di Maio, Dario

unread,
Jun 2, 2015, 11:19:42 AM6/2/15
to sou...@googlegroups.com

There are several function for each pin, but I cannot find any docs on functions and how set it.

Dario.

From Mobile.

Juan Pinto

unread,
Jun 2, 2015, 12:04:42 PM6/2/15
to sou...@googlegroups.com
On the readme just after the table says:
The most usable pin functions are mapped to the macro SPECIAL, so calling pinMode(pin, SPECIAL) will switch that pin in the most usable FUNCTION_X. Those are UART RX/TX on pins 1 - 3, HSPI for pins 12-15 and CLK functions for pins 0, 4 and 5.
 
Is this what are you looking for?
 
And another question, why do you need this?? :P
 
Regards
...

Di Maio, Dario

unread,
Jun 2, 2015, 12:11:52 PM6/2/15
to sou...@googlegroups.com

I want to learn more on ESP :)

From Mobile.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
Jun 2, 2015, 12:24:01 PM6/2/15
to sou...@googlegroups.com
:) Good to know, Knowledge does not take up any space :P
 
If you need my help please ask :)
 
Regards
 
 

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

dcarvetta

unread,
Jun 4, 2015, 2:05:27 PM6/4/15
to sou...@googlegroups.com
Hi Juan,
can I ask you to explain me about #include "conf/IPBroadcast.h"  :

#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/IPBroadcast.h"    <-----------

Thanks!

Di Maio, Dario

unread,
Jun 5, 2015, 3:02:12 AM6/5/15
to sou...@googlegroups.com
Hi Domenico,

this is used to enable the M3 on the device, in this way communication between nodes (not SoulissApp or openHAB) is via IP Broadcast frames (otherwise is unicast), this remove the bind between IP Address and vNet address and let you use any DHCP address with any vNet address.

Regards,
Dario.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Domenico Carvetta

unread,
Jun 5, 2015, 4:32:27 AM6/5/15
to sou...@googlegroups.com
OK, sounds clear now, but why it is not into the examples ie. Friariello V.7.0.5 <e08_Peer_ESP8266> ?
I found just the lines as follows:

// Configure the framework

#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/DynamicAddressing.h"

Di Maio, Dario

unread,
Jun 5, 2015, 4:39:24 AM6/5/15
to sou...@googlegroups.com
Is still a work in progress and some problem on the EEPROM has suggested to remove the DynamicAddressing from sketches to static ones. The IPBroadcast and DynamicAddressing both enable M3, the difference is only in static addressing with IPBroadcast.

Patch,

Regards,
Dario.


--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

domenico carvetta

unread,
Jun 5, 2015, 4:45:28 AM6/5/15
to sou...@googlegroups.com
Excellent explanation, thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Domenico Carvetta

unread,
Jun 7, 2015, 11:03:30 AM6/7/15
to sou...@googlegroups.com
Dear Juan,
can you double confirm me the schematic pin-to-pin to connect the Attiny45/85 to ESP01 ?
About the attiny45/85, as follows:
Pin1 = Reset
Pin2 = A3
Pin3 = A2
Pin4 = GND
Pin5 = D0
Pin6 = D1
Pin7 = D2/A1
Pin8 = Vcc

I apologize, but very honestly I didn't understand it, thanks.

Juan Pinto

unread,
Jun 7, 2015, 1:56:56 PM6/7/15
to sou...@googlegroups.com
Hi, first I use a ESP12, but I think you can do it with an ESP01, obviously you only have one USART so you cannot do debug (on ESP12 I use Serial1 to debug)

You only need to connect from TX (Attiny) to RX (ESP01), Here the pins:
SoftwareSerial TinySerial(3, 4); // RX, TX

#define LED 1

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

domenico carvetta

unread,
Jun 7, 2015, 2:12:32 PM6/7/15
to sou...@googlegroups.com

Thanks, which is RX on attiny ? Sede my  list.

domenico carvetta

unread,
Jun 7, 2015, 2:13:50 PM6/7/15
to sou...@googlegroups.com

Correction: I mean TX.

Di Maio, Dario

unread,
Jun 7, 2015, 2:17:42 PM6/7/15
to sou...@googlegroups.com

If I'm not wrong, ATtiny has no USART, you need a Software Serial.

Dario.

From Mobile.

carvetta...@gmail.com

unread,
Jun 7, 2015, 3:53:19 PM6/7/15
to Di Maio, Dario, sou...@googlegroups.com
Ok, but from hardware point of view, what is the connection from ATtiny, tx and ESP 01, rx ?
Which is the ATtiny tx pin number ?


Inviato da HTC
--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAKGhMPL3ZCtujh4VJt9ORg2ASL_RbRpPYVzfBzqA0LGo%2BR4aYA%40mail.gmail.com.

Di Maio, Dario

unread,
Jun 8, 2015, 1:48:27 AM6/8/15
to domenico carvetta, sou...@googlegroups.com

It has no TX and RX, using SoftwareSerial you define a software USART and there you define the pin that you want to use.

You have to look in the SoftwareSerial documentation to understand which are the pins that you can use.

Dario.

From Mobile.

Domenico Carvetta

unread,
Jun 8, 2015, 3:41:21 AM6/8/15
to sou...@googlegroups.com, carvetta...@gmail.com
Thanks Dario.
Most likely I got a bit confusion about pin number vs. datasheet pin assignment.

That's mean I assumed before Pin3 and Pin4 of ATtiny related to A2 and GND.
Now, after read the SoftwareSerial doc, I understood that Pin3 and Pin4 are respectevely AnalogRead (3) and AnalogRead (2).

Juan Pinto

unread,
Jun 8, 2015, 9:36:49 AM6/8/15
to sou...@googlegroups.com
From Pin3 = A2 on Attiny to RX on ESP :P
 
You must follow the Pinout from the Wiki as I posted before.
 
You can see on my previous post the SoftwareSerial declaration, this refers to IO pins and not to the fisical pins, you can change the pin on the SoftwareSerial declaration
 
Regards

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
Jun 15, 2015, 12:17:53 PM6/15/15
to sou...@googlegroups.com
Well, I done two versions of a PCB to put an ESP12 on It and control some devices, and I designed a 3d printed box to host it and install on any place :) Here are some photos:
 

 
 
And the full album:
 
I need to make some final modifications to get more space to connections and the connection to the GPIO15, when changes are done I'll share all the info and a Sketch to compile directly over this PCB. I maded one Sketch right now, but Im gonna do more examples related to this Board, including PIR sensors, and other combinations.
 
Regards.

El lunes, 8 de junio de 2015, 15:36:49 (UTC+2), Juan Pinto escribió:
From Pin3 = A2 on Attiny to RX on ESP :P
 
You must follow the Pinout from the Wiki as I posted before.
 
You can see on my previous post the SoftwareSerial declaration, this refers to IO pins and not to the fisical pins, you can change the pin on the SoftwareSerial declaration
 
Regards
2015-06-08 9:41 GMT+02:00 Domenico Carvetta <carvetta...@gmail.com>:
Thanks Dario.
Most likely I got a bit confusion about pin number vs. datasheet pin assignment.

That's mean I assumed before Pin3 and Pin4 of ATtiny related to A2 and GND.
Now, after read the SoftwareSerial doc, I understood that Pin3 and Pin4 are respectevely AnalogRead (3) and AnalogRead (2).

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Lesjaw Ardi™ ♂

unread,
Jun 15, 2015, 1:01:09 PM6/15/15
to sou...@googlegroups.com

Very nice juan..

On Jun 15, 2015 23:17, "Juan Pinto" <juanp...@gmail.com> wrote:
Well, I done two versions of a PCB to put an ESP12 on It and control some devices, and I designed a 3d printed box to host it and install on any place :) Here are some photos:
 

 
 
And the full album:
 
I need to make some final modifications to get more space to connections and the connection to the GPIO15, when changes are done I'll share all the info and a Sketch to compile directly over this PCB. I maded one Sketch right now, but Im gonna do more examples related to this Board, including PIR sensors, and other combinations.
 
Regards.

El lunes, 8 de junio de 2015, 15:36:49 (UTC+2), Juan Pinto escribió:
From Pin3 = A2 on Attiny to RX on ESP :P
 
You must follow the Pinout from the Wiki as I posted before.
 
You can see on my previous post the SoftwareSerial declaration, this refers to IO pins and not to the fisical pins, you can change the pin on the SoftwareSerial declaration
 
Regards
2015-06-08 9:41 GMT+02:00 Domenico Carvetta <carvetta...@gmail.com>:
Thanks Dario.
Most likely I got a bit confusion about pin number vs. datasheet pin assignment.

That's mean I assumed before Pin3 and Pin4 of ATtiny related to A2 and GND.
Now, after read the SoftwareSerial doc, I understood that Pin3 and Pin4 are respectevely AnalogRead (3) and AnalogRead (2).

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Lesjaw Ardi™ ♂

unread,
Jun 15, 2015, 1:31:24 PM6/15/15
to sou...@googlegroups.com

I also made mine..

IMG_20150616_53684.jpg
IMG_20150616_12642.jpg
IMG_20150616_45186.jpg
IMG_20150616_37764.jpg

Marko S

unread,
Jun 21, 2015, 7:21:04 AM6/21/15
to sou...@googlegroups.com
Juan, so will you post the gerbers on your github once you're done? Are there any SMD parts and which size 0603 or larger, so that it will be doable for DIY?

Dne ponedeljek, 15. junij 2015 18.17.53 UTC+2 je oseba Juan Pinto napisala:
Well, I done two versions of a PCB to put an ESP12 on It and control some devices, and I designed a 3d printed box to host it and install on any place :) Here are some photos:
 

 
 
And the full album:
 
I need to make some final modifications to get more space to connections and the connection to the GPIO15, when changes are done I'll share all the info and a Sketch to compile directly over this PCB. I maded one Sketch right now, but Im gonna do more examples related to this Board, including PIR sensors, and other combinations.
 
Regards.

El lunes, 8 de junio de 2015, 15:36:49 (UTC+2), Juan Pinto escribió:
From Pin3 = A2 on Attiny to RX on ESP :P
 
You must follow the Pinout from the Wiki as I posted before.
 
You can see on my previous post the SoftwareSerial declaration, this refers to IO pins and not to the fisical pins, you can change the pin on the SoftwareSerial declaration
 
Regards
2015-06-08 9:41 GMT+02:00 Domenico Carvetta <carvetta...@gmail.com>:
Thanks Dario.
Most likely I got a bit confusion about pin number vs. datasheet pin assignment.

That's mean I assumed before Pin3 and Pin4 of ATtiny related to A2 and GND.
Now, after read the SoftwareSerial doc, I understood that Pin3 and Pin4 are respectevely AnalogRead (3) and AnalogRead (2).

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
Jun 22, 2015, 9:26:32 AM6/22/15
to sou...@googlegroups.com
Hi Marko, yes I'll post the gerbers when its done, I have a prototype running the last week with no problems, but I want to change the location of some connectors, and maybe I need to change GPIO15 from Dallas / PIR connector, this GPIO needs to be on GND at start or the ESP will not start the sketch, so can be used to other purposes.
 
The PCB is designed with "normal" components, no SMD. Can be maded at home with no problems :P
 
Regards

Juan Pinto

unread,
Jun 22, 2015, 2:16:51 PM6/22/15
to sou...@googlegroups.com
There is a good guide for first steps on ESP modules :) Ty to esp8266-projects.com
 
 
Regards
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
Jun 22, 2015, 2:22:24 PM6/22/15
to sou...@googlegroups.com
Sorry, here the working link:
 
 
Regards

Marko S

unread,
Jun 24, 2015, 6:51:16 AM6/24/15
to sou...@googlegroups.com
Nice great news, also thanks for the link.. One design of your pcb is 5x5cm sized right? So chinese pcb makers should be able to cheaply produce it :)

Juan Pinto

unread,
Jun 24, 2015, 9:24:44 AM6/24/15
to sou...@googlegroups.com
Yes, is designed on 5x5cm to make the production easy and cheap :)  If I have some time this weekend I'll share the sources.
 
Regards

2015-06-24 12:51 GMT+02:00 Marko S <mark...@gmail.com>:
Nice great news, also thanks for the link.. One design of your pcb is 5x5cm sized right? So chinese pcb makers should be able to cheaply produce it :)
--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
Jun 26, 2015, 11:11:47 AM6/26/15
to sou...@googlegroups.com
Hi all!, Im working to integrate Capacitive Sensor Buttons and Ir Receiver on ESP, any help is really appreciated :)
Here the post on ESP forum:
 
Capacitive Sensor:  (High priority)
 
Ir library:
 
About the PCB I maded some changes on the distribution and I need to make another prototype to be sure this works as expected and the "things" have enough space.
 
Regards

El miércoles, 24 de junio de 2015, 15:24:44 (UTC+2), Juan Pinto escribió:
Yes, is designed on 5x5cm to make the production easy and cheap :)  If I have some time this weekend I'll share the sources.
 
Regards
2015-06-24 12:51 GMT+02:00 Marko S <mark...@gmail.com>:
Nice great news, also thanks for the link.. One design of your pcb is 5x5cm sized right? So chinese pcb makers should be able to cheaply produce it :)

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+unsubscribe@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Di Maio, Dario

unread,
Jun 26, 2015, 12:16:42 PM6/26/15
to sou...@googlegroups.com
I'm not going in deep with ESP usage with sensor, but I want to thank you for all these resources.

Dario.

Juan Pinto

unread,
Jun 26, 2015, 12:23:33 PM6/26/15
to sou...@googlegroups.com
No problem Dario, you've done the most important work, make the ESP working on Souliss... now is the community who must do interesting things with it :)  I'll try en keep you up to date. One more thing, it is possible edit the first post to add the Github repository I maded and where the examples are updated.
Here is the Address:
 
Regards :)

Di Maio, Dario

unread,
Jun 26, 2015, 12:25:47 PM6/26/15
to sou...@googlegroups.com
Unfortunately post cannot be modified, or at least I cannot modify post written by other people.

Dario.

Juan Pinto

unread,
Jun 26, 2015, 12:54:34 PM6/26/15
to sou...@googlegroups.com
On the spanish forum I've enabled the "edit your posts" option, but don't worry we can put the link somewhere on the WIKI.
 
Regards

Juan Pinto

unread,
Jul 2, 2015, 11:28:35 AM7/2/15
to sou...@googlegroups.com
Hi, with the steps done on this post:
 
I've done an Example using WiFiManager Library, this library starts the ESP on AP mode with a web interface on address 192.168.4.1 to configure the SSID and Password if the module not connect to the Wifi on start, this can be usefull to make a device that runs on any Wifi without reprogramming the node. Here the Example:
 
Last night was a productive one... :)  I maded a simple function to integrate Capacitive Sensors on ESP, we only need a 800k - 1Mohm resistor between two pins and a foil, I need to do more tests (I want to integrate two capacitive buttons) Here the example:
 
Enjoy!
 
Regards

domenico carvetta

unread,
Jul 2, 2015, 12:10:03 PM7/2/15
to sou...@googlegroups.com
You are great, Juan !
I will try it early tomorrow morning. :-)

Lesjaw Ardi™ ♂

unread,
Jul 2, 2015, 5:26:03 PM7/2/15
to sou...@googlegroups.com
Juan have you tested this on esp01? esp01 seem have problem with eeprom..

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Juan Pinto

unread,
Jul 2, 2015, 5:29:59 PM7/2/15
to sou...@googlegroups.com
No I've only ESP12 modules

REgards

--
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Lesjaw Ardi™ ♂

unread,
Jul 2, 2015, 5:37:51 PM7/2/15
to sou...@googlegroups.com
this is the serial output after saving ssid and password from web interface :

Saved WiFiConfig...restarting.
Setup done

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


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

wdt reset

on esp01..

Lesjaw Ardi™ ♂

unread,
Jul 2, 2015, 10:39:04 PM7/2/15
to sou...@googlegroups.com
damn..there are so many error reported about esp01 and eeeprom, just souliss app in the frist example, using dynamic adress and save vNet address on eeprom..

eeprom run good in esp12 but not esp01...

so, Juan.. i have find another solution for ssid and pass on running mode with esp01.. 

it saves the ssid and pass onBoard, i dont what its mean by saving on board..

This is an onboarding app based on https://github.com/chriscook8/esp-arduino-apboot

The changes relative to that version are as follows:

Restructured some of the code to (hopefully) make it a little more understandable
Don't store the ssid and password in EEPROM since the ESP8266 SDK already stores them if wifi_station_set_auto_connect is set to true (this is the default behavior), see
http://www.esp8266.com/viewtopic.php?p=15304 for details
Support ssid and password containing spaces
Restart the node in WIFI_STA mode once the ssid and password have been configured and a successful connection to that AP has been established.
Once restarted advertise the address via mDNS

but it sure works like hell on esp01..

dario can you make this sketch as library? :-)

Domenico Carvetta

unread,
Jul 3, 2015, 2:13:46 PM7/3/15
to sou...@googlegroups.com
I tried on the ESP-03 the Juan's sketch example; unfortunately it didn't work!!
Any idea guys ? Thanks a lot. Domenico

Juan Pinto

unread,
Jul 3, 2015, 5:47:56 PM7/3/15
to sou...@googlegroups.com
Am working on the capacitive function and I want to implement a function to toggle bright on a hold push of butons, It's simple, like a toggle but with the bright.
I maded a branch on github and I added some lines on T1n.cpp and Typicals.h but I can get it working yet:
Here the changes:

Here the example with the debug, but can be tested with a pushbutton and DigInHold Function too.

On mInput(slot) i see 32 and 16 when I hold the button :S I modified this and now get the value on mInput, but the bridge don't change :(

memory_map[MaCaco_IN_s + slot] = 10;
//memory_map[MaCaco_IN_s + slot] = Souliss_T1n_BrightUp;

memory_map[MaCaco_IN_s + slot] = 20;
//memory_map[MaCaco_IN_s + slot] = Souliss_T1n_BrightDown;

Any help on this ? 

I'll try now with my old Arduino Capacitive function too.

REGARDS.

Di Maio, Dario

unread,
Jul 4, 2015, 3:57:55 AM7/4/15
to sou...@googlegroups.com

Hi Lesjaw,

please open an issue with those information, I will process them at later time.

Thanks,
Dario.

From Mobile.

Lesjaw Ardi™ ♂

unread,
Jul 4, 2015, 4:58:51 PM7/4/15
to sou...@googlegroups.com

Juan Pinto

unread,
Jul 4, 2015, 7:24:38 PM7/4/15
to sou...@googlegroups.com
Ok, I worked on your suggestion, here the example: https://github.com/juanpintom/Souliss_ESP_Examples/blob/master/E00_ESP_Helloworld_NewWiFiManager

I worked too on the capacitive buttons, now it's working conectind direcly a foil  on a PIN, I can work now on my ideas for capacitive sensing =)  I added a Brightswith function too, so, more changes are needed on some files in the library, we take a look and update when it's fully tested, for now here is a branch of Souliss:

Regards

Lesjaw Ardi™ ♂

unread,
Jul 5, 2015, 12:22:28 AM7/5/15
to sou...@googlegroups.com
btw Juan example does work.. but we must uncomment line 174 in NetworkSetup.cpp

Juan Pinto

unread,
Jul 5, 2015, 10:52:22 AM7/5/15
to sou...@googlegroups.com

Lesjaw Ardi™ ♂

unread,
Jul 5, 2015, 12:35:33 PM7/5/15
to sou...@googlegroups.com

Can you make it as library juan?

Perhaps Dario can integrAte it into NetworkSetup.cpp..

Domenico Carvetta

unread,
Jul 5, 2015, 12:56:28 PM7/5/15
to sou...@googlegroups.com
Sorry guys,
I got a compilation error, as follows:

sketch_jul05b.ino: In function 'void setupWebServerHandlers(int)':
sketch_jul05b
.ino:209:12: error: 'class ESP8266WebServer' has no member named 'onNotFound'
sketch_jul05b
.ino:213:12: error: 'class ESP8266WebServer' has no member named 'onNotFound'
sketch_jul05b
.ino: In function 'void handleNotFound()':
sketch_jul05b
.ino:308:21: error: 'class ESP8266WebServer' has no member named 'args'
sketch_jul05b
.ino:310:34: error: 'class ESP8266WebServer' has no member named 'args'
sketch_jul05b
.ino:311:29: error: 'class ESP8266WebServer' has no member named 'argName'
sketch_jul05b
.ino:311:61: error: invalid conversion from 'uint8_t {aka unsigned char}' to 'const char*' [-fpermissive]
In file included from sketch_jul05b.ino:15:0:
C
:\Users\Carvetta\Desktop\ESP8266\arduino-1.6.1-esp8266\arduino-1.6.1\hardware\esp8266com\esp8266\libraries\ESP8266WebServer\src/ESP8266WebServer.h:56:9: error:   initializing argument 1 of 'String ESP8266WebServer::arg(const char*)' [-fpermissive]
 
String arg(const char* name);
         
^

Lesjaw Ardi™ ♂

unread,
Jul 5, 2015, 2:21:20 PM7/5/15
to sou...@googlegroups.com
check the brecket {} function Domenico, it seems you missing one.. 

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Lesjaw Ardi™ ♂

unread,
Jul 5, 2015, 2:21:46 PM7/5/15
to sou...@googlegroups.com
or give us the whole sketch to see

Domenico Carvetta

unread,
Jul 5, 2015, 3:42:21 PM7/5/15
to sou...@googlegroups.com
Attached both, thanks.
sketch_jul05a.ino
sketch_jul05b.ino

Domenico Carvetta

unread,
Jul 6, 2015, 5:04:19 AM7/6/15
to sou...@googlegroups.com
Where I missed the bracket? Thanks.

Lesjaw Ardi™ ♂

unread,
Jul 6, 2015, 2:20:10 PM7/6/15
to sou...@googlegroups.com
i have compile your sketch with no error.. hmm

On Mon, Jul 6, 2015 at 4:04 PM, Domenico Carvetta <carvetta...@gmail.com> wrote:
Where I missed the bracket? Thanks.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

yt1...@gmail.com

unread,
Jul 6, 2015, 9:09:09 PM7/6/15
to sou...@googlegroups.com

Dallas Integration
In most cases OneWire library isn't on the Arduino IDE or have an Older version, be sure to download the ESP one: https://github.com/esp8266/Arduino/tree/esp8266/libraries/OneWire
- Example: 
// Configure the framework
#include "bconf/MCU_ESP8266.h"              // Load the code directly on the ESP8266
#include "conf/Gateway.h"                   // The main node is the Gateway, we have just one node
#include "conf/DynamicAddressing.h"         // Use dynamic addressing


// Define the WiFi name and password
#define WIFICONF_INSKETCH
#define WiFi_SSID               "SSID"
#define WiFi_Password           "PASSWORD"    


// Include framework code and libraries
#include <ESP8266WiFi.h>
#include <EEPROM.h>
#include "Souliss.h"


// This identify the number of the SLOT logic
#define DALLAS              0


#include <OneWire.h>
#include <DallasTemperature.h>
#define DALLASPIN 4 //Se declara el pin donde se conectará la DATA
OneWire ourWire(DALLASPIN); //Se establece el pin declarado como bus para la comunicación OneWire
DallasTemperature sensors(&ourWire); //Se instancia la librería DallasTemperature


void setup()
{  
   
Initialize();
   
   
Serial.begin(115200);


    sensors
.begin(); //Se inician los sensores DS18B20
   
// Connect to the WiFi network and get an address from DHCP
   
Setup_ESP8266();                          
   
SetAsGateway(myvNet_esp8266);       // Set this node as gateway for SoulissApp  


   
Set_Temperature(DALLAS);
}


void loop()
{
    EXECUTEFAST
() {        
...

Hi everyone,

I want two DS18B20 on one GPIO, and want two typicals with two independant temperatures...
I managed to get this on souliss app, but how to separate them? On app, i see two typicals but how to address each?

BR! 

Lesjaw Ardi™ ♂

unread,
Jul 6, 2015, 9:34:06 PM7/6/15
to sou...@googlegroups.com
you can use :

float temperature = sensors.getTempCByIndex(0); for first DS18B20

and 

float temperature = sensors.getTempCByIndex(1); for next DS18B20

to see which one is the first and the second temp, see your slot number in soulissapp..

this is my example..i use address for DS18B20.. but you can delete my uncomment float temperture by index


--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Domenico Carvetta

unread,
Jul 7, 2015, 2:25:20 AM7/7/15
to sou...@googlegroups.com
HI Lesjaw,
you are lucky..:-) ..btw, you said before I missed any bracket; where ? I wait your appreciated answer,Thanks.

Lesjaw Ardi™ ♂

unread,
Jul 7, 2015, 7:46:25 AM7/7/15
to sou...@googlegroups.com

The compile error like you miss a bracket.. but it seems not..

On Jul 7, 2015 2:25 AM, "Domenico Carvetta" <carvetta...@gmail.com> wrote:
HI Lesjaw,
you are lucky..:-) ..btw, you said before I missed any bracket; where ? I wait your appreciated answer,Thanks.

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

carvetta...@gmail.com

unread,
Jul 7, 2015, 8:18:13 AM7/7/15
to Lesjaw Ardi™ ♂, sou...@googlegroups.com
I dont know how to fix it; i asked to my friend, he faced same compilation error.
We both use ide 1.6.1.
Thanks.

Inviato da HTC
You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAJ6Uq_kg-dR3AZW7L5EiP%3DvHcWb3nP8DVM%2BEfVupQzRWVrd%2BfQ%40mail.gmail.com.

Juan Pinto

unread,
Jul 7, 2015, 10:12:20 AM7/7/15
to sou...@googlegroups.com
I suggest to download the lastest IDE, 1.6.5, (zip version) And make a standalone Arduino Ide for ESP.
 
Regards

carvetta...@gmail.com

unread,
Jul 7, 2015, 10:33:55 AM7/7/15
to Juan Pinto, sou...@googlegroups.com
I will do as you suggested Juan, Thanks.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAN5yH6F1D-ZYb0D4hScBVk7MhskP4a3Ee6B4yiLty5L-VHGxCg%40mail.gmail.com.

Lesjaw Ardi™ ♂

unread,
Jul 7, 2015, 8:24:19 PM7/7/15
to sou...@googlegroups.com
Just want to update the information..

Sorry by the double post, I renamed the example and the link from the previous message isn't work, here is the new one:
https://github.com/juanpintom/Souliss_ESP_Examples/blob/master/E00_ESP_Helloworld_WiFiManager
Regards

i test Juan WifiManager example which is using eeprom.. it works now with esp01 with latest arduino ide..

but there is still one glicth, after the connection made, and we reset the esp01, it seem cant read eeprom correctly, but after it start its AP mode, and we reset it again, it will read the SSID and pass from eeprom correctly..

so it need two reset to make it work...

next i am going to test dynamic addressing with esp01, but by looking at the glitch it seem if the esp01 got reset we will need reset it manually again..

On Sat, Jul 4, 2015 at 2:57 PM, Di Maio, Dario <dario....@souliss.net> wrote:

Juan Pinto

unread,
Jul 7, 2015, 8:57:30 PM7/7/15
to sou...@googlegroups.com

Ok,  Ty for the update  :) I can't do tests with 01 and 03

You received this message because you are subscribed to a topic in the Google Groups "souliss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/souliss/1kMAltPB2ME/unsubscribe.
To unsubscribe from this group and all its topics, send an email to souliss+u...@googlegroups.com.

To post to this group, send email to sou...@googlegroups.com.

Lesjaw Ardi™ ♂

unread,
Jul 7, 2015, 11:19:04 PM7/7/15
to sou...@googlegroups.com
Just testing the Dynamic addressing with eeprom..IT WORKS!!..  doing couple reset, the vNet address stick..


the gateway is esp01 and the peer node is esp12..

got some problem eith dht11 value update, i've seen 0 value, after couple of second the right value got updated, but in the next update i got 0 value again, and it will get the correct value again in the next update..

Dario can you check my sketch?

btw the wiki example  for dynamic address gateway is missing SetAddressingServer();
and on the peer node is missing GetIPAddress();

i dont know if that is any correclation with WiFiManager, but if i dont include those, they wont connect..

thanks

Lesjaw Ardi™ ♂

unread,
Jul 7, 2015, 11:20:30 PM7/7/15
to sou...@googlegroups.com
damn..so happy..now everytime i add a node, i dont need to compile the gateway again for new address.. going to test it for large number of nodes.. hope it works..

Lesjaw Ardi™ ♂

unread,
Jul 7, 2015, 11:46:55 PM7/7/15
to sou...@googlegroups.com
ups..unpluging the power suply of the node and gateway make it lose their setting (eeprom).. vNet address too..

Lesjaw Ardi™ ♂

unread,
Jul 8, 2015, 12:34:30 AM7/8/15
to sou...@googlegroups.com
Bug reproducing step :
1. turn on the gateway, set SSID and Pass through web interface
2. Gateway restarted automatic by WifiManager, got connected, can see the led blink
3. reset, the gateway, on first reset it fail connect to SSID, on second reset it connect, can read the SSID and Pass from eeprom.

4. uplug the power of the gateway, then plug the power again, cant connect to previous saved SSID, empty SSID and Pass..
5. set SSID and Pass again throught the web interface

6. turn on Peer Node, set ssid and pass through web interface
7. Peer Node restarted automatic by WifiManager, got connected, but the led didn't immediatly blink, got reply from ping
8. Gateway Blink got stuck on, couple second later, both of the node (Gateway and Peer) Led got blink
9. manual reset, still remember the SSID and Pass, like the gateway it need reset twice..

10. Open soulissapp, set network, get Node DB, all node got recognized well..

11. unplug the power of Peer Node, healt status of this node still good..even though its already offline..
12. leaving it unplug for a couple second more, the health status still good (full)

13. plug the power of Peer Node, cant connect to previous saved SSID, empty SSID and Pass..
14. set SSID and Pass again throught the web interface

15. Open souliss, previous Peer Node didnt work, got double Peer Node, so the vNet address has change..

Done testing..

Eeprom on esp01 and esp12 still not reliable, it so mess if we unplug the power.

Lesjaw Ardi™ ♂

unread,
Jul 8, 2015, 1:24:26 AM7/8/15
to sou...@googlegroups.com
ok this is wierd..

so i delete the dynamic addressing on peer node, and set a manuall vNet address, but the gateway still use dynamic addressing.. but somehow soulissapp can detect and add that Peer Node..

i am trying add another peer node with manual address, but souliss cant detect it.. 

it seems the gateway still have the vNet address from the previous dynamic address peer node, so basically it does save it in eeprom.

gateway :

void setup()
{   
    Serial.begin(115200);
    wifi.autoConnect("Souliss");
    WiFi.mode(WIFI_STA);
    Initialize();
    // Set network parameters
    Souliss_GetIPAddress();                         
    SetAsGateway(myvNet_dhcp);  
    SetAddressingServer();


peer node :

void setup(){  
    Serial.begin(115200);
    wifi.autoConnect("Souliss");
    WiFi.mode(WIFI_STA);      
 
        Initialize();
        // This board request an address to the gateway at runtime, no need
        // to configure any parameter here. 
        GetIPAddress(); 
        SetDynamicAddressing();
        GetAddress();

since the above code didnt work so i change it to :

void setup(){  
    Serial.begin(115200);
    wifi.autoConnect("Souliss");
    WiFi.mode(WIFI_STA);      
 
        Initialize();
        
        GetIPAddress();
        SetAddress(0xAB02, 0xFF00, 0xAB01);


and the gateway can detect this peer node with its all typicals.. i can bet that why the gateway can detect this peer node is because it has a saved data from the previous code, not because the manual vNet address i made..

Lesjaw Ardi™ ♂

unread,
Jul 8, 2015, 1:28:36 AM7/8/15
to sou...@googlegroups.com

Di Maio, Dario

unread,
Jul 8, 2015, 1:29:44 AM7/8/15
to sou...@googlegroups.com

Hi,

Looks that EEPROM library isn't commiting data.

If the address is not retained while the power has been removed, the node will ask for a new address, that's why you see two nodes.

The healthy value is updates slowly and may take a while before detecting a mussing node.

Dario.

From Mobile.

Di Maio, Dario

unread,
Jul 8, 2015, 1:32:43 AM7/8/15
to sou...@googlegroups.com

You can mix static and dynamic addressing, the peer will just not request for an address but will broadcast its one to the gateway.

Remove power from the gateway and peer, restart only the gateway and rebuild your DB, so that you can see if addresses has been retained.

Dario.

From Mobile.

Lesjaw Ardi™ ♂

unread,
Jul 8, 2015, 1:34:38 AM7/8/15
to sou...@googlegroups.com
ok testing it now...

--
You received this message because you are subscribed to the Google Groups "souliss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to souliss+u...@googlegroups.com.
To post to this group, send email to sou...@googlegroups.com.

Lesjaw Ardi™ ♂

unread,
Jul 8, 2015, 1:40:23 AM7/8/15
to sou...@googlegroups.com
here is my step :

1. remove power the gateway and the peer
2. deleting Souliss DB Node
3. turn on gateway
4. rebuild DB node..
5. got 1 node and 1 typicals.. as expected..
6. couple pressing of Get Souliss Node, to make sure i only get one node..

now turning on the Peer node..

will report asap.. 

Lesjaw Ardi™ ♂

unread,
Jul 8, 2015, 1:41:34 AM7/8/15
to sou...@googlegroups.com
Oh..i havent yet turning on my peer..

Souliss now detect two node Dario, how could that possible? 

Lesjaw Ardi™ ♂

unread,
Jul 8, 2015, 1:48:04 AM7/8/15
to sou...@googlegroups.com
but it wierd, it detect only one typicals, it should be 3 typicals.. and the health status is bad..
It is loading more messages.
0 new messages