GLOBAL SITE AUSTRALIAN SITE

edscratch limitation - Can't set an input parameter to a variable name | EdScratch programming | Forum

Please consider registering
guest

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

Topic3
edscratch limitation - Can't set an input parameter to a variable name
September 2, 2018
11:01 am
Dave
New Member
Members
Forum Posts: 2
Member Since:
September 2, 2018
sp_UserOfflineSmall Offline

Hi there,

I'm trying to to something really basic that you can do in regular scratch, or pretty much any other language.

For example I want to have a variable called length. I want to drive the edison (length) centimetres. I can't do this in the current implementation of edscratch. I see that edscratch makes use of operators (the green area) but those are only good for data and 

I never want to hard-code numbers like this into any program if I can help it. I can program a ridiculous workaround for the thing I'm trying to do in the meantime (e.g., stuff happens to end up with length = 10; repeat (length); { drive forwards for 1 cm at speed 5; } but that's clunky.

I'm going to have to use another language if I ever want to do anything terribly interesting until this gets implemented.

Attached I have a regular scratch program fragment that I can't do in edscratch:

what I can easily do in scratchImage Enlarger

And here is the thing I'm trying to do in edscratch, and the workaround below:

the thing I canImage Enlarger

I'm looking forward to seeing you guys flesh out the functionality of edscratch so we can do some of these basic tasks.

Thanks,

Dave

September 3, 2018
10:17 am
Ben
Admin
Forum Posts: 174
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi Dave,

If you are after a block to just make the robot drive forward 10 centimeters you can use the 'drive for' block and set it to 10 centimeters.

The 'drive for' blocks can only accept number inputs into the blocks, not operators or variables. The reason for this has to do with how the robot works. The robot itself does not operate in centimeters or inches. In fact, it operates in something called 'ticks'. To make the robot and the programming language easier to use, there are lots of calculations performed in the background of the language and when the program is compiled to be sent to the robot. This 'behind the scenes' work converts the centimeters input into the inputs that the robot actually understands.

There are various ways you can complete the task that you are talking about. If you want to do this task using variables, you might want to learn about the 'set motor' blocks and how Edison robots react with variables. You can learn more about these in the EdScratch student lesson activities. In particular for your problem, working through U2-2.5 Let’s explore Edison’s motors and U5-1.3 Let’s explore variables. You can find these at: https://meetedison.com/content/EdScratch/EdScratch-student-lesson-activities.pdf

EdScratch is designed to be acceptable to introductory-level users while still enabling solid computer science. As such, some inputs have been locked to only what the robot can accept to help make using basic blocks easier. If you are working with students needing more advance computer science, we highly recommend EdPy which can be found at edpyapp.com, more information can be found at: https://meetedison.com/robot-programming-software/edpy/

September 6, 2018
10:16 pm
Filippos
Member
Members
Forum Posts: 4
Member Since:
September 6, 2018
sp_UserOfflineSmall Offline

Dear Nelson,

Where is the "drive for" block located?

Thank you.

September 7, 2018
12:17 pm
Ben
Admin
Forum Posts: 174
Member Since:
August 24, 2015
sp_UserOfflineSmall Offline

Hi,

The 'drive for' blocks that I am referring to is just the group of drive blocks that tell the Edison robots to drive forward or back 'for' a set time/distance etc. These include 'forwards for 1 cm at speed 5'. 

You can find them under the 'Drive' set of blocks.

July 31, 2019
12:53 am
Anthony
New Member
Members
Forum Posts: 1
Member Since:
May 31, 2019
sp_UserOfflineSmall Offline

Dave said

Hi there,

I'm trying to to something really basic that you can do in regular scratch, or pretty much any other language.

For example I want to have a variable called length. I want to drive the edison (length) centimetres. I can't do this in the current implementation of edscratch. I see that edscratch makes use of operators (the green area) but those are only good for data and 

I never want to hard-code numbers like this into any program if I can help it. I can program a ridiculous workaround for the thing I'm trying to do in the meantime (e.g., stuff happens to end up with length = 10; repeat (length); { drive forwards for 1 cm at speed 5; } but that's clunky.

I'm going to have to use another language if I ever want to do anything terribly interesting until this gets implemented.

Attached I have a regular scratch program fragment that I can't do in edscratch:

what I can easily do in scratchImage Enlarger

And here is the thing I'm trying to do in edscratch, and the workaround below:

the thing I canImage Enlarger

I'm looking forward to seeing you guys flesh out the functionality of edscratch so we can do some of these basic tasks.

Thanks,

Dave  

Dave is right. 

Being able to use variables to change angles and distances is fundamental.  This should be a basic part of any programming interface; Python should not be a prerequisite for using variables to accomplish basic robot tasks.  There really should be no reason this cannot be done.frown  The way things are currently implemented, EdScratch is SEVERELY limited in its usefulness as a programming tool--it is barely more sophisticated than EdBlocks.

FYI Dave...check out https://snappycode.org.  It is a free Python version of Blockly (the tool underlying Scratch and presumably EdScratch).  My students move on to Python in 4th and 5th grade (~9-11 y.o.), but they are unable to type well enough to get through much Python coding the traditional way.  The value of the switch to Python is to expose the students to another way to program something.  I would love to incorporate the EdPy API into Snappy Code.  Then I can show them EdScratch, and we can compare the strengths and weaknesses of Scratch, EdScratch and Snappy Code/Python to accomplish specific tasks. I think the act of evaluating the different techniques is a valuable skill for students to learn.

Anyway, I strongly agree with you Dave.  I am going to have to reevaluate the Edison's usefulness for serious computer science lessons.  It is great for other concepts like STEM and the invention cycle though, and I can't complain about the cost! 

Anthony

  • 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

Country

Pin It on Pinterest

Share This