m5stack / M5Atom

M5Stack Atom Arduino Library
MIT License
227 stars 72 forks source link

Atom_POE Ethernet2 vs Ethernet #37

Closed supaplextor closed 3 years ago

supaplextor commented 3 years ago

Hello, I have a handful of Atom_POE devices, and my first proof of concept was to use this code:

https://github.com/m5stack/M5Atom/tree/master/examples/ATOM_BASE/ATOM_PoE

The sample sketch relies on Ethernet2. It will not compile, returns an error "cannot declare variable server to be of abstract type EthernetServer.

I've attempted to poke around and use Ethernet.h; I'm unable to see that work as well. Can someone work on this and update from legacy code (Ethernet2 is end-of-life aka technical debt).

Thank you!

felmue commented 3 years ago

Hello @supaplextor

please have a look at a possible solution here - this should allow the example to compile with Ethernet.h:

Thanks Felix

supaplextor commented 3 years ago

Thank you,

I Modified these sources accordingly: