.:| student blog |:.

October 18, 2009

Intelligent Robots Project

Filed under: Robots — Bogdan @ 3:25 pm
Tags: , , ,

I proudly announce the new project i’m working on for which i don’t have a name yet but i’ll describe it: a robot able to construct. Let me lay down some details.

Being a student in the 3rd year at Computer Science at Babes-Bolyai University, i was able to select a course: Intelligent Robots. This course implies creating a team with the students attending this course and choosing a project. From all the courses i attended, i like this one the most:

  • i like developing code for a practical purpose
  • i like robots, they are fascinating
  • this course gives freedom when choosing the project; this way stimulating creativity
  • we have no limits for achieving our goal: we can modify the robots, develop code in any language, create your own algorithms, use any available code/library, improvise

The robot we are using is Robotino on which will be placed an Lynxmotion robotic arm to grab some boxes from which the construction will be built. The user will develop the construction in a 3D environment, export it, Robotino will process it and start building. Sounds like a cool project! :D

For now we are having some problems. Robotino has an CF card for HDD where it hold it’s OS. We don’t have superuser access on it so we can’t even change the date ( he thinks the date is somewhere in 2004 ), which makes it impossible to connect the robotic arm on him because we can’t access the device ( /dev/ttyUSBxx, linux users should be familiar ). So we decided to change the CF card, install a newer OS, connect him to Internet, update the software, jump over the impediment and gain the freedom we need. A team mate made a steel platform for the robotic arm. I’m waiting for Tuesday to come so we can mount the platform, the arm and install the CF card.

About changing the CF card i found information here ( my teacher bought a Sandisk 2GB CF card).

I’ll be back with more information in a few days, when i’ll post the code for connecting to Robotino from linux. If i forget or you have question ask me :)

September 6, 2009

How to install Spring IDE Tool in Eclipse 3.5

Filed under: Developing tools — Bogdan @ 1:18 pm
Tags: , , , , ,

SpringSource Tool Suite™ (STS) provides the best Eclipse-powered development environment for building Spring-powered enterprise applications.

STS includes tools for all of the latest enterprise Java and Spring based technologies as well as the most advanced tooling available for enterprise OSGi development. STS supports application targeting to local, virtual and cloud-based servers and provides built in support for SpringSource dm Server and tc Server. SpringSource Tool Suite is freely available for development and internal business operations use with no time limits.

Here is how to install it:

  1. Download and install the “Eclipse IDE for Java EE Developers” package
  2. Disable all pre-configured update sites on the “Install/Update -> Available Software Sites” page from the Eclipse preferences
  3. Import the linked update site bookmark file into your Eclipse. This will configure all the nightly snapshot update sites for STS you’ll need. Use the “Import…” button on the “Install/Update -> Available Software Sites” page from the Eclipse preferences
  4. Install all features from the update site labeled “AJDT” and restart
  5. Install at least the Jira Connector feature from the update site labeled “Mylyn Extras” and restart
  6. Install all features from the update site labeled “Spring IDE Update Site” and restart
  7. Install all features from the update site labeled “SpringSource dm Server Tools Update Site” and restart
  8. Install all features from the update site labeled “SpringSource Tool Suite Update Site” and restart

Enjoy SpringSource Tool Suite :)

February 1, 2009

Cine se scoala de dimineata …

Filed under: Funny — Bogdan @ 4:54 pm
Tags: , , , , , , , , ,

Alte manifestari ale invatatului excesiv in sala de lectura :) :

28012009026

January 29, 2009

Efectele studiului

Filed under: Funny — Bogdan @ 12:28 pm
Tags: , , , ,

Tot la capitolul “sala de lectura”, de data asta la etajul 10:

28012009022

Unii intra normali, dar numai ei stiu cum ies de acolo …

January 28, 2009

Motivatie pentru studenti

Filed under: Funny — Bogdan @ 3:09 am
Tags: , , , ,

In plina sesiune fiecare se motiveaza cum poate :) Poza e facuta in sala de lectura la etajul 9 din caminul 16, Hasdeu.

 

28012009017

Rodul imaginatiei studentului … in toata splendoarea ei :)

January 24, 2009

Ordine si … dezordine

Filed under: Networking — Bogdan @ 4:57 am
Tags: , ,

Sa va ingroziti si voi: aici si aici

V-a placut? :)

Sa va las totusi cu o impresie buna


Send SMS from PC

Filed under: Programming — Bogdan @ 2:23 am
Tags: , , , , , , ,

Inca un episod din seria “Impartasirea cunostintelor”.

Mi-a venit initial ideea de a scrie un SMSBomber care, dupa cum ii sugereaza si numele, trimite mai multe mesaje text unui numar de telefon. Pentru a ajunge acolo trebuia sa ma ocup de o problema putin mai generala si anume comunicarea cu modemul unui telefon.

Momentan dispun de un Nokia N70 care il conectez la laptop cu un cablu USB pentru transferul datelor. Modemul GSM imi este accesibil pe un port serial ( la mine COM4 ), iar comunicarea cu el se poate face printr-un terminal (de ex: Linux: Minicom iar Windows: HyperTerminal ) si folosind comenzi AT.

Exemplu de comenzi AT:

AT+GMM - model identification
AT+CGMR - software version

Mai multe comenzi pentru unele modele de telefoane Nokia gasiti aici.

Pe Internet se gasesc destule informatii pentru conectarea la un port serial cu diferite utilitare de aceea voi detalia conectarea dintr-un limbaj de programare, Java. Suportul pentru interfetele seriale nu este implicit, asadar este necesara  libraria Java Communications (http://java.sun.com/products/javacomm/ ) care pentru sistemele Windows o gasiti pe http://www.rxtx.org/ .

Trecem la detalii de implementare. Urmatoarea portiune de cod obtine portul serial specificat prin numele lui.

portID = CommPortIdentifier.getPortIdentifier("COM4");
serialPort = (SerialPort) portID.open("Java Application", 2000);
serialPort.setSerialPortParams(460800, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_NONE);

Liniile 1 – 2 obtin si deschid portul serial, iar liniile 3 – 4 configureaza comunicarea cu portul. Avand portul serial putem comunica cu el folosindu-ne de cele doua stream-uri:

OutputStream serialOutput = serialPort.getOutputStream();
InputStream serialInput = serialPort.getInputStream();

Pentru implementarea unui terminal care sa permita utilizatorului comunicarea directa cu modemul aveti ca punct de pornire interfata SerialPortEventListener si functia membra a obiectului SerialPort:

abstract void addEventListener(SerialPortEventListener lsnr)

Comenzile AT pentru trimiterea unui mesaj SMS:

AT+CMGF=1
AT+CMGS="5555555555"
> textul mesajului  (CTRL+Z Enter)

Observatie: comenzile se proceseaza doar dupa trimiterea caracterului ce specifica sfarsitul de linie (LineFeed si Carriage Return), mai exact, dupa fiecare comanda trimisa trebuie trimise suplimentar si cele doua caractere   si caracterul de sfarsit de rand:

String setTextMessage = "AT+CMGF=1";
modemOutput.write(setTextMessage.getBytes());
modemOutput.write(13);
modemOutput.flush();

Bafta ;)

Implementarea pentru Windows

January 23, 2009

Applying text to GIF images

Filed under: Programming, Uncategorized — Bogdan @ 8:38 pm
Tags: , , ,

Recent, la cererea unui prieten am implementat un mic programel ce aplica text pe imagini gif. Dupa cateva cautari in “norisorul de calculatoare” am gasit de ce aveam nevoie. Aceeasi metoda se poate aplica si pentru alte tipuri de imagini.

package application;

import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;

import javax.imageio.ImageIO;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

public class Main {

	void applyText(String srcImg, String destImg, String text,
			int textWidth, int textHeight) {
		Image image = null;
		try {
			// Read from an input stream
			InputStream is = new BufferedInputStream(
					new FileInputStream(srcImg));
			image = ImageIO.read(is);
			is.close();

			int width = image.getWidth(null);
			int height = image.getHeight(null);

			BufferedImage bufferedImage = new BufferedImage(width, height,
					BufferedImage.TYPE_INT_RGB);

			Graphics g = bufferedImage.createGraphics();
			g.drawImage(image, 0, 0, width, height, null);
			// g.setBackground(Color.white);
			g.setColor(Color.white);
			g.setFont(new Font("Arial", Font.BOLD, 30));

			g.drawString(text, textWidth, textHeight);
			g.dispose();

			FileOutputStream out = new FileOutputStream(destImg);
			ImageIO.write(bufferedImage, "gif", out);
			out.close();

		} catch (IOException e) {
			JOptionPane.showMessageDialog(null, "Unable to read image file!");
		}
		JOptionPane.showMessageDialog(null, "GIF image file generated");

	}

	void run () {
		JFileChooser fileDialog = new JFileChooser();
		fileDialog.setDialogTitle("Open file ...");
		fileDialog.setDialogType(JFileChooser.OPEN_DIALOG);
		fileDialog.setMultiSelectionEnabled(false);				

		if (fileDialog.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {
			String srcImg = fileDialog.getSelectedFile().getAbsolutePath();
			String destImg = fileDialog.getSelectedFile().getParent() + "/new_" + fileDialog.getSelectedFile().getName();
			String text = JOptionPane.showInputDialog(null, "Watermark text:", "Test");
			int textWidth = Integer.parseInt( JOptionPane.showInputDialog(null, "Text horizontal position:", "0") );
			int textHeight= Integer.parseInt( JOptionPane.showInputDialog(null, "Text horizontal position:", "0") );					

			applyText(srcImg, destImg, text, textWidth, textHeight);
		}

	}

	public static void main(String[] args) {
		Main obj = new Main();

		obj.run();
	}

}

Durex – Get it on

Filed under: Video — Bogdan @ 7:31 pm
Tags: , , ,

Au imaginatie :D

Ca de … inceput

Filed under: Uncategorized — Bogdan @ 6:53 pm

Am blog. Punct.

Nu stiu de unde necesitatea asta, dar tind sa cred ca e mai mult “spiritul turmei”. Interesant e ca primul post il redactez mai greu decat credeam. Nu am talente de scriitor, dar ma gandesc ca intr-o oarecare masura blogu asta ma va ajuta sa ma exprim mai usor. 

Nu o sa-mi insir pe aici gandurile si nici n-o sa-mi povestesc viata mea personala. Ma voi orienta mai mult spre publicarea de informatii utile unor oameni. O sa vedeti ce iese … ( sunt curios si eu )

Blog at WordPress.com.