Set Loop Count | EdScratch programming | Forum

Please consider registering
sp_LogInOut Log In sp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Forum Options

Minimum search word length is 3 characters - maximum search word length is 84 characters
Set Loop Count
September 18, 2019
10:54 am
New Member
Forum Posts: 1
Member Since:
September 18, 2019
sp_UserOfflineSmall Offline

I’m trying to use variables in EdScratch to set a loop count.  I would like to have Edison respond differently to even and odd repetitions.  I was able to do this easily in DroneBlocks using the Tello drones.  Is there a way to do it with the Edison robots?

September 23, 2019
12:38 pm
Adrian Herber
Forum Posts: 23
Member Since:
September 2, 2019
sp_UserOfflineSmall Offline

Yes, it’s certainly possible to do this in EdScratch. 

One way you could do this is by using Repeat Until loop along with a small formula to detect odd steps by dividing integers:

Image Enlarger


Another option if your objective is simply to alternate behaviour each loop is to use a variable alternating between two values in an If .. Else .. control block, which may be simpler to follow:

Image Enlarger




I hope that answers your query, please let me know if you have further questions.

Forum Timezone: Australia/Adelaide
Most Users Ever Online: 19
Currently Online:
Guest(s) 3
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Texas: 27
MAX: 16
edison101: 15
gloriacoding: 13
arvin-edison: 12
Caleb: 12
rino.sardon: 10
David: 9
djosh: 8
demetraorth: 7
Member Stats:
Guest Posters: 0
Members: 4540
Moderators: 1
Admins: 5
Forum Stats:
Groups: 3
Forums: 12
Topics: 280
Posts: 774
Newest Members:
Amy, monetize, Francisco Orta Soler, Carrol, Martin, Corey, Marissa, bilqees, Blake, caidan
Moderators: Test Moderator: 0
Administrators: Tony: 0, Brenton O'Brien: 3, Ben: 180, Sean Killian: 0, Adrian Herber: 23
  • 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