Sunday, October 24, 2010

The most Interesting Question in IEEE 4.0


This is a encrypted message passing technique. If you are interested read this question.

Digraph Cipher
Exchanging information securely has been a challenge and a fascination since the time human beings started communicating. A digraph cipher is an encryption mechanism that replaces each pair of letters in the plaintext (message to be encrypted) by another pair of letters. In order to encrypt and transmit a message, the sender and receiver must agree on a keyword. Before encryption, the letters of the alphabet are written in a 5x5 square (The Keyword is XTREM for all Encryptions), beginning with the keyword, and combining the elements I and J into a single cell. Next, the message is broken into pairs of letters called digraphs. So that each pair contains two unique letters, an x is added between any repeated letters that fall in the same pair or at the end to make a single final letter a digraph. All digraphs fall into one of three categories: both letters are in the same row; both letters are in the same column; or both letters are in different rows and columns. For encryption, letters in the same row are replaced by the letter to the immediate right of each one in the matrix. If a letter is at the end of a row, it is replaced by the letter at the beginning. Letters in the same column are replaced by the letter immediately below each one. If a letter is at the bottom of a row, it is replaced by the letter at the top. If the letters are in neither the same row nor the same column, the first letter is replaced by the letter in its row that is at the intersection with the column of the second letter. The second letter is replaced by the letter in its row that is at the intersection with the column of the first letter. The message is easily deciphered by the recipient using the same keyword.

Task

Please, write a program that takes a keyword and a message and returns the message in its encrypted format.
Encryption Square:
X T R E M
A B C D F
G H I/J K L
N O P Q S
U V W Y Z

Input

The program gets two unique inputs: the keyword and the message.
Valid assumptions:
1. Keyword contains only alphabets and message text contain only alphabets and spaces.
2. The message is only one line of text.
3. DO NOT include white spaces when comparing
4. Add X’s for double letters before adding X’s at the end to create an incomplete digraph
e.g. littles -> li tx tl e -> li tx tl ex
5. If I/J is selected as a digraph solution for a message, then the output should only be “I” (not IJ, J, I/J)
e.g. lp -> is

Output

The program outputs the given message in an encrypted form.

Sample InputKeyword: Xtreme
Message: This is fun

Sample Output

Message: Bolp lp azua

Saturday, October 16, 2010

Check Your VGA Performence

From this software you can check your VGA card real performance. Where OS could going wild.

http://www.mediafire.com/?35319lp53qjppo4

Friday, October 15, 2010

The Circuit Make Me Crazy......



People Said that i can do a PHD about that circuit.That has only 4Capacitors,1 IC, 1 serial port
I maid it nearly 50 times.

That circuit is USART circuit with max 232.

If you guys want to do robotics with communication with PC that is the circuit.
But that makes all thing a mess.

If you guys want to do it follow these tips.
  1. Do not use a PC which leaks AC currents to the body.
  2. Use a proper communication cable.
  3. Make this circuit in separate PCB.
  4. If you guys have communication problem, please check the IC.
If you guys still have trouble contact me.


Avoiding Oscillation in Line Following Robots _ Algorithum

Every one who build a line following Robot know that when we build it it follow straight lines really well. But when it comes to curved lines it will follow the line, but it will oscillate. I found a algorithm for avoid that.

From This Video You Can See the problem.

Hear is the tutorial which i followed.

Hear are some tips to follow

  1. Make your line sensor small. The distance between photo transistors should be place close to each other.
  2. Put your line sensor little far away from your motor axis. That will make sensitivity more. Hear is my robot.(But not suitable for micro applications.)
  3. Also Follow Above Algorithms.
Hear is my Robot.




Thread Programming In Linux in C++

For CS2012 me did this experimental programming thing. It is not easy to do Thread programming in C++, In Java it is really easy.

In C++ you have to use special library called pthread.h.The Following link gives better description about it. If your Linux c++ dosent have this you have to download it.

Hear is my reference material where I learn threading.

After installing it you can do your programming easily.

After Learning Implemented the Dining Philosopher Problem. If you are interested contact me.

Thursday, October 14, 2010

Robotics, Line Sensors

Hear is the line sensor produced by Mora VAPS team. It works fine with digital out puts.


If you guys want to create good line sensors hear are some useful tips.

Use IR led
Use coverings to total Led set.
Also we found a really good line sensor with really good resolution.(http://www.pololu.com/catalog/product/961)



MYJE - Navigational System for Exmo 2010 and Innovation CSE 2010

This project is a navigational system for Sri Lanka, which provides you the paths to unknown destination and guide you through the path. Also it had a robot car demonstration, which shows the functionality of the project. This Project has won the second place at the Innovation CSE 2010 organized by CSE University Of Moratuwa. 
Read these articles which will explain you about it's implementation level details.