Friday, July 27, 2012

Arduino IDE not detecting serial port in ubuntu 12.04[SOLVED]

After the installation of new arduino IDE in ubuntu 12.04 , it was found that the serial port was not detected while plugging in the arduino board via usb. The problem is that the OS will not giving permission for the program to access the port.
To solve the problem simply run the IDE as super user ,so go to terminal and type ' sudo arduino'

To solve this problem permanently ,

In the terminal run ' gksudo gedit'

In gedit open /usr/share/applications/arduino.desktop file

change the line  Exec=arduino to  Exec=gksudo arduino
 save the file.

 

ARDUINO SIMULATION IN PROTEUS


Download simulation

The screenshot shows shows the simulation of an ARDUINO using AVR microcontroller in PROTEUS.
The components used are
1) AVR microcontroller - ATMEGA328P
2) 2 x capacitor- generic , 22pf
3) crystal - 16MHz

Now write a simple program in Arduino IDE , save it  and select the board type as shown in figure

Now click the upload button without connecting the arduino 
At the end of this process you will get an error message , ignore this and make sure that an 'applet' directory is created at the location where you saved the program(it may be hidden) .In the applet directory you  can see the .hex file generated.
 For Linux users  go to /tmp/ and search .hex 

Now go back to the simulation , double click on the microcontroller to get the properties window and make the following selections

 
Now run the simulation , the following pin diagram will help you to find the corresponding AVR pin of each arduino pin . 
 



EXECUTE A LINUX COMMAND IN THE STARTUP WITH ADMIN PRIVILEGE

A script that need administrative privilege can't be simply added  to the startup session . Here is a simple way to do this

step-1:In the terminal type the command ' gksudo nautilus ' , to open the file browser as super user.

step-2:Go to the location /etc/init.d/  and create a file with .sh extension,
(eg:- mount.sh)

step-3:Again go to the terminal and make the file exicutable using the following commands
cd /etc/init.d
sudo chmod +x  filename.sh (replace filename with the name of your file)

step-4:Now open the file with your favorite text editor and  at the beginning write the following script to set the path
 #!/bin/bash
then write the command that you want to execute
note:no need for writing sudo at the beginning

step-5:save the file and in the terminal run the command

sudo update-rc.dmystartup.sh defaults 99
 
The argument 'defaults' refers to the default runlevel and '100'  means the script will get executed before any script containing number 101. Just run the command ls –l /etc/rc3.d/ to see all scripts with numbers.

Tuesday, August 30, 2011

ARDUINO IN UBUNTU

Arduino Board

Arduino is a single-board microcontroller designed to make the process of using electronics in embedded projects more accessible. The hardware consists of a simple open hardware design for the Arduino board with an Atmel AVR processor and on-board serial port or usb I/O support.The software consists of a standard programming language compiler similar to C++ with some simplification and standard built-in functions.

For Linux users arduino IDE is here - <32-bit> <64-bit>

First install a dependancy library file avr-libc. For installation type in terminal
$ sudo apt-get install avr-libc

Then download and extract the arduino-0022.tgz file to the Desktop
Arduino IDE

open the terminal window and type

cd /home/<user name>/Desktop/arduino-0022/
(replace <user name> with the current user name)

./arduino

Then you will get the arduino IDE
Before going into the program you must select the board type and serial port from the tools tab
If your board type is not in the listed in the IDE , do the following steps
1)Go to the developers home page
2)find the code
3)add to the arduino-0022/hardware/arduino/boards.txt file

for example
for the maxuino usb users add the following code to arduino-0022/hardware/arduino/boards.txt file

##############################################################
probots.name=Maxuino USB w/ ATmega8
probots.upload.protocol=stk500
probots.upload.maximum_size=7168
probots.upload.speed=19200
probots.bootloader.low_fuses=0xDF
probots.bootloader.high_fuses=0xCA
probots.bootloader.path=atmega8
probots.bootloader.file=ATmegaBOOT.hex
probots.bootloader.unlock_bits=0x3F
probots.bootloader.lock_bits=0x0F
probots.build.mcu=atmega8
probots.build.f_cpu=16000000L
probots.build.core=arduino
##############################################################

see arduino homepage

Monday, August 29, 2011

Linux alternatives for Windows applications

Looking for Linux alternatives to Windows software? here is a list of common windows applications and their alternative in Linux
 
Adobe Acrobat Reader  - document viewer , okular , ePDFView
Adobe Photoshop  - Gimp
Daemon tool - Gmount iso
google talk - Pidgin
Microsoft Excel - OpenOffice.org spreadsheet , kspread
Microsoft Internet Explorer  - Firefox , Opera
Microsoft Office  - Open Office , Libreoffice
Microsoft powerpoint - OpenOffice.org presentation
Microsoft Word  - Open Office writer , Abi word
Nero Burning Rom - Brasero , K3B
Notepad - Gedit , kwrite
Picasa - F-spot , Digikam
Turbo c++ - bluefish editor
uTorrent - Transmission
video converter - winff
VMware -virtual box
Winamp  - Rhythmbox , XMMS ,Amarok ,audacious
Windows Media Player - VLC, totem ,smplayer , xine
Windows Movie Maker  - avidemux , openshot , PiTiVi
Winrar - unrar
3D studio max - Blender

Sunday, August 14, 2011

COMMON MISCONCEPTIONS ABOUT LINUX

For most of the desktop users Windows is the only operating system they have ever used . Most Desktop users don't even know about other operating systems. Linux is a free and open source OS which is more powerful than windows.There is a chance you have never heard of it and even if you have you probably carry some misconceptions about it.Here is a list of some of the common misconceptions about Linux OS

1.Linux is not an operating system


There is no OS named Linux. Actually Linux is the name of an OS kernel and the operating systems using this are commonly called Linux OS.Kernel is the core of all OS and is the interface between programs and the devices.The quality of an OS depends on the kernel.If the kernel is slow and buggy then the OS will be slow and buggy.There are so many OSs using Linux kernel .You can find a list of OS here . Even you can make your own Linux OS and distribute.

2.Nobody is using Linux


Terribly wrong. The majority of the World Wide Web is standing on the shoulder of Linux . Because it is more secure and is the best logical choice of a system administrator. 71% of the web servers around the world is using Linux. 459 out of the top 500 supercomputers run Linux as their OS. Now most of the government institutions and companies have switched to Linux.

3.Linux is a command line OS







Wrong, Linux have both command-line and GUI mode. By default we enter in to the GUI mode. You can switch between this modes using the key comb ctrl+alt+f1(for terminal)  ctrl+alt+f7(for GUI).On Linux, a GUI is only an addition to the operating system. Most desktop users prefer GUI but a power user always prefer command-line mode.

 4.Linux is difficult to maintain

This might have been true many years ago. Today, Linux requires little or no maintenance at all. Unlike Windows, if you just use it, it will never crash. In Linux you can fix bugs(if any) by yourself but in windows you have to wait until Microsoft release the bug-fix.

5)There are no games for Linux  


There are less games in Linux compared to windows. Only a few companies have decided to make a Linux version of their game. There are numerous efforts towards creating good – free of charge games like Sauerbraten , Nexuiz, Wolfenstein, UFO: Alien Invasion , Glest , true combact , tremulous , torcs etc.