Finally after slow progress I’m releasing an update to my ENC28J60 Ethernet library. This is version 1.6. There is still work that can be done on it but for now I’m sending it off into the wild to let others have a play.
Changes made are:
- Updated library filenames so that it should compile correctly under both Linux and Windows versions of the Arduino IDE
- Alternative EtherShield::ES_enc28j60Init that includes a parameter to specify which pin the CS line is on. This is for hacked boards where more than one well behaved SPI device are used together (I have used this with EtherShield with tri-state buffers and a RF12 module together)
- Converted 8 bit ENC28J60 writes to 16 bit writes where applicable, i.e. it now takes 1 operation to update a register not 2.
- Added support for DNS queries, no need to get IP addresses now. Also handles multiple response records and picks the first valid A record.
- Updated examples:
- Twitter client now uses supertweet.net to post updates as twitter.com no longer supports basic authentication.
- DNS client example – provides a web page where you enter the site, click reload link and it shows the IP address.
- Retrieve CSV values from a Pachube feed
- Broadcast a udp packet on the local network – this could be from a sensor that is then picked up by a daemon running on another machine. I currently use this for currentcost and RF12 data from Jeenodes
There are still a couple more example files that I have yet to finish including NTP usage.
Updating existing code
As the library filename has changed you will need to change your #includes to the correct name, this is EtherShield.h not etherShield.h. You will also have to remove the old library directory to prevent any clashes during compilation.
UPDATE This version has already been updated to fix a problem when sending PUT requests to Pachube.com.
Download library EtherShield_1.6.zip
- Fully document the library
- Add more examples
- Add TCP support for sessions with more than 1 data packet transferred so that mqtt can be implemented
- Tidy up some of the code
Enjoy and feedback welcome.