PR14 - source code

LED Blinking, Walking with Cytron Servo, Displaying RFID, Multi-function Mobile Robot......

PR14 - source code

Postby shuhada » Tue Sep 21, 2010 11:17 am

About the source code for PR14,

//Permitted period mode (15 seconds)
case 1:
led=1;
temp1+=1;
if(temp1<10000) buzzer=1; //Sound 'Beep'
else if(temp1>1000000)


at the part temp1<10000, can anyone tell me the number is in what type? Is it binary or hex or something else? How to convert the number to decimal?

The 15 seconds is referring to which? temp1<10000 or temp1>1000000?

We need to do our final project. Please help us to understand this source code. Thank you so much in advance.
shuhada
Greenhorn
 
Posts: 2
Joined: Tue Sep 21, 2010 10:57 am

Re: PR14 - source code

Postby redips_id » Tue Sep 21, 2010 7:07 pm

Salam Shuhada, :)

shuhada WROTE:About the source code for PR14,

//Permitted period mode (15 seconds)
case 1:
led=1;
temp1+=1;
if(temp1<10000) buzzer=1; //Sound 'Beep'
else if(temp1>1000000)


at the part temp1<10000, can anyone tell me the number is in what type? Is it binary or hex or something else? How to convert the number to decimal?

That number is already in decimal. For binary number it must be started with '0b' and for hex '0x'.

shuhada WROTE:The 15 seconds is referring to which? temp1<10000 or temp1>1000000?

I don't try this PR yet. But from the code I guess temp1>1000000 is referring to 15 seconds. temp1<10000 is for buzzer beeping after sw1 is pressed.

Goodluck Shuhada.. :D
Request for complete solution for FYP? Why don't request for graduation certificate?
redips_id
Discoverer
 
Posts: 82
Joined: Wed Jan 20, 2010 6:23 pm


Return to DIY Project Set

Who is online

Users browsing this forum: No registered users and 14 guests

cron