CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Getting RFID tag and character from computer not work 2gethe

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
petur



Joined: 26 Mar 2010
Posts: 5

View user's profile Send private message

Getting RFID tag and character from computer not work 2gethe
PostPosted: Wed Apr 28, 2010 5:57 am     Reply with quote

Hi,

I want to get the tagnumber of an RFID tag and to output low the Yellow LED after getting a character "A" via rs485, but not work together.
Here is my code
Code:

while (TRUE)
   {
 output_high(RED_LED);
      if(read_4102(msg))
      {
         output_low(RED_LED);
         customerCode=msg[0];
         tagNum=make32(msg[1], msg[2], msg[3], msg[4]);
         
         //sprintf(msg, "Customer code: %u\n\r", customerCode);
        // RS485send(msg);
         sprintf(msg, "%lu\n\n\r", tagNum);
         RS485send(msg);
         
      }
     
       if(toupper(RS485getc())=='A')
      {
         output_low(YELLOW_LED);
      }
     
   }

The code works fine, but only for one IF case. How can I make to work it together ?
petur



Joined: 26 Mar 2010
Posts: 5

View user's profile Send private message

PostPosted: Wed Apr 28, 2010 9:58 am     Reply with quote

Anybody ? Plz
sjb



Joined: 13 Apr 2010
Posts: 34
Location: UK

View user's profile Send private message

PostPosted: Thu Apr 29, 2010 3:00 am     Reply with quote

It might be difficult to make any suggestions unless you say what it actually does wrong.

There are no comments in your code to help the reader.

Could it be that RS485getc() blocks until a user presses a key?

(also I feel that the use of text-speak gobbledygook like '2gthe' and 'plz' in you title and post is likely to give a bad impression and should be avoided in posts to forums - apart from making you sound like a prepubescent school kid it's disrespectful and a hindrance to communications with non-english speakers).
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group