Dear jens0771,
Not sure if you have made progress, but in case not, this may help.
When the Oak is cycling on line and off line rapidly on the particle cloud, it is a moderately bad sign. Please Post the sketch you are trying to compile and upload. I am not sure why you should have issues with the ethernet libraries and it would help to see what your sketch lists for "#include .." statements.
Have you tried to power up your Oak with Pin 1 grounded yet? If not, try this and see if you see your Oak as online w the Particle cloud.
The OAKTerm terminal at
http://rawgit.com/kh90909/OakTerm/master/index.html (log on with your Particle username and password) is an easier tool to see on line status and events imho.
I would recommend using it if you get to the three rapid blink configure state by rebooting with Pin 1 grounded for the first few seconds after power up.
-- add this line to your setup routine to allow communication with the OakTerm:
Particle.begin(); //Allows use of OAKTermNotes: the Particle cloud says flash fails when it succeeds and says it succeeds when it fails so don't worry when Particle says a flash failed
There are almost always the two warnings with the Oak when compiling -- that it is not a ESP2866 device and that it chose to load to the default ROM these are expected
If you still get the ethernet.h or ethernet.cpp errors, move all copies of these files that are messing you up except for the ones included in the OAK libraries to a backup directory
in some folder not on the search path for libraries (say another drive? ). You should have everything you need in your OAK download directories (installed by Arduino board Manager)
for me, these files are here: C:\Users\James\AppData\Local\Arduino15\packages\digistump\hardware\oak\1.0.5\libraries
move any other files that are throwing errors during compile until you use the versions in the 1.0.5\libraries folder.
Here is a tested example. It does not need your Blynk authorization number to compile and run, but you can add it once it runs.
It will blink the LED on Pin 1 every 10 seconds -- you can't do things in the main loop hundreds of times a second while on Particle or Blynk. You can go about once every second max.
When it is working well, then you can add a LED widget to a Blynk app, copy the authorization number into the sketch and use a push mode to a virtual pin to update the LED on the app to sync with your OAK led. This should be something you can modify yourself once your Oak is on line, behaving well and not flooding the cloud server.
eg. Blynk.virtualWrite(V6, ON); would turn on a led widget assigned to virtual pin 6 in Blynk
You get to see the happenings on the OakTerm application and a screen capture below shows what this should be like. It is very useful to follow a new program or when getting started to use Particle.publish("simple text ", "Messages", 60 PRIVATE); statements to see that indeed, things are happening in the correct order and in the prescribed time intervals -- note the 10 second timing of the LED events.
/**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tutorials: http://www.blynk.cc
* Blynk community: http://community.blynk.cc
* Social networks: http://www.fb.com/blynkapp
* http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
* This example shows how to use Digistump Oak with Blynk.
*
* Please be sure to select the right board type
* in the Tools -> Board menu!
*
* Change Blynk auth token to run :)
*
**************************************************************/
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include "SimpleTimer.h"
SimpleTimer timer;
int isLEDon = 0; // simple variable for toggle of LED
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
void setup()
{
Blynk.config(auth); // PLACE YOUR Blynk AUTHORIZATION HERE
// Serial.begin(9600);
// Oak has already configured WiFi
pinMode(1, OUTPUT); // this is our on board OAK led pin
Particle.begin(); //Allows use of OAKTerm
Particle.publish("Starting", " now.", 60, PRIVATE); // something to see in particle log or OakTerm
timer.setInterval(10000, doLED); // For Blynk, we use a timer set for 10 seconds to control timing
// And we do our work in a subroutine called by this timer
// so we don't flood the Blynk server (and get kicked off it!)
}
void doLED ()
{
if (isLEDon == 0)
{
isLEDon = 1;
digitalWrite(1, HIGH); // turn it on
Particle.publish("LED ", "ON", 60, PRIVATE); // you can see these on OakTerm or using LOG on Particle Dashboard
}
else
{
digitalWrite(1,LOW); // turn it off
isLEDon = 0; // toggle
Particle.publish("LED ", "OFF", 60, PRIVATE); // you can see these on OakTerm or using LOG on Particle Dashboard
// comment out when no longer needed or wanted on Particle cloud
}
}
void loop()
{
Blynk.run();
timer.run(); // Initiates SimpleTimer with Blynk, all work goes on outside this simple loop
}