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:
The HardwareFor 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 SoftwareThe 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 imageDownload 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. Configuring NetworkWired network using DHCPGalileo 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 addressConnect to your Galileo with serial console and as 'root' user. Edit /etc/network/interfaces file, change auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 8.8.4.4 Wireless network Please refer to Configuring Wireless In Linux / Intel Supplied SD Card Image on my blog page. Installing and Configuring GoogleCLDownload 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: cd /media/mmcblk0p1/ wget http://googlecl.googlecode.com/files/googlecl-0.9.14.tar.gz 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 cd gdata-2.0.18 python setup.py install --record=files.txt cd .. Unpack and install GoogleCL
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) date 100917002014 hwclock -w Finally run Installing the sketch programDownload 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 sketchNumber of display columnsIf your screen has a number of columns is different from 24, update the following line accordingly: # define LCD_COLUMNS 24 Display connectionModify the pin numbers in the following line according to the pin numbers your LCD/VFD display is connected to. LiquidCrystal lcd(8, 13, 2, 3, 4, 5);
Calendar queryThe sketch uses the following command command to run googlecl: system("HOME=/home/root TZ=PST8PDT google calendar list -d today,tomorrow --cal=.* > /media/realroot/calendar.txt"); This will query all the calendars you're subscribed to (and have access to), for the current day (today), and the next day (tomorrow). Here are some possible modifications:
|
Home > Sergey's Projects >