Successfully reported this slideshow.
Pi Maker
Workshop
Powered by:
5.Play Time
http://www.inventrom.com/http://www.robotechlabs.com/
Mayank Joneja
botmayank.wo...
Mayank Joneja
Play music on switch press
import RPi.GPIO as GPIO
from time import sleep
from subprocess import call
GPIO.s...
Mayank Joneja
Sonic Pi
 Sonic Pi is an open source programming
environment designed to explore and
teach programming conc...
Mayank Joneja
 sudo apt-get update
 sudo apt-get install sonic-pi
 play 60
 play 60
play 65
 play 60
sleep 0.25
play ...
Mayank Joneja
Play Music over Bluetooth
 http://www.instructables.com/id/Turn-your-
Raspberry-Pi-into-a-Portable-Bluetoot...
Mayank Joneja
Auto E-Mail
 Install SSMTP: Lightweight SMTP (Simple Mail Transfer
Protocol) server used to send e-mails
 ...
Mayank Joneja
Configurations
 sudo nano /etc/ssmtp/ssmtp.conf
# Config file for sSMTP sendmail
#
# The person who gets al...
Mayank Joneja
Sending the mail
 To send from terminal itself:
 echo “Mail Body”| mail –s “Mail Subject” RecivrMaillD@xyz...
Mayank Joneja
Running the Nokia 6610 LCD
 http://botmayank.wordpress.com/2014/
06/24/running-the-nokia-6610-lcd-with-a-
r...
Mayank Joneja
IR Remote using the Raspberry Pi
 http://botmayank.wordpress.co
m/2014/07/08/ir-remote-for-
nikon-camera-us...
Mayank Joneja
Pi FM
 http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry
_Pi_Into_an_FM_Transmitter
 http:/...
Mayank Joneja
XBMC
 XBMC is a free and open source media player
developed by the XBMC Foundation, a non-profit
technology...
Mayank Joneja
IFTTT
 IFTTT (If this then that) is a service that enables users to
connect different web applications (e.g...
Mayank Joneja
Streaming Live from a Webcam
 http://jacobsalmela.com/raspberry-pi-
webcam-using-mjpg-streamer-over-internet
Mayank Joneja
Hooking up a Relay!
 A relay is a simple electro-mechanical switch
which allows you to control 220V AC main...
Mayank Joneja
RasPi Config
 sudo raspi-config
 Expand File System especially before sudo apt-get upgrade
 Change hostna...
Mayank Joneja
Updating the Firmware
 While trying your hand at a lot of projects, sometimes, having the latest versions o...
Mayank Joneja
Shell Scripting
 http://www.penguintutor.com/raspberryp
i/basic-shell-programming-reference
Mayank Joneja
Running Scripts on Boot
 http://raspberrywebserver.com/serveradmin/run-a-script-on-start-up.html
 2 easy w...
Mayank Joneja
Wi-Fi Dongle Setup
 http://www.maketecheasier.com/setup-wifi-on-raspberry-pi/
Mayank Joneja
USB Internet Dongle
 For Huawei E1731 Airtel connection:
http://saurorja.org/2013/03/30/airtel-3g-modem-e17...
Mayank Joneja
Nearly Headless Nick Pi
 http://inventrom.wordpress.com/2014/04/03/h
ow-to-access-shell-of-your-raspberry-p...
Mayank Joneja
Raspberry Pi B+ !!
https://www.youtube.com/watch?v=0301dw18sXw
Mayank Joneja
Wearables: Lilypad
 http://arduino.cc/en/Main/arduinoBoardLilyPad
Mayank Joneja
Resources
 http://elinux.org/RPi_Tutorials
 MagPi Magazine
 inventrom.wordpress.com
 botmayank.wordpress...
Mayank Joneja
Buying Hardware and Accessories
 http://www.crazypi.com/
 http://www.onlinetps.com/ (General Electronics)
...
Upcoming SlideShare
Loading in …5
×

5.Playtime

840 views

Published on

This is a part of the slide set used at the MakerSpace Noida (India) launch event, Pi Maker Workshop. This slide set is designed to help people get started with the Raspberry Pi and also serves as a collection of innovative projects and some core basic concepts that can aid anybody with their first few steps into the world of DIY electronics or maybe serve as a refresher for the experienced.

Feel free to refer and share but please don't alter the watermarks :)

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

5.Playtime

  1. 1. Pi Maker Workshop Powered by: 5.Play Time http://www.inventrom.com/http://www.robotechlabs.com/ Mayank Joneja botmayank.wordpress.com botmayank@gmail.com
  2. 2. Mayank Joneja Play music on switch press import RPi.GPIO as GPIO from time import sleep from subprocess import call GPIO.setmode(GPIO.BOARD) GPIO.setup(11,GPIO.IN) GPIO.setup(7,GPIO.IN) while True: button1 = GPIO.input(11) button2 = GPIO.input(7) if button 1 == True: print “Button 1 pressed” call(‘omxplayer song1.mp3’) if button 2 == True: print “Button 2 pressed” call(‘omxplayer song2.mp3’)
  3. 3. Mayank Joneja Sonic Pi  Sonic Pi is an open source programming environment designed to explore and teach programming concepts through the process of creating new sounds  Sonic Pi comes with an associated scheme of work which emphasizes the importance of creativity in the learning process and gives users the control to turn their sonic ideas into reality
  4. 4. Mayank Joneja  sudo apt-get update  sudo apt-get install sonic-pi  play 60  play 60 play 65  play 60 sleep 0.25 play 65 sleep 0.5 play 72
  5. 5. Mayank Joneja Play Music over Bluetooth  http://www.instructables.com/id/Turn-your- Raspberry-Pi-into-a-Portable-Bluetooth-A/
  6. 6. Mayank Joneja Auto E-Mail  Install SSMTP: Lightweight SMTP (Simple Mail Transfer Protocol) server used to send e-mails  sudo apt-get install ssmtp  sudo apt-get install mailutils
  7. 7. Mayank Joneja Configurations  sudo nano /etc/ssmtp/ssmtp.conf # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=postmaster # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com mailhub=smtp.gmail.com:587 # Where will the mail seem to come from? #rewriteDomain= # The full hostname hostname=Pi1 # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address AuthUser=popot@gmail.com AuthPass=YourPassword #FromLineOverride=YES UseSTARTTLS=YES UseTLS=YES
  8. 8. Mayank Joneja Sending the mail  To send from terminal itself:  echo “Mail Body”| mail –s “Mail Subject” RecivrMaillD@xyz.com  To include in a python script:  from subprocess import call  call(echo “Mail Body”| mail –s “Mail Subject” RecivrMaillD@xyz.com)
  9. 9. Mayank Joneja Running the Nokia 6610 LCD  http://botmayank.wordpress.com/2014/ 06/24/running-the-nokia-6610-lcd-with-a- raspberry-pi/
  10. 10. Mayank Joneja IR Remote using the Raspberry Pi  http://botmayank.wordpress.co m/2014/07/08/ir-remote-for- nikon-camera-using-the- raspberry-pi-lirc/
  11. 11. Mayank Joneja Pi FM  http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry _Pi_Into_an_FM_Transmitter  http://www.instructables.com/id/Raspberry-Pi-Radio-Transmitter/  wget http://omattos.com/pifm.tar.gz  tar xvzf pifm.tar.gz  Write a script:  import PiFm  PiFm.play_sound(“filename.wav”)  Connect a 20cm or so plain wire to Pin 7 to act as an antenna  Tune an FM radio to 103.3Mhz
  12. 12. Mayank Joneja XBMC  XBMC is a free and open source media player developed by the XBMC Foundation, a non-profit technology consortium  It allows users to play and view most videos, music, such as podcasts from the internet, and all common digital media files from local and network storage media  XBMC for the Raspberry Pi http://wiki.xbmc.org/?title=Raspberry_Pi  http://lifehacker.com/5929913/build-a-xbmc- media-center-with-a-35-raspberry-pi
  13. 13. Mayank Joneja IFTTT  IFTTT (If this then that) is a service that enables users to connect different web applications (e.g., Facebook, Evernote, Weather, Dropbox, etc.) together through simple conditional statements known as "Recipes"  Use IFTTT on the Pi with email as a trigger  http://www.averagemanvsraspberrypi.com/2013/09/make- your-raspberry-pi-tweet-its.html  http://mitchtech.net/connect-raspberry-pi-to-gmail- facebook-twitter-more/
  14. 14. Mayank Joneja Streaming Live from a Webcam  http://jacobsalmela.com/raspberry-pi- webcam-using-mjpg-streamer-over-internet
  15. 15. Mayank Joneja Hooking up a Relay!  A relay is a simple electro-mechanical switch which allows you to control 220V AC mains power supply based devices using the normal 5 or 12 V DC which is used by our microcontroller/microprocessor based system  In order to control the relay using a Raspberry Pi GPIO 3v3 pin, the easiest solution is to involve a transistor as an amplifier to boost both the voltage and the current  The connections are fairly straightforward and it ensures that there’s a certain level of isolation between the Pi and your AC Mains http://raspberrypihobbyist.blogspot.in/2012/09/gpio- output-relay-interface.html
  16. 16. Mayank Joneja RasPi Config  sudo raspi-config  Expand File System especially before sudo apt-get upgrade  Change hostname from raspberry if you want  Preferably change your password from “pi”  Expand root-fs
  17. 17. Mayank Joneja Updating the Firmware  While trying your hand at a lot of projects, sometimes, having the latest versions of firmware and software packages is all you need i.e. the magic formula is: sudo apt-get update sudo apt-get upgrade sudo rpi-update
  18. 18. Mayank Joneja Shell Scripting  http://www.penguintutor.com/raspberryp i/basic-shell-programming-reference
  19. 19. Mayank Joneja Running Scripts on Boot  http://raspberrywebserver.com/serveradmin/run-a-script-on-start-up.html  2 easy ways of doing this: 1. Crontab: sudo crontab -e @reboot /home/pi/servoblaster/PiBits/ServoBlaster/user/servod 2. rc.local sudo nano /etc/rc.local Add “/home/pi/servoblaster/PiBits/ServoBlaster/user/servod &” at the end (the ‘&’ runs it as a background process)
  20. 20. Mayank Joneja Wi-Fi Dongle Setup  http://www.maketecheasier.com/setup-wifi-on-raspberry-pi/
  21. 21. Mayank Joneja USB Internet Dongle  For Huawei E1731 Airtel connection: http://saurorja.org/2013/03/30/airtel-3g-modem-e1731-linux- configuration-complete-guide/  Most importantly, sudo apt-get install usb-modeswitch and then,  http://www.geekride.com/huawei-e173-on-ubuntu/
  22. 22. Mayank Joneja Nearly Headless Nick Pi  http://inventrom.wordpress.com/2014/04/03/h ow-to-access-shell-of-your-raspberry-pi-by- datta_tech-for-inventrom/  Running your Pi Headless means running it without a TV, Keyboard and Mouse
  23. 23. Mayank Joneja Raspberry Pi B+ !! https://www.youtube.com/watch?v=0301dw18sXw
  24. 24. Mayank Joneja Wearables: Lilypad  http://arduino.cc/en/Main/arduinoBoardLilyPad
  25. 25. Mayank Joneja Resources  http://elinux.org/RPi_Tutorials  MagPi Magazine  inventrom.wordpress.com  botmayank.wordpress.com  http://www.raspberrypi.org/forums/  YouTube ! Raspberry Pi, BenHeck Show, RaspberryPiGuy, RaspberryPi4Beginners, Element14, Sparkfun, Geek Gurl Diaries, Alex Eames  https://learn.adafruit.com/category/learn-raspberry-pi  http://www.element14.com/community/community/raspberry-pi  http://raspberrypi.stackexchange.com/  www.instructables.com  www.makezine.com  www.thepihut.com  http://damnfineraspberrypi.com/
  26. 26. Mayank Joneja Buying Hardware and Accessories  http://www.crazypi.com/  http://www.onlinetps.com/ (General Electronics)  http://www.greenindiaelectronics.com/Raspberry-PI  In Delhi-Chandni Chowk - http://www.chandnichowknowonline.in/electronics-accessories  www.rhydolabz.com  www.sparkfun.com

×