Following the previous blog Step by Step Build Trick or Trivia Halloween Candy Dispenser #1, I will start from configuring WiFi. I used a couple of links to help me set up Wifi: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md and How-To: Add WiFi to the Raspberry Pi | Raspberry Pi HQ. Basically you need add a new network in /etc/wpa_supplicant/wpa_supplicant.conf file like this
network={ ssid="your router ssid" psk="wifi password" }
After configuring Wifi, I rebooted Pi 2 and unplugged the Ethernet cable. I opened my router's website and found the new IP address(e.g., 192.168.1.112) assigned to Pi's wifi interface. Then SSH to the Pi 2 using command
ssh pi@192.168.1.112
And Pi 2 accepted the connection as expected
$ ssh pi@192.168.1.112 pi@192.168.1.112's password: Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sun Oct 18 13:37:31 2015 from lianhongs-air NOTICE: the software on this Raspberry Pi has not been fully configured. Please run 'sudo raspi-config'
and Pi 2 had no abnormal behavior
After you have the network connection, you need make sure you have the latest Raspbian OS (you can download from https://www.raspberrypi.org/downloads/raspbian/) installed. Otherwise, you need run the following update and upgrade commands:
$sudo apt-get update $sudo apt-get upgrade -y
Now, it's the time to mount Pi 2 on the LCD panel. The picture below shows the parts to mount together.
If you haven't used LCD flexi cable before, please note that the latch on the connector is usually closed when it arrives. You need open it before you insert the flexi cable into the connector as shown below. The first pic shows close state while the second shows it in open state. To open it, just pull the latch from the two ends simultaneously.
Next insert the flexi cable to the connector on the LCD driver board through the bottom of the latch (shown below). After the cable is inserted, remember to close latches by pushing two ends back.
Then connector the other cable to the driver board as well. Also screw in the four standoffs as shown below.
Next, we connect driver board with the Pi 2. Please note that the flexi cable needs to insert into the connector through the top of the latch this time rather than through the bottom.
Next, connect the other end of the flexi cable to Pi 2's display port. Also connect two wires from the driver board to Pi 2's GPIO pin#2 & #6 as shown below.
Now time to power up the Pi & LCD. You cannot use the power adapter came with the kit as described in my previous blog (Step by Step Build Trick or Trivia Halloween Candy Dispenser #1). You have to use a 5V, 2A adapter. If everything goes well so far, you should be able to see Desktop on the LCD display as shown below. I assume you have completed the OS configuration using command sudo rasp-config and configured the automatic startup of desktop.
In summary, I got wifi and LCD work in this blog. I will continue my work and stay tune for the next blog Step by Step Build Trick or Trivia Halloween Candy Dispenser #3.
Top Comments