wokwi / wokwi-elements

Web Components for Electronics and IoT Parts
https://elements.wokwi.com/
MIT License
185 stars 50 forks source link

Robot Arm Element - Adds robot arm to storyboard. #119

Open yepher opened 2 years ago

yepher commented 2 years ago

Adds robot arm

yepher commented 2 years ago

I'm not exactly sure how to handle the frame since the robot arm has a fairly wide range of movement.

Is there a way to define the "marching ants" frame independent of the robot arm frame?

urish commented 2 years ago

Also:

  1. Let's use a slider for the angle controls and a color picker for the colors in storybook? See the wokwi-rgb-led story for an example for both

  2. Is there a reason you went with yellow as the default color for the robotic arm?

yepher commented 2 years ago

I guess I accidently delete this somewhere along the way. I will add it back in:


argTypes: {
    sholderAngle: { control: { type: 'number', min: 260, max: 360, step: 1 } },
    elbowAngle: { control: { type: 'number', min: 0, max: 135, step: 1 } },
    wristAngle: { control: { type: 'number', min: 0, max: 120, step: 1 } },
    gripperAngle: { control: { type: 'number', min: 270, max: 360, step: 1 } },
    gripperColor: { control: { type: 'color' } },
    armColor: { control: { type: 'color' } },
    jointColor: { control: { type: 'color' } },
  },
  args: {
    sholderAngle: 270,
    elbowAngle: 82,
    wristAngle: 80,
    gripperAngle: 270,
  },

As for yellow, I figured a big heavy dangerous piece of equipment like this robotic arm should be yellow :) Actually I just randomly picked yellow.

urish commented 2 years ago

I guess I accidently delete this somewhere along the way. I will add it back in:

"range" type seems more convenient than "number" for the angles (at least for me)

As for yellow, I figured a big heavy dangerous piece of equipment like this robotic arm should be yellow :)

haha :) google images show that it's either metallic or black combined with either blue, yellow, light gray, or orange (or sometimes just plain black).

So I guess yellow isn't a bad choice. I thought either metallic or purple could be fun (it's the dominant color in Wokwi), though I've no strong opinion here. Yellow is good too.

yepher commented 2 years ago

I was not quite sure how to apply the clamp function since this is an output device.