Etherten blocks D11 (pwm 6) on NDrive shield

The EtherTen combines an Uno-equivalent Arduino-compatible board and Wiznet-based Ethernet support, along with a microSD card slot and Power-over-Ethernet support. [Product page]
Post Reply
JanS
Posts: 2
Joined: Wed Oct 11, 2017 9:15 am

Etherten blocks D11 (pwm 6) on NDrive shield

Post by JanS » Wed Oct 11, 2017 1:45 pm

When I start Ethernet.begin(mac, ip); D11 stays high and is not responding.
Wrote a simple test and the channels run correctly until I activate Ethernet.begin(mac, ip); Anyone else with this problem?
Tried this on 3 ethertens.

//
#include <Ethernet.h>

// Network info
byte mac[] = {0xDE,0xED,0xBA,0xFE,0xFE,0xED};
IPAddress ip(192,168,2,100);
IPAddress server(192,168,2,66);
EthernetClient client;
const int pin[]={3,5,6,9,10,11};
int x=0;int y=0;int z=0;

void setup()
{
delay(50);
// setup serial monitor
Serial.begin(9600);
//Ethernet.begin(mac, ip); //Activating this line and D11 stops responding
}
void pinLevel(int L) // set backlight level
{
//Serial.print("void pinLevel(");Serial.print(L);Serial.print(") called");Serial.println();
for(x=0;x<6;x++)
{
analogWrite(pin[x],L);
}
}
void runLight(int L,int M)
{
//Serial.print("void runLight(");Serial.print(L);Serial.print(",");
//Serial.print(M);Serial.print(") called");Serial.println();
for(y=0;y<6;y++)
{
analogWrite(pin[y],L);delay(100);analogWrite(pin[y],M);delay(50);
}
for(y=4;y>0;y--)
{
analogWrite(pin[y],L);delay(100);analogWrite(pin[y],M);delay(50);
}
}
void loop()
{
x=0;
pinLevel(255);
for(x=0;x<10;x++)
{
runLight(0,255);
}
x=0;
pinLevel(0);
for(x=0;x<10;x++)
{
runLight(255,0);
}
x=0;
pinLevel(50);
for(x=0;x<10;x++)
{
runLight(255,50);
}
}

Thanks Jan.

Post Reply