Hands on Raspberry Pi

Had ordered a raspberry pi last Saturday. Received the parcel this Thursday at home.

Raspberry Pi

Took a 2GB micro SD card and tried to flash raspbian on it using dd command on linux. But it was saying the card is read only or something. Went on windows and downloaded the flashing tool and it flashed correctly.

Putting the card into the raspberry and powering it up would make the pi flash eight times indicating something’s wrong. The firmware was not able to connect to the sdram. Had to sacrifice my 32GB micro sd to be able to flash the NOOBS on it as it requires 4GB. I could flash my card from linux itself this time.

The raspberry pi finally booted! The problem is i don’t have a usb keyboard at home. Lent a keyboard from my cousin to just setup the system and allow ssh connections. Then i’d control it using my laptop or phone/tablet.

I was able to install webiopi. I could control the GPIO pins using a web interface. Then i tried writing a python script (RPi.GPIO) for automating a change in voltage for a pin.

import RPi.GPIO as GPIO
import time
GPIO.setup(23, GPIO.OUT)
masaw = False
for num in range(0,10):
if(masaw == False):
masaw = True
else:
masaw = False;
GPIO.output(23, masaw)
time.sleep(2)

It worked like magic :3

GPIO on Raspberry

I need to have some switch relays to be able to control real life objects such as my home lights, my washing machine and stuffs. The possibilities are endless.

Leave a Reply

Your email address will not be published. Required fields are marked *