Journal 4: Web Server LED Control Project

Successfully completing my first project from a member within the Arduino community!

One of my goals for this journey was to complete a project that was submitted by a member of the Arduino community. After my first failed attempt at completing the Arduino Powered Lucky Cat project, I took a step back and learned how to use the Ethernet Shield. In my second project search I was still interested in finding something related to web development (this time using the Ethernet Shield), but I also made sure to pay more attention to the skill level. The perfect project would also let me utilize some of the beginner knowledge that I had learned about circuits and breadboards.

Finding a beginner level project that used the Ethernet Shield was much harder than I had anticipated. After searching through my usual sites, a simple Google search lead me to a project on startingelectronics.org called Arduino Web Server LED Control.

In this project the Arduino and Ethernet Shield are used as a web server. Together they serve up a simple HTML page with a form that allows you to control an LED on the breadboard that is also powered by the Arduino.

This project ended up being a great success! The instructions on the site were thorough and easy for a beginner to follow. However, as I learned while setting the shield up, I had to call the Ethernet2 library in my sketch instead of the more popular Ethernet library.

Below are screenshots of the set-up and a video of the final working product.

 

Picture of Arduino circuit set up.

 

Screenshot of web page that the Arduino serves up.

 

 

Lessons Learned

Taking a step back after my first failed project was key to the success of this one. Rather than getting discouraged, I recognized that I was entering an area of the Arduino world that was completely foreign to me. While learning about circuits, the Arduino Project Book started by giving an overview of how circuits work in general, and then more advanced topics were slowly introduced as you progressed through the book. I took a similar approach for learning how to connect to the internet. I began by reviewing the basics of web servers, clients, and DNS, and then followed introductory tutorials with the Ethernet Shield before attempting the project described above.


Sources:

Startingelectronics. (2013). Arduino Web Server LED Control. Starting Electronics. Retrieved from https://startingelectronics.org/tutorials/arduino/ethernet-shield-web-server-tutorial/web-server-LED-control/

Save

Save

Save

Save

Save

Getting Started with the Ethernet Shield 2

The Arduino Ethernet Shield allows the Arduino boards to connect to the internet.

I ended up buying my Ethernet Shield 2 through Amazon for $28 in order to get express shipping, but if you shop around you can find it for closer to $20. Adding the Ethernet Shield greatly increases the functionality of the board, allowing the board to be used as both a webserver and webclient. In my opinion, it is definitely worth spending the extra $20 dollars to get this additional functionality.

Resources for getting started with the Ethernet Shield

Running into issues with the Ethernet Shield 2

Setting up the Ethernet Shield 2 looked like it was going to be a breeze – clip the board on, plug the power and Ethernet chord in and you are good to go. Unfortunately, it was not that easy for me. All of the test sketches I ran to verify the internet was working came back with errors or were completely unresponsive. To trouble shoot I replaced my Ethernet chord, did some research to make sure my router was not the issue, and then rewrote all of my sketches to make sure the issue was not caused by a typo on my end. Fortunately, after reviewing some blog posts from others who faced similar issues I came across a post on the Arduino.cc forum from Hydrocontrol called Beginners guide to Arduino Ethernet Shield 2.

Ethernet shields are sold by both Arduino.cc and Arduino.org, and while these boards are similar there is one very important difference that was at the root of my problem. The ORG shield uses a W5500 chip (which is what I have) while the CC boards have a W5100 chip. The reason why this is important is because the W5500 requires a separate Ethernet2 library that must be downloaded from an external source. Fortunately, I learned how to install external libraries from my Arduino Project Book! After updating the libraries in my sketches from Ethernet to Ethernet2, everything ran very smoothly.

Journal 3: Lessons from Attempting My First Arduino Project

One of my goals for this maker journey is to complete a project that was submitted by a member of the Arduino community. The Arduino companies do a great job at getting people started with the tools, but the most creative and innovative projects are contributed by users within the communities. I feel that completing a project from a non-professional maker is a logical next step in my journey.

With tens of thousands of project tutorials online, how do you choose just one?

I am particularly interested in the ways that making can be used as a tool to foster learning through Project-Based Learning (PBL). PBL is a student-centered instructional method in which students learn by developing solutions to real-world problems. While brainstorming various directions to go with my first project, I tried to keep this idea in mind – what real-world problem can I address with the Arduino?

I also felt it was important to pursue a topic that was of interest to me. This would make the project more innately fun and help to keep me motivated. Therefore, I narrowed my search to projects that involved web development and/or Internet of Things (IoT). Not only is this an area that I find interesting, but since it also relates to my job, I thought it would be easier for me to be able to identify real-world issues to solve.

The final and most important factor in selecting a project was my skill level. I enjoy continuously challenging myself, but jumping into a more advanced project too early can be discouraging. I found that reflecting on my learning and being realistic about my skill level was a very important exercise to do throughout this journey. I learned this very quickly after attempting my first project.

First Project Attempt

After searching through projects on my usual sights, I found a tutorial on instructables.com for a project called Arduino Powered Lucky Cat as Physical Webcounter. The author of this project describes how he used a Gif with a fixed IP address as a web counter for his site. When someone visits the site, Arduino is notified, and triggers a servo motor to move. The servo motor in his example was connected to a Lucky Cat’s arm, so every time someone visited his website, the cat would wave its arm. I thought this was a very interesting concept so I gave it a try.

I very quickly ran into issues and realized I was not quite ready for this project. At this point I had yet to use the Arduino to connect to anything outside of the breadboard. I knew so little about connecting to the internet that I didn’t even know where to begin with trouble shooting.

Instead of creating a post in the Arduino forum asking for help, I decided I needed to take a step back and learn more about connecting to the internet before moving forward with this type of project. That night I ordered the Arduino Ethernet Shield. And began reading up on the things it could do.

Lessons Learned

As a beginner, I found it was very easy to get overly excited about starting a project and lose sight over what is realistic with my skill level. This excitement and willingness to try new things is what makes this community so special, but as a newbie it is important to find a balance so that frustrations from failed projects do not chip away at my drive to continue to learn the tool.

The maker mindset

A maker must be able to embrace failure and learn from their mistakes. Failure must be viewed as a vital part of the learning process, and not a sign of weakness. It is something that all makers at all skill levels face. Makers must also be adaptable both in their learning and their project development.

 


Sources

Janhimself. (2012). Arduino Powered Lucky Cat As Physical Webcounter. Instructables. Retrieved from http://www.instructables.com/id/Arduino-powered-Lucky-Cat-as-physical-Webcounter/