Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

serial port problem

delphi

  • Please log in to reply
1 reply to this topic

#1 mld

mld

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 26 August 2008 - 08:04 PM

Hi all

i have spent my last three weeks try to read an infrared remote signal from my serial port

and in alll the three weeks i have faild to have a usefull read

but today

and i dont know why

i have suceeded to read using a code i have writen before but with a small modification

and it goes really nice and work 100% ... eeeeeeven i put the following


.
.
.
var

zeroone : boolean

NumRead : integer;
.
.
.
ReadFile( FHandle, zeroone , 1, NumRead, nil )

showMessage(inttostr(integer(zeroone))); ///  output is 45


even its strange to give me such thing from a boolean variable ...

but this is not my problem

my problem is i have saved my work ... close the delphi ... and re-open it ...test another time the application and every thing is okay

but after a while

i wanted to re-check the application ... i opened it ... lunch the exe file and the same previous problem

i just read 0000000000

nothing else

i have changed from boolean to integer ... or to char ... or to any thing else

and the same

just read 00000000

why is that

plz

plz plz plz

tell me what to do .... or why this is hapening to me
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 27 August 2008 - 07:44 AM

I can't say for sure, but IR signals can be VERY flaky sometimes. Depending on the source/receiver, it can be nearly impossible to get them lined up for communication.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download