Anonymous

Project:Nanode/Applications: Difference between revisions

From London Hackspace Wiki
Using the spelling "EtherShield" rather than "Ethershield" consistently for the name of the directory for the library - to match the library's name.
(→‎Quick Tutorial: Include instructions for editing NanodeMAC.cpp to correct case error for #include of WProgram.h)
(Using the spelling "EtherShield" rather than "Ethershield" consistently for the name of the directory for the library - to match the library's name.)
Line 150: Line 150:
Once you have built your Nanode and got the red flashing LED which shows that all is well with the ATmega328 microcontroller and its bootloader program, it is now time to test the rest of the system, which includes the ENC28J60 ethernet controller and its interface through the magjack connector to the ethernet port.
Once you have built your Nanode and got the red flashing LED which shows that all is well with the ATmega328 microcontroller and its bootloader program, it is now time to test the rest of the system, which includes the ENC28J60 ethernet controller and its interface through the magjack connector to the ethernet port.


Conveniently, Andrew Lindsay, has provided some simple example to accompany his Ethershield Library. It is common practice amongst Arduino libraries to provide accompanying tried and tested code examples, which are loaded as part of the library folder.
Conveniently, Andrew Lindsay, has provided some simple example to accompany his EtherShield Library. It is common practice amongst Arduino libraries to provide accompanying tried and tested code examples, which are loaded as part of the library folder.


First you need to download and install the EtherShield library from GitHub
First you need to download and install the EtherShield library from GitHub
Line 156: Line 156:
https://github.com/thiseldo/EtherShield
https://github.com/thiseldo/EtherShield


Make sure you have Arduino 0021 or better still 0022 installed, and press the download button. This will download the library as a .tar or .zip format into a temporary folder.  Unzip the contents of this zip and put it in a folder named "Ethershield" within the Arduino/libraries folder.
Make sure you have Arduino 0021 or better still 0022 installed, and press the download button. This will download the library as a .tar or .zip format into a temporary folder.  Unzip the contents of this zip and put it in a folder named "EtherShield" within the Arduino/libraries folder.


(Remove any previous version of Ethershield library - as this causes code compilation problems).
(Remove any previous version of EtherShield library - as this causes code compilation problems).


When you restart the Arduino IDE, it will find this new library and add it into the Examples on the Files menu.
When you restart the Arduino IDE, it will find this new library and add it into the Examples on the Files menu.
Line 165: Line 165:
'''DHCP Test'''
'''DHCP Test'''


Open Arduino IDE and select File/Examples/Ethershield/EtherShield_DHCPTest
Open Arduino IDE and select File/Examples/EtherShield/EtherShield_DHCPTest


Scroll down the code until you find the lines
Scroll down the code until you find the lines
9

edits