Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

besoin d'aide

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
8 postsPage 1 of 1
8 postsPage 1 of 1

besoin d'aide

Post by torne » Fri Sep 16, 2011 8:55 pm

Post by torne
Fri Sep 16, 2011 8:55 pm

Bonjour a tous ,
j'ai besoin d'aide .
je voudrai dans roboplus metre ce programme

si port 1 est haut pendand 4 secondes alors motion 1

est ce possible :?: si oui donner moi des explications ou exemples.
je vous remercie d'avance.

Torne :roll:
Bonjour a tous ,
j'ai besoin d'aide .
je voudrai dans roboplus metre ce programme

si port 1 est haut pendand 4 secondes alors motion 1

est ce possible :?: si oui donner moi des explications ou exemples.
je vous remercie d'avance.

Torne :roll:
torne
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 44
Joined: Fri Dec 03, 2010 8:30 pm
Location: France

Post by nunogato » Sat Sep 17, 2011 10:02 am

Post by nunogato
Sat Sep 17, 2011 10:02 am

In English please
In English please
nunogato
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 86
Joined: Mon Mar 15, 2010 3:48 pm

Post by torne » Sat Sep 17, 2011 11:22 am

Post by torne
Sat Sep 17, 2011 11:22 am

Hello has all, I need help.
I shall want to put schedules(programs) in roboplus

If port 1 is High during 4 seconds seconds then motion 1

Is this possible :?: if yes to give I explanations or examples.
I thank you beforehand.

Torne :wink:
(Translated by google)
Hello has all, I need help.
I shall want to put schedules(programs) in roboplus

If port 1 is High during 4 seconds seconds then motion 1

Is this possible :?: if yes to give I explanations or examples.
I thank you beforehand.

Torne :wink:
(Translated by google)
torne
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 44
Joined: Fri Dec 03, 2010 8:30 pm
Location: France

Post by Fritzoid » Mon Sep 19, 2011 12:06 pm

Post by Fritzoid
Mon Sep 19, 2011 12:06 pm

You can use the fact that the callback routine is run at regular intervals to approximate what you want. Since the callback routine runs once every 0.007825 seconds the processor would take 512 passes through the routine over a 4 second span. You can read the port value in the callback routine and increment a counter if the value is high. If the value is low you clear the counter. If the counter reaches 512 then you can be pretty sure that the port has been high for the last 4 seconds.
You can use the fact that the callback routine is run at regular intervals to approximate what you want. Since the callback routine runs once every 0.007825 seconds the processor would take 512 passes through the routine over a 4 second span. You can read the port value in the callback routine and increment a counter if the value is high. If the value is low you clear the counter. If the counter reaches 512 then you can be pretty sure that the port has been high for the last 4 seconds.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by torne » Mon Sep 19, 2011 4:38 pm

Post by torne
Mon Sep 19, 2011 4:38 pm

Thank you Fritzoid for this reponse.
But as I am debutant a concrete example can give me myself I
thanks you
torne :wink:
Thank you Fritzoid for this reponse.
But as I am debutant a concrete example can give me myself I
thanks you
torne :wink:
torne
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 44
Joined: Fri Dec 03, 2010 8:30 pm
Location: France

Post by Fritzoid » Mon Sep 19, 2011 6:27 pm

Post by Fritzoid
Mon Sep 19, 2011 6:27 pm

Here's the basic structure for a program that continuously reads port 1. The code at lines 8-9 only runs if the port has been in the high state for 4 seconds or more.

Image
Here's the basic structure for a program that continuously reads port 1. The code at lines 8-9 only runs if the port has been in the high state for 4 seconds or more.

Image
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Thank you

Post by torne » Mon Sep 19, 2011 7:53 pm

Post by torne
Mon Sep 19, 2011 7:53 pm

Thank you for the example
I am going to try it tomorrow.
Still thank you :wink:

Torne
Thank you for the example
I am going to try it tomorrow.
Still thank you :wink:

Torne
torne
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 44
Joined: Fri Dec 03, 2010 8:30 pm
Location: France

Re: Thank you Fritzoid

Post by torne » Thu Sep 22, 2011 11:21 am

Post by torne
Thu Sep 22, 2011 11:21 am

Hello Fritzoid

Bitter to have installed my program everything works.

I still thank you for your explanations clearly.

Torne :wink:

( Translated by Google)
Hello Fritzoid

Bitter to have installed my program everything works.

I still thank you for your explanations clearly.

Torne :wink:

( Translated by Google)
torne
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 44
Joined: Fri Dec 03, 2010 8:30 pm
Location: France


8 postsPage 1 of 1
8 postsPage 1 of 1