embedded system,arduino,raspberry pi,msp430f169, ARM7

Tuesday, April 22, 2014

On 11:36 AM by array operation   No comments


OMXPlayer is a commandline OMX player for the Raspberry Pi. It was developed as a testbed for the XBMC Raspberry PI implementation and is quite handy to use standalone.

Downloading OMXPlayer

git clone git://github.com/huceke/omxplayer.git

Compiling OMXPlayer

GCC version 4.7 is required.

Cross Compiling

You need the content of your sdcard somewhere mounted or copied. There might be development headers to install on the running Pi system for the crosscompiling.
Edit Makefile.include and change the settings according your locations.
make ffmpeg
make dist

Installing OMXPlayer

Copy over omxplayer-dist/* to the Pi /. You may want to specify a valid font path inside the omxplayer shell script.

Compiling on the Pi

You can also compile it on the PI the native way ;) Run this script (which will install packages and update firmware) ./prepare-native-raspbian.sh and build with make ffmpeg make

Using OMXPlayer

Usage: omxplayer [OPTIONS] [FILE]
Options :
         -h / --help                    print this help
         -n / --aidx  index             audio stream index    : e.g. 1
         -o / --adev  device            audio out device      : e.g. hdmi/local
         -i / --info                    dump stream format and exit
         -s / --stats                   pts and buffer stats
         -p / --passthrough             audio passthrough
         -d / --deinterlace             deinterlacing
         -w / --hw                      hw audio decoding
         -3 / --3d mode                 switch tv into 3d mode (e.g. SBS/TB)
         -y / --hdmiclocksync           adjust display refresh rate to match video (default)
         -z / --nohdmiclocksync         do not adjust display refresh rate to match video
         -t / --sid index               show subtitle with index
         -r / --refresh                 adjust framerate/resolution to video
         -g / --genlog                  generate log file
         -l / --pos n                   start position (in seconds)
              --boost-on-downmix        boost volume when downmixing
              --vol n                   Set initial volume in millibels (default 0)
              --subtitles path          external subtitles in UTF-8 srt format
              --font path               subtitle font
                                        (default: /usr/share/fonts/truetype/freefont/FreeSans.ttf)
              --font-size size          font size as thousandths of screen height
                                        (default: 55)
              --align left/center       subtitle alignment (default: left)
              --lines n                 number of lines to accommodate in the subtitle buffer
                                        (default: 3)
              --win "x1 y1 x2 y2"       Set position of video window
              --audio_fifo  n           Size of audio output fifo in seconds
              --video_fifo  n           Size of video output fifo in MB
              --audio_queue n           Size of audio input queue in MB
              --video_queue n           Size of video input queue in MB
For example:
./omxplayer -p -o hdmi test.mkv

Key Bindings

While playing you can use the following keys to control omxplayer:
z           Show Info
1           Decrease Speed
2           Increase Speed
j           Previous Audio stream
k           Next Audio stream
i           Previous Chapter
o           Next Chapter
n           Previous Subtitle stream
m           Next Subtitle stream
s           Toggle subtitles
d           Subtitle delay -250 ms
f           Subtitle delay +250 ms
q           Exit OMXPlayer
Space or p  Pause/Resume
-           Decrease Volume
+           Increase Volume
Left Arrow  Seek -30 s
Right Arrow Seek +30 s
Down Arrow  Seek -600 s
Up Arrow    Seek +600 s
On 11:27 AM by array operation   No comments
this is the simple program take the inputs from the user and process the output using the if elif and else

 x = int(raw_input("Please enter an integer: "))
Please enter an integer: 42
>>> if x < 0:
     x = 0
     print 'Negative changed to zero'
elif x == 0:
print 'Zero'
elif x == 1:
     print 'Single'
print 'More'

//to write in file
//for raspberry pi
sudo nano filename.py
//for beagle bone black
nano filename.py

//for compiling the code
//on raspberry pi
sudo python filename.py
//on beagle
python filename.py

On 11:22 AM by array operation   No comments
//displaying the date command

import os

//taking the input from the your and processing that using the python

import os
user_input = input('Give me a number: ')
if user_input==1 :
os.system("omxplayer -o hdmi /home/pi/videos/Kommalallo.mp4")
elif user_input==2 :
os.system("omxplayer -o hdmi /home/pi/videos/Poovai.flv")
elif user_input==3 :
os.system("omxplayer -o hdmi /home/pi/videos/RamChahe.mp4")
elif user_input==4 :
os.system("omxplayer -o hdmi /home/pi/videos/Sasirekha.mp4")
elif user_input==5 :
os.system("omxplayer -o hdmi /home/pi/videos/Kommalallo.mp4")

Monday, April 21, 2014

On 11:28 AM by array operation   No comments

You can install this by pulling the source from git and running the InstallAUISuite.sh file.
Commands to install are below (your user should have sudo priveledges but you don't need to sudo or be root to run the commands unless shown otherwise):

sudo apt-get install git-core
git clone git://github.com/StevenHickson/PiAUISuite.git
cd PiAUISuite/Install/

Update Instructions 

cd PiAUISuite
git pull
cd Install
sudo ./UpdateAUISuite.sh

So this is a quick video to demonstrate youtube working fast and easily on the Raspberry Pi without the use of XBMC or gnash.
I tried out gnash first which didn't work at all.
So then I tried out XBMC and although it is pretty, it is awfully slow so I decided to get youtube to work on my own.
The basis of this is really simple. There is a nifty program out there called youtube-dl that can get the media file from the website and download it. It's great because it does it fast and works for many other websites like the daily show and the colbert report.
So what I did was basically write a little script that analyzes your input and then gets the proper information from the youtube-dl program without downloading the video, then it sends this http stream to omxplayer to play.
It can handle playlists or individual files from multiple websites as well as a bunch of other things.

After that, I started implementing a nice little search feature using C++ and Curl.
I'm starting to implement a GUI which will essentially look like youtube kind of. Until then I have this nifty search tool, which was essentially my start to the GUI I am currently creating.

If you've ever used XBMC's youtube, you will notice that this is a lot faster, and in my opinion, easier to use and more natural. Plus it only requires a tiny file on your system as opposed to XBMC's massive footprint.

related websites:

Sunday, April 20, 2014

On 1:56 AM by array operation   No comments

intel galileo

Friday, April 18, 2014

On 4:15 AM by array operation   No comments

# uncomment if you get no picture on HDMI for a default "safe" mode

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border

# uncomment to force a console size. By default it will be display's size minus
# overscan.

# uncomment if hdmi display is not detected and composite is being output

# uncomment to force a specific HDMI mode (this will force VGA)

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# for more options see http://elinux.org/RPi_config.txt

Sunday, April 13, 2014

On 8:20 AM by array operation   No comments
This is the tutorial explains about how to connect the reed switch with arduino
the simple program for the reed switch

//Turn on LED while reed switch is closed

#define LED 13     //pin for the LED
#define SWITCH 7   //input for REED SWITCH

int val = 0;       //used to store input value

void setup() {
  pinMode(LED, OUTPUT);   //tell arduino LED is an output
  pinMode(SWITCH, INPUT);   //SWITCH is input

void loop(){
  val=digitalRead(SWITCH);   //read input value and store it
  //check whether input is HIGH (switch closed)
  if (val==HIGH) {
    digitalWrite(LED, HIGH);   //turn LED on
  } else{
    digitalWrite(LED, LOW);
pls check the video how the reed switch will work


Saturday, April 12, 2014

On 4:24 AM by array operation   No comments
  1. import RPi.GPIO as GPIO  
  2. import time  
  3. # blinking function  
  4. def blink(pin):  
  5.         GPIO.output(pin,GPIO.HIGH)  
  6.         time.sleep(1)  
  7.         GPIO.output(pin,GPIO.LOW)  
  8.         time.sleep(1)  
  9.         return  
  10. # to use Raspberry Pi board pin numbers  
  11. GPIO.setmode(GPIO.BOARD)  
  12. # set up GPIO output channel  
  13. GPIO.setup(11, GPIO.OUT)  
  14. # blink GPIO17 50 times  
  15. for i in range(0,50):  
  16.         blink(11)  
  17. GPIO.cleanup()  

Tuesday, April 8, 2014

On 12:25 AM by array operation   No comments

Dial *141#,*145#  and press OK to check your balance on Vadaphone Prepaid

To Check your Balance in Airtel, Dial *123# from your Airtel Mobile.

Dial *367# From Your Reliance Mobile to Check Account Balance.

Dail *225 You will receive an sms with your balance and validity.

To Know Account Balance information dial *111# from your Tata Docomo Mobile.
To Check your Balance in Aircel, Dial *123# ,*125# from your Aircel Mobile.

To Check Account Balance in your Idea Mobile Dial *212# from Your Idea Mobile.

Check Balance Dial *123# from your BSNL Prepaid Mobile.

Check Balance Dial *222*2# from your UNINOR Prepaid Mobile.
Very Good For International Calling.

Tuesday, April 1, 2014

On 8:50 AM by array operation   No comments
This is the tutorial explains about the how to connect the beagle bone black with ubuntu operating system and how to get the LXDE environment on the putty terminal.