Saturday, July 15, 2017

How to fix your screen resolution on your RPi

This is a decently common problem some of my students run into. Follow the steps I've written out below to fix this issue!

Problem: My screen is very zoomed in on my Raspberry Pi!

To fix the size of your screen:
1. Open LX Terminal
2. Type:
      sudo nano/boot/config.txt
           and press enter
3. Use arrow keys to find "hdmigroup" and "hdmimode"
4. Change "hdmigroup" to 82 and "hdmimode" to 2
5. Press ctrl + x
6. Press y
7. Press Enter
8. Type:
       sudo shutdown -r now
             (this will restart your RPi)

That should do it. If you run into any issues with this please let me know!

Thursday, June 29, 2017

Turtle Mystery Images!

** The following is Python 2.7 (This will be IDLE, not IDLE 3, on your Raspberry Pi's!) **

Found some fun turtle graphics online! Type in the below code into IDLE to find out what the mystery Turtle image is! Try changing the numbers – What happens? Which line would we change to change the size? How do we change the color?


Mystery Turtle Image #1


import turtle

spiral = turtle.Turtle()

for i in range(20):
   spiral.forward(i * 10)
   spiral.right(144)

turtle.done()


Mystery Turtle Image #2


from turtle import *

color('red','yellow')
begin_fill()
while True:
   forward(200)
   left(170)
   if abs(pos()) < 1:
      break
end_fill()
done()


Mystery Turtle Image #3


import turtle

ninja = turtle.Turtle()
ninja.speed(10)

for i in range(180):
   ninja.forward(100)

   ninja.right(30)
   ninja.forward(20)
   ninja.left(60)
   ninja.forward(50)
   ninja.right(30)
   ninja.penup()
   ninja.setposition(0, 0)
   ninja.pendown()
   ninja.right(2)

turtle.done()

Tuesday, June 27, 2017

Looking for summer projects?

I've seen some very cool things done with the Raspberry Pi lately, and have included some links to these below. Hoping to inspire everyone to start on a cool new Raspberry Pi project this summer!

GreenPiThumb: A Raspberry Pi Gardening Bot
Raspberry Pi Arcade Table
Burping Jelly Baby
Parent Detector 
mintyPi 2.0
Raspberry Pi Microwave
Touch Screen Photo Booth
Build your own Amazon Echo with Raspberry Pi
Build a Robot that read audiobooks/tweets aloud


Are there other Raspberry Pi projects you think are cool? Let us know!

Thursday, March 2, 2017

Anatomy of the Raspberry Pi



Raspberry Pi Model B
  1. GPIO Headers
  2. SD Card slot (This is on the bottom side)
  3. Display DSI Connector
  4. Micro USB Power
  5. CPU/GPU
  6. HDMI 
  7. Camera CSI Connector
  8. Ethernet
  9. LAN controller
  10. USB 2.0 port
  11. Status LEDs
  12. Audio
  13. JTAG Headers
  14. RCA (video)
Raspberry Pi 2 Model B

  1. GPIO Headers
  2. Status LEDs
  3. Micro SD Card slot (This is on the bottom side)
  4. Display DSI Connector
  5. Micro USB Power
  6. HDMI
  7. CPU/GPU
  8. Camera CSI Connector
  9. Audio
  10. Ethernet
  11. USB 2.0 ports
  12. USB 2.0 ports
  13. LAN Controller

But What Do All Of These Parts Do?

Status LEDs - These diodes are indicators of what happening on our RPi. PWR lights up when we have the RPi plugged into a power source. This could help us with troubleshooting, for example, if your RPi stops working and the PWR light isn't on it could be a faulty power cord (or maybe we forgot to plug it in!). The other one you'll want to pay attention to is the ACT light

HDMI - Stands for High Definition Multimedia Interface, this is what connects us to our HD monitors/TVs.

SD Card slot - You'll notice on the two versions of the Raspberry Pi listed above, the older version uses an SD card and the newer version uses a micro SD card, so if you dont already have an RPi and are planning on getting on, make sure you get the correct SD card! The SD card is important because this is where we install our OS (Operating System) -- Without it, our RPi will not be able to boot up! On the RPi 2 you'll want to make sure the SD card clicks in, and you'll want to click it inward again to get it out without damaging the SD card.

Micro USB Power - This is a 5v Micro USB power connector, and is required to turn your RPi on. You may notice that this is the same as a phone charger that you would use for (most) Android phones! Just make sure that you aren't using anything above 5v as you might "fry your pi"!

Audio - This is a 3.55-millimeter jack to connect the RPi to an audio source, such as speakers or headphones!

GPIO Headers
 - This stands for General Purpose Input/Output, and they serve as connection points to connect out RPi to the outside world, but you can think of them more like switches.

USB 2.0 port - Stands for Universal Serial Bus. This where we can plug in things such as keyboards, a mouse, external storage like USB drives (aka thumb drives), WiFi dongles, etc. The older version of the RPi only has two of these, but the RPi 2 has a total of 4. However, if you run out slots you can also plug in a USB Hub, which will give you more as well!

Ethernet - If you don't have a wireless network or WiFi dongle, the ethernet port allows us to plug in directly and access the internet.

RCA (video) - This jack lets us connect to old school analog TVs. This is a separate option from using HDMI, which is a digital connection. HDMI is preferred because digital is less glitchy than analog, and HDMI does both video AND audio (less cords!). If you use this port, you'll also need to make sure you have something plugged into the Audio jack if you want sound.

CPU/GPU - Stands for Central Processing Unit (CPU) and Graphics Processing Unit (GPU). The CPU is what deal with everything that makes the computer work, and the GPU deals with graphics output

Tuesday, February 21, 2017

Turn your Raspberry Pi into an XBMC Media Center

Your Raspberry Pi can easily become your very own home media center and is a project that just about anyone can do! Using the following instructions, you can plug your Raspberry Pi into a TV and use it as a digital photo album, or play movies and music from a USB, radio stream, or online companies like Netflix (you WILL need an account to stream Netflix). Interested? Lets get started!

What You Will Need
- 8GB SD Card that holds your OS
- Wifi Dongle (USB)
- USB (if you plan on loading media from one)
- Raspberry Pi
- USB Power Supply for Raspberry Pi
- USB Keyboard/mouse
- HDMI cable
- A display for your media center -- You can use an old LED/LCD computer monitor with HDMI or VGA (Please note that if you use VGA you will need an HDMI-VGA converter cable), or even hook it up to most modern TVs (As long as it has an HDMI port).

In case you are having trouble finding these items, or if you just want to order everything from Amazon, I have each item hyperlinked (Except the LED/LCD screen). Also, you can buy everything in a bundled kit on amazon as well for ~$55-$60, excluding the keyboard/mouse and display screen. Find it here.

Installing OSMC onto your Raspberry Pi
Older tutorials might tell you that you'll want to install Raspbmc (Raspberry Pi Media Center) -- However, Raspbmc is no longer being maintained/updated, so we are going to use its successor OSMC. Raspbmc and OSMC are versions of XBMC that have been optimized for use with the Raspberry Pi -- but keep in mind there are other versions of XBMC out there as well, each with their own advantages/disadvantages.

The first step is to install OSMC onto your 8GB SD Card using your home computer/laptop -- You'll want to follow the instructions for that on this page. From there, you will download the appropriate package based on whether your home computer/laptop using Windows, OS X (Mac), or Linux.
Once downloaded, make sure your SD card in in your SD card reader on your home computer/laptop and then go ahead and run the installer you just downloaded.

At this point, you might run into a snag if you are on a Mac and see the following:
Since this project is Open Source and something we are downloading from the internet, your computer's security preferences are flagging this as an "unidentified developer." To get around this, go to your top-left corner and click the Apple icon and go to "System Preferences...". From there we want to enter "Security & Privacy". Your screen should now look like this:
You may need to click the lock so you can makes changes, but what we want to do is change "Allow apps downloaded from" from "Mac App Store and identified develops" to "Anywhere". We can change this back (which is recommended) after we've run the installer. Once this is saved, go ahead and try running the installer again.

Now that the installer is running, it will give you options for language and what you want to install OSMC on. Choose the appropriate version of Raspberry Pi you have, and for version choose the latest version (at time of writing this blog post it was 2017.02-2). From there just fill everything out and install it "on an SD card." If you have a WiFi dongle, you can setup the wireless connection, or you can skip this step and just continue with wired. Don't forget to select your SD card under the device selection. Once you've fill everything in, go ahead and click install. NOTE that this will erase anything else you had on that SD card, so make sure you've saved anything you want to keep on your desktop/laptop/USB drive!

Hook Up Your Raspberry Pi
All you have to do now is hook up your Raspberry Pi just like you would if you were using it as a computer. Make sure to transfer your SD card from your home computer/laptop to the Raspberry Pi, plug in the USB mouse/keyboard, connect the HDMI to the Pi and LED/LCD screen (or TV), and lastly connect it to your power source (micro USB power supply). The Raspberry Pi will automatically boot up from the SD card and begin the installation process. Once finished, you'll want to reboot your Raspberry Pi and it will automatically start OSMC!

From here you can plug in your USB with videos/music/photos etc. and begin using your Raspberry Pi as a Media Center! Look for further posts on OSMC and how to optimize your Raspberry Pi media center.


Questions? Comments? Anything you want me to dig deeper on? Let me know via comments or email!