Asked

Smooth Start Of The Servo Movements When Starting ARC

Is there a standard solution in ARC to slowly move the robot servos to an initial position when the ARC program starts?

Especially with larger robots, switching on puts a lot of dynamic load on the servos and puts a strain on the entire mechanics of the robot.

If there is no standard solution available, how could integrate a Python or a Java script to do this job?


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

PRO
Synthiam
#17  

You can continue using the legacy ARC if you don't want to upgrade. It's impossible to integrate ezscript into the new ARCx so it has to go because it's not compatible. Just keep using the existing ARC if you don't want to use ARCx:)

#18   — Edited

Quote:

I appreciate EZ-Script is going away
Ya, your going to see a lot of people walking any from ARC or not even trying it once ezscrip is abonded. I know you've wanting to kill it for a while now but my advice {for what it's worth} is that you give the legacy ARC equal platform baced on its ability to use ezscript and help new script writers get into robotics. Why turn your back on them? It's a legitimate computer language. Don't abandon it

PRO
Synthiam
#19   — Edited

I get it - but EZ-Script is incompatible with any new ARCx features and framework. It is impossible to port ezscript to ARCx. I'm not using the word "impossible" lightly. It's physically absolutely not compatible, and without a doubt, there is no way it can work:)  , haha. So, anyone who doesn't want to use the new ARCx can continue using legacy ARC. Just keep doing what you're doing; your robot with ezscript will continue working. You're not forced to upgrade.

If anyone decides to migrate from using ezscript to ARCx, I know it'll be easy because the new features motivate them to learn Python or JavaScript. Although, Javascript is just as easy as EZ-Script..

Javascript

x = 1;

if (x == 1) {
  print("Hello");
}

EZ-Script

$x = 1

IF ($x = 1) 
  print("Hello");
ENDIF

The only difference is using { } brackets like all other programming languages.

Or, you can use Python, which is even easier because it uses spaces. That's why they teach it in elementary school. So it looks like this...

Python

x = 1

if x == 1
  print("Hello")
PRO
Germany
#20  

Sometimes we are just averse to change, but when it is behind us, we often see it as progress.;)

I can still remember how long I stuck with BASIC, Pascal and Fortran. It was only comfortable because I learned it when I was a student. (long, long time ago):(.

Today I can't imagine the programming world without C, C++,  Python or Java.

The computer- / software world is one of the most innovative of all, so we sometimes have to leave something behind, to make room for new performance. See e.g. AI.

I'm looking forward to ARCx and can't wait for it love

#21  

@DJ, I do understand and accept the inability to use EZ Script in the new Arcx. I just wanted to mention in my above post what an important tool EZ Script is to people needing a way to easily get into programing their robots. I only posted my above comment out of concern that people new to scripting that have little time or need to learn other languages would be left behind and walk away. That's where I was at when I found your old EZ Builder and EZ Script. I'm so thankful that you had put all that time and effort into making this dream of having a real robot possible for me. I hope in the future others in the same position will be able to quickly find and continue to use the legacy ARC and EZ Script. It's truly a game changer for a lot of people.

With that said, I've been slowly learning Javascript and converting my EZ Scripts. Truthfully, I really like the way Javascript preforms. However I do have one big issue with converting a few really big and important EZ Scripts in my project. They rely heavy on jumping from one spot in the script to another using the GoTo command. Javascript seems to be a very lineal platform. I haven't been able to find a way to do that with JS.  For example, I'll ask the robot to say three different things for many different subjects and return random answers. The script will jump to the requested subject, pick a random number, then answer the response that is assigned to that random number. It will then go back, command a random sound file to be spoken (something like How did you like that answer?) then repeat this process two more times. Sprinkled into this process are script commands that run lights, motors and ControlCommands() that start other scripts. It will then jump towards the end of the script and do a closing routine which is random and different each time.

So, again, my apologies to the OP of this thread for this hijack. I know this all is way off subject. I should probably continue all this at another time in my own thread.

PRO
Canada
#22  

I wonder how @athena would handle it.

@athena Write a JavaScript program that generates a random number and if 1 prints hello world if 2 prints bonjour world if 3 prints gday world if 4 prints guten tag world if 5 prints aloha world

use reusable subroutines and not else if statements.

PRO
Synthiam
#23   — Edited

Haha, how can a computer language or a human decide IF without using IF? Haha

theres three basic things for programming, that all languages must have

  • if/elseif/else
  • while/for
  • subroutine/function/method

so you asked Athena to make a program but in your question you said If x equals 2. So how can you describe the question without using if? Haha:) if you expect her to make a program without an IF. Conditions are the ONLY way to determine IF something is something. I guess you could use a switch, but it’s a fancy IF tree.

I think what you actually mean is make a program that calls methods from if conditions. Well, let’s see what she does with your question

PRO
Canada
#24   — Edited

If I was to write in basic it would be goto or go sub random number.

I just asked same question of chatgpt

// Function to generate a random number between 1 and 5
function generateRandomNumber() {
    return Math.floor(Math.random() * 5) + 1;
}

// Function to print a greeting based on the given number
function printGreeting(number) {
    switch (number) {
        case 1:
            console.log("Hello World");
            break;
        case 2:
            console.log("Bonjour World");
            break;
        case 3:
            console.log("G'day World");
            break;
        case 4:
            console.log("Guten Tag");
            break;
        case 5:
            console.log("Aloha World");
            break;
        default:
            console.log("Invalid number");
    }
}

// Generate a random number
const randomNumber = generateRandomNumber();

// Print the greeting based on the random number
printGreeting(randomNumber);