// Configure the framework #include "bconf/StandardArduino.h" // Use a standard Arduino #include "conf/ethW5100.h" // Ethernet through Wiznet W5100 #include "conf/Gateway.h" // The main node is the Gateway #include "conf/IPBroadcast.h" // Use IP Broadcast Communication // Include framework code and libraries #include <SPI.h> #include "Souliss.h" // 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 myvNet_address ip_address[3] // The last byte of the IP address (77) is also the vNet address void setup() { Initialize(); // Set network parameters Souliss_SetIPAddress(ip_address, subnet_mask, ip_gateway); SetAsGateway(myvNet_address); // Set this node as gateway for SoulissApp // Set IPBroadcast vNet Address SetAddress(0xAB01, 0xFF00, 0x0000); // This node as gateway will get data from the Peer SetAsPeerNode(0xD002, 1); SetAsPeerNode(0xD102, 2); }
C:\Users\user\AppData\Local\Temp\build3536862247418848190.tmp/core.a(main.cpp.o): In function `main':C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/main.cpp:43: undefined reference to `loop'collect2.exe: error: ld returned 1 exit statusError compiling.
// 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 #include "conf/IPBroadcast.h" // **** Define the WiFi name and password **** #define WIFICONF_INSKETCH #define WiFi_SSID "mywifi" #define WiFi_Password "mypassword" // Include framework code and libraries #include <ESP8266WiFi.h> #include <EEPROM.h> #include "Souliss.h" void setup() { Initialize(); // Connect to the WiFi network and get an address from DHCP GetIPAddress(); SetAsGateway(myvNet_dhcp); // Set this node as gateway for SoulissApp // This is the vNet address for this node, used to communicate with other // nodes in your Souliss network SetAddress(0xAB02, 0xFF00, 0xAB01); SetAddress(0xD001, 0xFF00, 0x0000); } void loop() { ... FAST_BridgeComms(); }
sketch_nov07b.ino: In function 'void loop()':sketch_nov07b:33: error: expected primary-expression before '...' tokensketch_nov07b:33: error: expected ';' before '...' tokenexpected primary-expression before '...' token
// Configure the framework #include "bconf/StandardArduino.h" // Use a standard Arduino #include "conf/usart.h" // USART // Include framework code and libraries #include <SPI.h> #include "Souliss.h" void setup() { Initialize(); // Set network parameters SetAddress(0xD002, 0xFF00, 0xD001); } void loop() { ... FAST_PeerComms(); START_PeerJoin(); }
sketch_nov07b.ino: In function 'void loop()':sketch_nov07b:19: error: expected primary-expression before '...' tokensketch_nov07b:19: error: expected ';' before '...' tokenexpected primary-expression before '...' token
There are dedicated examples here
https://github.com/souliss/souliss/tree/friariello/examples/WiFi
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/356c8fdb-20c2-4c2f-82a9-b3906bd1b42b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
gateway:
#include "conf/ethW5100.h" #include "conf/Gateway.h" #include "conf/usart.h" #include <SPI.h>#include "Souliss.h"
#define RED 0 #define BLUE 1
#define Gateway_address 50#define myvNet_address 50 #define myvNet_subnet 0xFF00#define myvNet_supern Gateway_addressuint8_t ip_address[4] = {192, 168, 1, 50};
uint8_t subnet_mask[4] = {255, 255, 255, 0};uint8_t ip_gateway[4] = {192, 168, 1, 1};
void setup() {
Initialize();Souliss_SetIPAddress(ip_address,subnet_mask,ip_gateway);SetAsGateway(myvNet_address); SetAddress(0xCE01, 0xFF00, 0x0000); SetAsPeerNode(0xCE02, 1);
Set_T11(RED); Set_SimpleLight(BLUE); // 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); pinMode(9, OUTPUT); pinMode(3, INPUT); pinMode(7, OUTPUT);
}
void loop() { // Here we start to play EXECUTEFAST() { UPDATEFAST(); FAST_50ms() {
DigIn(2, Souliss_T1n_ToggleCmd, RED); Logic_T11(RED); DigOut(9, Souliss_T1n_Coil, RED); DigIn(3, Souliss_T1n_ToggleCmd, BLUE); Logic_T11(BLUE); DigOut(7, Souliss_T1n_Coil, BLUE); / } // Here we handle here the communication with Android, commands and notification // are automatically assigned to MYLEDLOGIC FAST_GatewayComms(); }}
and node:
#include "bconf/StandardArduino.h"
#include "conf/usart.h"
#include <SPI.h>
#include "Souliss.h"
#define RED 0
#define BLUE 1
void setup() {
Initialize();
SetAddress(0xCE02, 0xFF00, 0x0000);
Set_T11(RED);
Set_SimpleLight(BLUE);
pinMode(2, INPUT);
pinMode(9, OUTPUT);
pinMode(3, INPUT);
pinMode(7, OUTPUT);
}
void loop() {
EXECUTEFAST() {
UPDATEFAST();
FAST_50ms() {
Logic_T11(RED);
DigOut(9, Souliss_T1n_Coil, RED);
Logic_T11(BLUE);
DigOut(7, Souliss_T1n_Coil, BLUE);
}
FAST_PeerComms();
START_PeerJoin();
}
}
The connection looks ok, is the usb cable connected? If so, disconnect it.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/c73dd2d4-c169-4584-b90f-11598f96f630%40googlegroups.com.
Change this
SetAddress(0xCE02, 0xFF00, 0x0000);
With
SetAddress(0xCE02, 0xFF00, 0xCE01);
From Mobile.
There are example in the example folder, but looks like not a problem of your sketch but of your hardware.
Are you using official Arduino/Genuino boards or clones?
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/souliss/271acd26-da4c-4e0e-aebe-5285fe1c8b17%40googlegroups.com.