[SOLVED] No event wait | EdWare graphical programming | Forum

Please consider registering

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

[SOLVED] No event wait
June 16, 2017
3:43 pm
Forum Posts: 4
Member Since:
June 11, 2017
sp_UserOfflineSmall Offline

Image Enlarger

Hi to everyone.

Please explain what happens if we use a loop and inside there isn’t an event wait like the above. How much time the dual motor drive will go on? Can we use an event wait block 0.1 sec after each dual drive or is it wrong?

Also all my posts awaiting moderation, one of them is answered but still waits moderation. confused

Thank you 

June 20, 2017
9:49 am
Forum Posts: 180
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi George

This program is a follow the torch program, it is designed so that Edison is checking where the torch is as often as possible.

To do this, you need to think of the Dual Drive blocks as switches. They simply tell Edison to switch the motors on at a certain speed.

When the program starts it:

Enters the loop -> reads both light levels -> subtracts one from the other -> turns on the motors so Edison turns towards the light -> loops back to that start (from here on out, Edisons motors will always be on, but the direction will change based on where the torch is)

All of these actions take approximately a hundredth of a second, so Edison has not turned very far when the second loop starts:

Read both light levels -> subtracts one from the other -> goes to turns on the motors so Edison turns towards the light but they are already on from the previous loop

This will loop around a few hundred times before Edison turns far enough that the light is now slightly brighter on the other side. During the next loop, Edison will take the opposite track in the If and the motors will turn on in the other direction.

The length of time the motors are moving in one direction is controlled by the loop and the sensor values used in the IF statement.

Adding an event wait block 0.1 sec after each dual drive will slow down the frequency of sensing and Edison won’t follow the torch very well

  • Keep up with Edison

    Sign up for our newsletter to get all things Edison delivered straight to your inbox.

  • This field is for validation purposes and should be left unchanged.

Heads up

The Australian Federal Parliament has passed a law that extends goods and services tax (GST) to low value imports of physical goods imported by consumers from 1 July 2018.

This means that all customers purchasing Edison robots and accessories with an Australian shipping address must now pay GST. The GST will be automatically added to your purchase and show as a line item on your invoice.

We've detected that you are in Australia, so we wanted to let you know that we have changed your settings to view our Australian site, which displays GST inclusive pricing.

You can change back to the GLOBAL SITE at any time using the link in the top left of the page.

OK got it!    Take me to the GLOBAL SITE instead


Pin It on Pinterest

Share This