You have a calendar application on your computer or a smartphone, but sometimes it might be useful to make it easily viewable to others (or even to yourself). This project describes how to make an Internet connected calendar. Particularly it uses Google Calendar service. The project is not complicated to make, but it assumes you're familiar with Galileo (if not, read this excellent Getting Started Guide
You're going to need the following supplies:
- Intel Galileo board, with power supply and USB cable (either Gen 1 or Gen 2 will do)
- An LCD or VFD display with parallel (Hitachi HD44780 compatible) interface. The code assumes using two rows display (some modifications will be needed for 4 row displays). For LCD you're also going to need a 10 kohm potentiometer for contrast adjustment.
- Some wires to connect LCD to Galileo. Possibly a breadboard.
- Console cable (RS232 type for Galileo Gen1, or USB to serial converter for Galileo Gen2). It will be useful for installing and configuring software on the Linux side.
- Micro SD card, big enough to fit Galileo SD image.
- Ethernet cable - for wired connection.
- Mini PCI-e wireless card and antenna for wireless connection (see my blog for parts).
- Battery for RTC and a battery holder with header (3V, a CR2032 or similar lithium battery, or a pair of AAA batteries). This to keep RTC running while board is powered off.
- A Google account with a calendar.
For wireless connection - install PCI-e card, and connect antenna as described in my blog
Next connect LCD display to Galileo as described in Arduino LCD tutorial.
Connect the serial console. I posted instructions for Galileo Gen 1. For Galileo Gen 2 a cable with built-in serial to USB converter can be used.
Connect the RTC battery to the header on the Galileo. Make sure to observe the polarity.
The project two software components: GoogleCL
for querying Google Calendar, and a sketch to parse and display information on the LCD display.
Installing Arduino IDE and Linux SD image
Download and install Arduino IDE for Galileo. Also download Linux Image for SD card. Both downloads are available from Intel Download Center. Plug Micro SD card to your computer, and unpack Linux image to that card. Make sure to preserve directory structure - all files except of grub.conf should be in root directory of SD card, the grub.conf should be in boot/grub/grub.conf.
Wired network using DHCP
Galileo SD image comes with wired Ethernet enabled, and configured for DHCP operation. So just plug your Galileo to your switch or router and you're done!
Wired network using a static IP address
Connect to your Galileo with serial console and as 'root' user. Edit /etc/network/interfaces file, change
iface eth0 inet dhcp to
iface eth0 inet static and add the configuration for your Еthernet interface. For example:
iface eth0 inet static
dns-nameservers 184.108.40.206 220.127.116.11
Please refer to Configuring Wireless In Linux / Intel Supplied SD Card Image on my blog page.
Installing and Configuring GoogleCL
Download gdata-python-client and GoogleCL. You can either download these files from your computer and copy them to the Micro SD card, or connect your Galileo to the network and download these files using wget command:
Connect to your Galileo with serial console and login as 'root' user.
Unpack and install gdata:
tar zxvf /media/mmcblk0p1/gdata-2.0.18.tar.gz
python setup.py install --record=files.txt
Unpack and install GoogleCL
tar zxvf /media/mmcblk0p1/googlecl-0.9.14.tar.gz
python setup.py install --record=files.txt
Set the current date in Galileo Linux and write it RTC. The format of the date is MMDDhhmmCCYY, where MM - month (01 to 12), DD - day of month (1 to 31), hh - hours (24 hours format, so from 00 to 23), mm - minutes, CCYY - 4 digit year (e.g. 2014)
google calendar list command. First time it will ask for Google account email address, and will provide a URL to register the application.
Installing the sketch program
Download the sketch code from the Files section at the bottom of this page. Launch Arduino IDE, open the sketch, and upload it to the Galileo.
Customizing the sketch
Number of display columns
If your screen has a number of columns is different from 24, update the following line accordingly:
# define LCD_COLUMNS 24