Monday, 3 September 2012

What life means to me


Life to me is....
a random variable where the element of uncertainty is  0.99

using Irrlicht 1.6 with Devcpp

here is the link to my solution which i posted
on the irrlicht forum itself

http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?p=213843#213843

Extremus Coder LCD Lib v1.0-- my lcd library which uses random pins and can be adapted to any compiler or any platform easily

/*******************************************************************
  EXTREMUS CODER LCD LIBRARY V 1.0
  USE RANDOM PINS
  CAN BE EASILY ADAPTED TO ANY COMPILER AND ANY MCU OR EVEN THE PARALLEL PORT FOR THAT MATTER
  THIS IS THE PART CONCERNING THE CONNECTIONS
 

  CONNECTIONS ARE E ,Rs, D4, D5, D6, D7
  DEFINE THEM AS SHOWN IE CHANGE THEM IN THE HEADER FILE "lcd.h" AS SHOWN BELOW


 '(
  For Eg:
  If E pin is connected to PORTC.0, then
  #define EPort PORTC
  #define E 0
  #define Edir DDRC
  ')

'(
 VERY IMPORTANT
 NOTE THE RW PIN IS NOT USED SO DONT DEFINE RW PIN CONNECTIONS
UNLESS ITS ALREADY CONNECTED AND U CAN'T UNDO THE CONNECTION
 
 LOOK FOR THE FOLLOWING FOUR LINES IN THE HEADER AND COMMENT THEM (//) IF THE RW PIN IS NOT CONNECTED
 WHICH SHOULD BE THE CASE IF U ARE MAKING UR OWN CONNECTIONS

 #define RwPort PORTB
#define Rw 1
#define Rwdir DDRB
#define RwExists 1

 ')

 THEN DEFINE THE NO OF ROWS AND COLUMNS OF UR LCD
 

  for eg if ur display is 20*4
  then
  #define displayRow 20
  #define displayColumns 4

BY DEFAULT THEY ARE 16 and 2
  AFTER THAT in ur program include the following files
  without which the program wont work
  FOR EG:
  //TEST PROGRAM FOR WINAVR (main.c)
--------------------------------------------------------------
  #include //winavr io for codevision it is #include and so on
  #include "lcd.h"
  #include "lcd.c"
  #include "printf.c"

  int main(void)
  {
 
  init_lcd(); //initialise the lcd
  lcdTest(); //prints EXTREMUS CODER LCD LIBRARY V1.0
  _delay_ms(3000);
  lcdClear();
 
  char* s="LCD_LIB";
  lcdGotoXY(0,0); //First line first character pos
  lcdPrintf("STRING:%s",s);
  lcdGotoXY(0,1); //SECOND line first character pos
  lcdPrintf("NO:%d, FLOAT:%f",1,1.23);
 


  }
--------------------------------------------------------------

 THE IMPORTANT FUNCTIONS ARE
void init_lcd(); //DONT START UR PROGRAM WITHOUT IT!!!!
void lcdPrintf(char *fmt, ...); //DITTO PRINTF FUNCTIONALITY U SHUD BE USING THIS THE MOST
void lcdGotoXY(int x, int y); // X STARTS FROM 0, Y STARTS FROM 0
void lcdClear(void);
void lcdToHome(void);
void lcdPrintSpaces(int no); //PRETTY NIFTY AI :)

//DONT THINK U WILL BE NEEDING THESE BUT ANYWAY
void lcdPutString(char* s);
void lcdPutInt(int a);
void lcdPutChar(char c);

//LOW LEVEL ROUTINES
void toggleE(void);
void writeByte(int val);
void writeToLcd(int val);



//CODEVISION DOESNT SEEM TO SUPPORT va_arg function for floating point
// so no floating point support for lcdprintf for codevision ie, in winavr it is working fine though




  DONT LOOK BEYOND THE CONNECTIONS PART IF U FEEL A BIT CONFUSED

ANY PROBLEM: MAIL DON'T PESTER AT knapshots@gmail.com

*******************************************************************/
Heres the link:

OPENCV 2.1 QT CREATOR INTEGRATION

Assuming u downloaded this setup 
and installed it successfully 
"OpenCV-2.1.0-win32-vs2008.exe" 

Let us assume for now that the installation directory is "C:\OpenCV2.1" 

To make ur current qt project or a new project "opencv" compatible :| 
here are the modifications or rather additions which are to be made to ur 
.pro file 

# INCLUDING HEADER PATHS AND LIBRARIES AND THEIR PATHS###

INCLUDEPATH
 +="C:\OpenCV2.1\include/opencv"


LIBS += -L"C:\OpenCV2.1/lib"


LIBS += -lcv210 -lcxcore210 -lhighgui210 -lcvaux210 -lcxts210 -lml210 -lopencv_ffmpeg210


# END OF HEADER INCLUDES AND LIB INCLUDES ### 


so, a sample complete .pro file would look like this.... 

#-------------------------------------------------
#
# Project created by QtCreator 2010-09-21T15:20:29
#
#-------------------------------------------------
QT       += core


QT       -= gui


INCLUDEPATH   +="C:\OpenCV2.1\include/opencv"




LIBS += -L"C:\OpenCV2.1/lib"
LIBS += -lcv210 -lcxcore210 -lhighgui210 -lcvaux210 -lcxts210 -lml210 -lopencv_ffmpeg210


TARGET = opencvTest


CONFIG   += console


CONFIG   -= app_bundle


TEMPLATE = app


SOURCES += main.cpp




heres a sample program as well to help u with it







##dont forget to include QDir,QDebug as well to ur existing app

## along with its existing defaults i.e. QCoreApplication if its  a console app

## etc....etc....

#include "cv.h"

#include "cxcore.h"

#include "highgui.h"

#include "stdio.h"



int main(int argc, char *argv[])

{     QCoreApplication a(argc, argv);

   IplImage* test=cvLoadImage("test.jpg",1);

    cvNamedWindow("test",CV_WINDOW_AUTOSIZE);      cvShowImage("test",test);

    float i=32.45;

   char* temp="amar";

   qDebug() <<   QDir::currentPath() << i <<temp;

    return a.exec();

}





a sample project will be added soon