Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, October 20, 2015

Using AVRORA simulator with TinyOS

AVRORA is a popular AVR Simulation and analysis framework for simulating the programs developed for AVR micro controllers. This tool can be used to simulate the programs written in TinyOS environment with little modifications. This post explains how TinyOS programs can be simulated using AVRORA.

This was tested in UBUNTU 12.04 OS environment.

Save the files downloaded from the following steps to a folder. In my system it is
/home/prv/avrora

Step 1: Download the converter from http://compilers.cs.ucla.edu/avrora/jars/avrora-beta-1.7.091.jar

Step 2: Rename the downloaded file as avrora.jar

Step 3: Download the converter.sh file from https://drive.google.com/file/d/0B8u5Jm1ly3NYNm41UEU0ZjdzYkU/view?usp=sharing

Step 4: Open the bashrc file
            gedit ~./bashrc
            and add the following lines at the end of the file.

alias avrora='java -jar /home/prv/avrora/avrora.jar'
alias convert-avrora='sh /home/prv/avrora/converter.sh'

Step 5: Save the file and close all the consoles opened.

Now, to test the AVRORA setup, run any application programmed in TinyOS.

For example, go to the folder Blinks available in /opt/tinyos-2.1.2/tos/apps.

compile the program

make mica2

it creates a build folder in which you will find micaz2 sub folder. Move to it.
In micaz2 folder there exists a main.exe file. This file is the main file consists of  application and TinyOS environment.

convert it into avrora environment as follows

convert-avrora main.exe blink.od

Now, run the avrora

avrora -seconds=5.0 -platform=mica2 blink.od

This command runs the blink application for one sensor node. To do the same for multiple nodes use the following command

avrora -simulation=sensor-network -seconds=10.0 -nodecount=2 blink.od

The screen shot after running the command

avrora -simulation=sensor-network -seconds=2.0 -nodecount=1 blink.od

is as follows



References

[1] http://compilers.cs.ucla.edu/avrora/
[2] http://mythicalcomputer.blogspot.in


Wednesday, March 4, 2015

Installing Lyx in UBUNTU

Lyx is a latex editor (WYSIWYM) which helps researchers and writers to edit their content. Latest version of the Lyx can be obtained as follows

$ sudo add-apt-repository ppa:lyx-devel/release
$ sudo apt-get update
$ sudo apt-get install lyx

Installing Remastersys in UBUNTU

Remastersys is a back up and recovery software that helps you to create custom/ boot able live CD/DVD of the entire UBUNTU distribution. This software can be installed as follows


$ sudo add-apt-repository "deb http://www.geekconnection.org/remastersys/repository karmic/"


$ sudo apt-get update
$ sudo apt-get install remastersys

Installing ns-2.35 in UBUNTU operating system

Step 1: open the command prompt Ctrl + Alt + T
Step 2: In the command prompt do the following
  $ sudo apt-get update
  $ sudo apt-get upgrade (this is optional)
  $  sudo apt-get install build-essential autoconf automake tcl8.5-dev tk8.5-dev perl xgraph libxt-dev  
   libx11-dev libxmu-dev    
Step 3: Download the ns allinone tar file to home folder (ex. home/prv/)
$ tar -xvzf /home/prv/Documents/ns-allinone-2.35.tar.gz
$ cd ns-allinone-2.35
prv@prv:~ns-allinone-2.35$  ./install
Step 4:  Perform the path settings
# LD_LIBRARY_PATH
OTCL_LIB=/home/prv/ns-allinone-2.35/otcl-1.14/
NS2_LIB=/home/prv/ns-allinone-2.35/lib/
USR_Local_LIB=/usr/local/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$USR_Local_LIB

# TCL_LIBRARY
TCL_LIB=/home/prv/ns-allinone-2.35/tcl8.5.10/library/
USR_LIB=/usr/lib/
export TCL_LIBRARY=$TCL_LIBRARY:$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/prv/ns-allinone-2.35/xgraph-12.2/:/home/prv/ns-allinone-2.35/bin/:/home/prv/ns-allinone-2.35/tcl8.5.10/unix/:/home/prv/ns-allinone-2.35/tk8.5.10/unix/
NS=/home/prv/ns-allinone-2.35/ns-2.35/
NAM=/home/prv/ns-allinone-2.35/nam-1.15/
export PATH=$PATH:$XGRAPH:$NS:$NAM


Thursday, February 13, 2014

Fuzzylite-4.0 installation on Ubuntu 12.04

MATLAB Fuzzy Logic Tool Box is a popular tool box for designing and implementing fuzzy logic based applications or algorithms. This tool box generates a fis file to include in the Matlab programming. However, a developer working with other than Matlab tool need to face grate difficulty in porting such
.fis file into their applications. To mitigate this problem Open Source community had worked towards developing a flexible framework which is independent of other shared libraries. An out comes of this initiative is fuzzylite (www.fuzzylite.com). To use this, a user or developer need not require to install standard tools or packages. In this article, I will explain how to  install the fuzzylite framework on Ubuntu operating system.

Fuzzylite is a open source library thatsupport fuzzy logic based design and implementation of algorithms. Thisframework is suitable for application developers in C++ and Java. Since it is open source, fuzzylite can be installed on most commonly used operating environments such as Linux, Windows, Mac and Android without any difficulty. Fuzzylite covers all major features used by developers in their applications. In addition, It supports a GUI (Graphical User Interface) (called qtfuzzylite) version that enable the user to create fuzzy rules graphically and export them into fuzzy lite language (.fll). A user can import the rules from fuzzy interface system (.fis) (of MATLAB) and fuzzy control language (.fcl) (of Octave). Moreover, several examples are also placed along with source package for the purpose of understanding. 




Now I explain the installation of fuzzylite on UBUNTU 12.04LTS



To install fuzzylite user need to install two packages – cmake and qt4 ( a cross platform application framework)




step1: sudo gedit /etc/apt/sources.list


step2: add the source

deb http://cz.archive.ubuntu.com/ubuntu trusty main

step3: sudo apt-get update

step 4: sudo apt-get install cmake qt4-default

step 5: download source code of fuzzylite from
 http://www.fuzzylite.com/downloads/



step 6: extract the tar file – tar xvf fuzzylite-4.0.1-source.zip



step 7: cd fuzzylite-4.0



#fuzzylite-4.0:~$ cd fuzzylite



#fuzzylite-4.0/fuzzylite:~$ cmake .  
  


( cmake – space – and a dot
and press enter)



#fuzzylite-4.0/fuzzylite:~$ make



#fuzzylite-4.0/fuzzylite:~$ sudo make
install



#fuzzylite-4.0/fuzzylite:~$ cd ..



#fuzzylite-4.0:~$ cd qtfuzzylite

#fuzzylite-4.0/qtfuzzylite:~$ cmake .



#fuzzylite-4.0/qtfuzzylite:~$
make



#fuzzylite-4.0/qtfuzzylite:~$
sudo make install



#fuzzylite-4.0/qtfuzzylite:~$
gedit ~/.bashrc



at the end of the
file




export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH: /fuzzylite/bin



example,



export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH::/home/prv/fuzzylite-4.0/fuzzylite/bin



save the file and
relogin/resart your system



After
relogin/restart open command prompt and type



$ qtfuzzylite



and use the
fuzzylite GUI tool.