// Let the IDE point to the Souliss framework#include "SoulissFramework.h"
// Configure the framework#include "bconf/MCU_ESP8266.h" // Load the code directly on the ESP8266#include "conf/SuperNode.h" // The main node is the Gateway, we have just one node#include "conf/usart.h" // USART / RS485 transceiver#include "conf/IPBroadcast.h"
// **** Define the WiFi name and password ****#define WIFICONF_INSKETCH#define WiFi_SSID "xxx"#define WiFi_Password "xxxxxxxx"
// Include framework code and libraries#define USARTDRIVER_INSKETCH#define USART_TXENABLE 1#define USART_TXENPIN 5#define USARTDRIVER Serial
// Include framework code and libraries#include <ESP8266WiFi.h>#include <EEPROM.h>
/*** All configuration includes should be above this line ***/ #include "Souliss.h"
// This identify the number of the LED logic#define MYLEDLOGIC 0
// **** Define here the right pin for your ESP module **** #define OUTPUTPIN 4
void setup(){ Initialize();
uint8_t ip_address[4] = {192, 168, 80, 181};uint8_t subnet_mask[4] = {255, 255, 255, 0};uint8_t ip_gateway[4] = {192, 168, 80, 1};#define myvNet_address ip_address[3]
// This is the vNet address for this node, used to communicate with other // nodes in your Souliss network SetAddress(0xAB02, 0xFF00, 0x0000); SetAddress(0xCE01, 0xFF01, 0xAB02); SetAsPeerNode(0xCE02, 1); Set_SimpleLight(MYLEDLOGIC); // Define a simple LED light logic pinMode(OUTPUTPIN, OUTPUT); // Use pin as output }
void loop(){ // Here we start to play EXECUTEFAST() { UPDATEFAST(); FAST_50ms() { // We process the logic and relevant input and output every 50 milliseconds Logic_SimpleLight(MYLEDLOGIC); DigOut(OUTPUTPIN, Souliss_T1n_Coil,MYLEDLOGIC); } // Here we handle here the communication with Android FAST_GatewayComms(); }}
Arduino: 1.8.3 (Windows 10), Board:"NodeMCU 0.9 (ESP-12 Module), 80 MHz, 115200, 4M (3M SPIFFS)"
C:\Users\stef\AppData\Local\Temp\arduino_modified_sketch_480714\e02_WiFitoRS485_n1.ino:28:0: warning: "USART_TXENABLE" redefined [enabled by default]
#define USART_TXENABLE 1
^
In file included from C:\Users\stef\AppData\Local\Temp\arduino_modified_sketch_480714\e02_WiFitoRS485_n1.ino:16:0:
C:\Users\stef\Documents\Arduino\libraries\souliss-7.2-friariello.1/bconf/MCU_ESP8266.h:52:0: note: this is the location of the previous definition
#define USART_TXENABLE 0
^
C:\Users\stef\AppData\Local\Temp\arduino_modified_sketch_480714\e02_WiFitoRS485_n1.ino:29:0: warning: "USART_TXENPIN" redefined [enabled by default]
#define USART_TXENPIN 5
^
In file included from C:\Users\stef\AppData\Local\Temp\arduino_modified_sketch_480714\e02_WiFitoRS485_n1.ino:16:0:
C:\Users\stef\Documents\Arduino\libraries\souliss-7.2-friariello.1/bconf/MCU_ESP8266.h:53:0: note: this is the location of the previous definition
#define USART_TXENPIN 2
^
sketch\e02_WiFitoRS485_n1.ino.cpp.o:(.text.loop+0x14): undefined reference to `Souliss_CommunicationChannels(unsigned char*)'
sketch\e02_WiFitoRS485_n1.ino.cpp.o:(.text.loop+0x18): undefined reference to `Souliss_GetTypicals(unsigned char*)'
sketch\e02_WiFitoRS485_n1.ino.cpp.o: In function `loop':
C:\Users\stef\Documents\Arduino\libraries\souliss-7.2-friariello.1/base/T1n.cpp:34: undefined reference to `Souliss_CommunicationChannels(unsigned char*)'
C:\Users\stef\Documents\Arduino\libraries\souliss-7.2-friariello.1/base/T1n.cpp:34: undefined reference to `Souliss_GetTypicals(unsigned char*)'
collect2.exe: error: ld returned 1 exit status
Meerdere bibliotheken gevonden voor "SoulissFramework.h"Gebruikt: C:\Users\stef\Documents\Arduino\libraries\souliss-7.2-friariello.1Niet gebruikt: C:\Users\stef\Documents\Arduino\libraries\soulissNiet gebruikt: C:\Users\stef\Documents\Arduino\libraries\soulissNiet gebruikt: C:\Users\stef\Documents\Arduino\libraries\soulissNiet gebruikt: C:\Users\stef\Documents\Arduino\libraries\soulissexit status 1Fout bij het compileren van board NodeMCU 0.9 (ESP-12 Module)
This report would have more information with"Show verbose output during compilation"option enabled in File -> Preferences.
A supernode is not a gateway, so you should not process FAST_GatewayComms(); but the Peer ones instead.
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+unsubscribe@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/7eb9abd9-0de0-4633-8194-aeef875c7a74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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/n4T7zVG240o/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.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAKGhMPJpJRzEf6_4tkyOc1smk5_GtS6N_e0Qss89rbVU%3DPjEWg%40mail.gmail.com.
It won't you have to correct the addresses, there is an example on the wiki that fits your case.
Do not forget routing path (either dynamic or static)
https://github.com/souliss/souliss/wiki/ESP8266-to-RS485
Dario.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CALySKD_CYc_fWg_Op%2B4WeVW_Ox2KxwahSKGX%2BE5ozWBruzYFEQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CAKGhMPLtGba6u8ORtEaAhFuJqtM75CxLKGRjtGyzHauDAfkKKw%40mail.gmail.com.
Yes it can behave as any other node.
You have defined your nodes in the Gateway, so SoulissApp has the full list even if there is no connection with those (so healthy is low).
Your Gateway and your Bridge will communicate via IP so you should see the T19s of the Bridge regardless the RS485 connectivity.
Get your Bridge online and visible in SoulissApp then move to RS485.
Dario.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/CALySKD_VcSNd0V20Zem6uPQHsjgDNC2eLrP7J0v4FY7GDnr1aw%40mail.gmail.com.