Controlling a led over the Internet using Arduino and Ethernet Shield

Ethernet Shield enables us to connect Arduino to an ethernet network and build projects which send and receive information via local network and internet. The device, along with its control library, allows the design of network applications easily. There is no need to worry about the complicated signaling schemes in ethernet networks since all control and connection are made by library routines. After the connection is established, we may just read or write data through it, similarly to a conventional serial connection.

In the following, we show an example of a project of a web page that allows you to turn on or turn off a digital port of the Arduino via the local network or the internet. In a practical application, the project could be used to control a lamp, serving as a good “Hello World” application for home automation with Arduino. In this example, the idea is to focus on the design of the software required for the application so that we will consider the connection of led to the Arduino port and show one of the most expensive ways to light a led.

Read More

E-mail backup with NoPriv.py

Listening to the Linux Action Show podcast, I heard about a Python script to backup e-mails from IMAP accounts that downloads messages and attachments and offers everything on a nice local HTML page.

The script is called NoPriv.py and can be found on this page and on this Github repository. Given an IMAP e-mail account and a list of folders to be copied, it creates the HTML files structure to access the messages as shown in this demo page. The backup can be made incrementally, transfering only the new messages each time the script is run.

Read More

More courses on the web

It’s been a while since the emergence of university courses on the web. Currently, almost all major universities maintain projects regarding on line courses such as Open Course Ware provided by MIT and Open Yale Courses, by Yale University.

In these projects, at first, only written material such as student’s notes and exercises were provided. However, with the arise of video distribution through the web, it didn’t take long before cameras were used to record the classes and make the videos available on the web.

Read More

Hello World with Arduino

In 2005, I came across a project called Arduino, which drew my attention since it was a project of open source hardware. At the same year, I tried to assemble one but I ended leaving the project aside due to the college activities. Today, I regret I haven’t dedicated more some time to this project in the past, given the way it grew.

For those who don’t know, Arduino is a project composed by hardware and software for the development of applications which interact with the real world using sensors and actuators. It was conceived to permit the creation of projects by people who don’t have much knowledge on hardware or electronics such as hobbyists, artists and designers.

Read More

Python for scientific applications – the very basics

Lately, I’ve been studying a little about Python and the more I learn the more I become interested about this language. It was the first time I had contact with a language that uses dynamic typing and since the first time I used it, I had the impression it could be a good replace for Matlab. I like Matlab, but the fact of being proprietary and not being a general-purpose language makes Python a better solution for me.

Read More

Organizing with Emacs Org-Mode

Another interesting Emacs mode is Org-Mode. It permits to make annotations and manage to-do lists and projects using text files with some special marks.

The marks as interpreted by Emacs, so that it separates the various parts of the text, which facilitates obtaining information. It is possible to organize an agenda with appointments set up on specific dates and also tasks without due dates. With every agenda item, it is possible to associate tags, which can be used to filter search results. These features make Org-Mode a good resource for those who use GTD. For those who don’t know GTD, it is worth to take a look. It was proposed by David Allen and is described in the book “Getting things done”. A brief description of the method can be seen on this presentation which was given at Google and on this reference card.

Read More

Emacs and AUCTEX to edit LaTeX documents

Some years ago, one of the problems I had when I was migrating my desktop to GNU/Linux was finding a development environment for LaTeX. For those who don’t know LaTeX, it’s worth checking out. It is a “document preparation system” widely used for producing mathematical and scientific texts due to its high typographic quality.

By the time I was using MS Windows, I used TeXnicCenter to edit LaTeX projects. Despite its limitations, it did its job well done. On GNU/Linux, I initially tried the Kile editor. Although I consider it an excellent editor, I missed a basic feature: spell correction on the fly (those red marks that are shown under the words when they are spelled incorrectly). Perhaps I had this problem because I was trying to use Kile with GNOME as it was originally developed to be used with KDE.

Read More