Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
millis
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vasant Phadke  
View profile  
 More options Dec 21 2011, 11:53 pm
From: Vasant Phadke <nasik2...@gmail.com>
Date: Wed, 21 Dec 2011 20:53:07 -0800 (PST)
Local: Wed, Dec 21 2011 11:53 pm
Subject: millis
 i recently started working on pinguino and wanted to make a snooze
timer for my son who wants to stay awake while studying. he should
press a button within a specified time or else the buzzer will sound
and awaken him

i needed to resert the millis count for this sothat every time the
button is pressed the cycle starts over again

i searched and found the _millis(0) post

i copy pasted the whole code as a trial but it wont compile giving
error

i am using beta 9.05 and 18F2550

thanks in advance for helping

vasant phadke


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jp mandon  
View profile  
 More options Dec 22 2011, 3:19 am
From: jp mandon <jp.man...@gmail.com>
Date: Thu, 22 Dec 2011 09:19:27 +0100
Local: Thurs, Dec 22 2011 3:19 am
Subject: Re: millis

Hi

_millis is an internal variable used to count time. You can reset it using:
_millis=0;

I hope your son will stay awake with this !!

Jean-Pierre

2011/12/22 Vasant Phadke <nasik2...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vasant Phadke  
View profile  
 More options Dec 22 2011, 4:12 am
From: Vasant Phadke <nasik2...@gmail.com>
Date: Thu, 22 Dec 2011 01:12:25 -0800 (PST)
Local: Thurs, Dec 22 2011 4:12 am
Subject: Re: millis
i tried that by copying a code of millis reset given elsewhere in the
group posts

but it wont compile giving error

i dont know why . i am using pinguino beta 9-05 or shall i use another
version

thanks again for a quick one

vasant

On Dec 22, 1:19 pm, jp mandon <jp.man...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benoit Espinola  
View profile  
 More options Dec 22 2011, 4:22 am
From: Benoit Espinola <benoitespin...@gmail.com>
Date: Thu, 22 Dec 2011 10:22:50 +0100
Local: Thurs, Dec 22 2011 4:22 am
Subject: Re: millis
Replace _millis(0); with _millis=0;

Did you try this?

Sent from my iPhone

On 22 déc. 2011, at 10:12, Vasant Phadke <nasik2...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benoit Espinola  
View profile  
 More options Dec 22 2011, 4:24 am
From: Benoit Espinola <benoitespin...@gmail.com>
Date: Thu, 22 Dec 2011 10:24:21 +0100
Local: Thurs, Dec 22 2011 4:24 am
Subject: Re: millis
If you post the source code we can also help you in a more effective way...

Best regards,

Benoit

On 22 déc. 2011, at 10:12, Vasant Phadke <nasik2...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vasant Phadke  
View profile  
 More options Dec 22 2011, 5:59 am
From: Vasant Phadke <nasik2...@gmail.com>
Date: Thu, 22 Dec 2011 02:59:00 -0800 (PST)
Subject: Re: millis
void setup()
{
pinMode(0,OUTPUT);
digitalWrite(0,LOW);

}

void loop()
{
if (millis()>1000) digitalWrite(0,HIGH);  // light the led after 1
second

if (millis()>2000) _millis=0;  // reset the millis() counter after 2
seconds

}

this is the code from the wiki--functions--millis

i tried _millis0; and _millis(0); both

same compilation error-------error 20: Undefined identifier '_Millis'
thanks again for a quick reply

regards
vasant

On Dec 22, 2:24 pm, Benoit Espinola <benoitespin...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jp mandon  
View profile  
 More options Dec 22 2011, 6:49 am
From: jp mandon <jp.man...@gmail.com>
Date: Thu, 22 Dec 2011 12:49:49 +0100
Local: Thurs, Dec 22 2011 6:49 am
Subject: Re: millis

remove the comment '// reset the millis() counter after 2' and it will be
OK. This is a bug of the 9-05 release.

JP

2011/12/22 Vasant Phadke <nasik2...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vasant Phadke  
View profile  
 More options Dec 22 2011, 8:46 am
From: Vasant Phadke <nasik2...@gmail.com>
Date: Thu, 22 Dec 2011 19:16:38 +0530
Local: Thurs, Dec 22 2011 8:46 am
Subject: Re: millis
Thanks everybody for the response i will try it tomorrow and revert
back thanks once again
Vasant

On 12/22/11, jp mandon <jp.man...@gmail.com> wrote:

--
Sent from my mobile device

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benoit Espinola  
View profile  
 More options Dec 22 2011, 12:06 pm
From: Benoit Espinola <benoitespin...@gmail.com>
Date: Thu, 22 Dec 2011 18:06:09 +0100
Local: Thurs, Dec 22 2011 12:06 pm
Subject: Re: millis
You reset the millis count but you don't seem to put the Pin 0 state to LOW...

Regards,

Benoit

On 22 déc. 2011, at 14:46, Vasant Phadke <nasik2...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vasant Phadke  
View profile  
 More options Dec 22 2011, 10:53 pm
From: Vasant Phadke <nasik2...@gmail.com>
Date: Thu, 22 Dec 2011 19:53:45 -0800 (PST)
Local: Thurs, Dec 22 2011 10:53 pm
Subject: Re: millis
dear jp
i tried ,first thing in the morning,by removing the comment
sorry but still the same error
vasant phadke

On Dec 22, 6:46 pm, Vasant Phadke <nasik2...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Benoit Espinola  
View profile  
 More options Dec 23 2011, 5:10 am
From: Benoit Espinola <benoitespin...@gmail.com>
Date: Fri, 23 Dec 2011 11:10:48 +0100
Local: Fri, Dec 23 2011 5:10 am
Subject: Re: millis
void setup()
{
pinMode(0,OUTPUT);
digitalWrite(0,LOW);

}

void loop()
{
if (millis() > 1000) digitalWrite(0,HIGH);

if (millis() > 2000){
 _millis = 0;
digitalWrite(0,LOW);

}
}

Try to copy and paste this code, I removed all the comments and added a space in between the operators and conditionals and added the digitalWrite low to turn off the LED

(I have no computer with me right now so I cannot test the source code but try this anyway)

On 23 déc. 2011, at 04:53, Vasant Phadke <nasik2...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vasant Phadke  
View profile  
 More options Dec 23 2011, 6:30 am
From: Vasant Phadke <nasik2...@gmail.com>
Date: Fri, 23 Dec 2011 03:30:25 -0800 (PST)
Local: Fri, Dec 23 2011 6:30 am
Subject: Re: millis
thanka benoit that has taken care of my problem

thanks again

vasant

On Dec 23, 3:10 pm, Benoit Espinola <benoitespin...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »