Saturday, June 20, 2009
Google maps works without GPS
A GPS phone with Google maps is really amazing. But unfortunately, my Nokia E65 has not any GPS support, but navigator programs are included in Symbian. A bluetooth GPS device can be used along with many phones without any GPS module in-built. But it costs around Rs.5000 India. But Google maps is useful even if you have any GPS support because it works well using GPRS network to find current position, not much accurate because it will show the nearest mobile radio transmitting tower. But it becomes handy and have only 1.3MB to download and useful in navigation. Recently, Nokia also provided "nokia maps", but I am not commenting about it because, now I decided to stick with Google!
You can download Google maps directly to your mobile phone from m.google.co.in/maps
or vist www.google.co.in/mobile from your PC.
Saturday, June 13, 2009
Open electronics - Philosophy
Another good website concerning open circuits.
Portable programs for your pen drive
Nowadays, there is no need of an introduction to portable applications, but I am starting from introduction before going to some useful portable application links.
Most of the computer application programs are to be installed in your system. It is not a problem in Windows platform just click next->next->.......finish. Quite complicated but amazingly interesting way in Linux. There are several Java programs which is intended for direct work instead of initial installation setups. The problem arises in installable applications comes to play if you are working in your office, college in computer. The computer administrator may prohibit to install your favorite Firefox in the office computer. These problems can be avoided by using some portable versions of your favorite applications. Just download an unzip it in into your pen drive and use it every where. Currently, most applications support portability in MS Windows OS. If you are a Linux user, Linux OS itself become portable to follow you!
Some good links for MS windows:
Here follows a junk of pen drive Linux:
Python for Symbian s60
Python is very convinient language compared to any other and constantly increasing it's popularity. It is listed in the top 10 programming languages also. It can be used in MS Windows, Linux and everywhere. It's a best hacker's choice also. Many varieties are emerging from python. Portable python- which need not be installed but paste the file in your Thumb drive or any other portable devices and you can use it everywhere. Really Nice. Now the pyhton coming to conquer the mobile phone world!. Yes, you can do what is you go for in a PC.
- Just donwlad the pyhton instllalble file. Install it
- Open python for s60
- Options->Interactive Console
- Do what you want
- You can see some example *.py files in Options->Run Script
print "hello World!"
#Note: Wherever you want to press enter in PC version of linux, in mobile, you use 'scroll key', not 'enter' character in the list of special characters. You can run python scripts also bu require one text editor. One good text editor is JtextLite.
Happy Programming!
Friday, June 12, 2009
Play with "cdrom" in Linux
This is not a project or something serious. just for fun. You can control your cdrom by using this code. This will only work on Linux platform. I did it in fedora core 9. But it will work other disro's also.
!!!!!!!WARNING!!!!!!!!
1)Some procedure described in this article is not a recommended or the hardware devices are intended to work like it. Do it in your own risk.
2)Don't interrupt the way the hardware working (the movement of CD ROM tray by your hand).
Open your 'cdrom' tray under software control
Try this command
$eject cdrom
It will try to open your cdrom tray. if you have two or more cdrom drives, try
$eject cdrom0
If you havn't any cdrom device, bash will return an error message:
$eject cdrom2
eject: unable to find or open device for: `cdrom2'
You can find your device name ( "cdrom0', 'cdrom1' etc.) from "/media"
Close your 'cdrom' tray under software control
Try this command
$eject -t cdrom
Other useful parameters are there in 'eject'. You can read about it:
$man eject
Writing a bash script
Just entering the command at a time is not convenient. You can write some commands together and execute it when you want.
Open a new file using gedit editor (or any other you want)
$gedit cdromplay
A winow will appear and type what you want. For example, if you want to open and close your cdrom continously three times just print like this:
eject cdrom
eject -t cdrom
eject cdrom
eject -t cdrom
eject cdrom
eject -t cdrom
save it and close.
Then to resolve permission,
$chmode +x cdromplay
Then execute cdromplay
./cdromplay
You can see what I said before.
Do it in your real applications
As you know, we did some rubbish things before. There is no need to do so. But this is useful in some applications like CDburner - It will automatically eject tray after writing a CD ROM or you can control convineiently in a CD ROM player. We can use python to do a GUI application.
# File: cdromplay.py
import os
from Tkinter import *
class App:
def __init__(self, master):
frame = Frame(master)
frame.pack()
self.button = Button(frame, text="Quit", command=frame.quit)
self.button.pack(side=LEFT)
self.hi_there = Button(frame, text="Eject", command=self.say_hi)
self.hi_there.pack(side=LEFT)
def say_hi(self):
os.system("eject cdrom1 -T")
print "boss, cdrom activated"
root = Tk()
app = App(root)
root.mainloop()
As you can see, the above program is the altered version of "Hello World!" program of one famous python tutorial. Don't get upset or confused by the defnition names. The confusion in program code will not affect the real program.Copy and save it or download it from here. You require python to do this. 'cd' to the appropriate directory and run,
$python cdromplay.py
Now you will see a simple widget with a button.
Press button and observe what's happen.
Download cdromplay for python
Download cdromplay bashscript
Watch the video how cdrom is ejected:
Good Luck!
Increase Battery life of your Nokia!
Navigate to
Main Menu->Tools->Settings->Network
Change network mode to 'GSM'
It will ask to restart. Press 'Yes'.
Another good link here.