Servo Control with VBA

Hi all, I'm hoping someone can help out a noob to arduino/programming.

I haven't bought a arduino yet but want to know if what I'm trying to do is possible.

I want to be able to press a button in Excel to tell a continuous rotation servo to run for 10 seconds, and another button to run for 5 seconds. These times don't have to be exact but close enough, the end point of rotation is inconsequential.

So my questions really are:

  1. Is there a way to have just 2 buttons in Excel using VBA?
  2. What sort of code would I need for each servo duration?
  3. What kind of hardware would I need other than the arduino and servo?

Any help would be greatly appreciated and I know you'll probably want more information, which I'll try to give.

Thanks

Du You want to run Excel in a Pc and have and Arduino Control the servos?
Are You sure You are up to this rather advanced project? There is hardly any ready code to copy on this planet.

VBA is doable, but why?

Last year I used VB.NET to send commands to Arduino.

Gaffee:
So my questions really are:

  1. Is there a way to have just 2 buttons in Excel using VBA?
  2. What sort of code would I need for each servo duration?
  3. What kind of hardware would I need other than the arduino and servo?
  1. The Excel/VB application will need to have serial port functions to connect and communicate with the arduino. Excel will also need to have the button functions.

  2. Simple arduino servo code can probably do that.

  3. You will probably need a power supply for the servos, and wires with a method to attach them. You might also need a USB cable to connect the pc to the arduino.

Why don’t you use two buttons and wire these to the Arduino?

For a PC GUI I’d use Processing. It comes with full PC-Arduino communication and buttons etc. for the GUI.

Railroader:
Du You want to run Excel in a Pc and have and Arduino Control the servos?
Are You sure You are up to this rather advanced project? There is hardly any ready code to copy on this planet.

I'd like to do it if it's possible, I just wasn't sure if it was possible that's all. And yes I would like to run Excel on a pc and Arduino control the servos.

ieee488:
VBA is doable, but why?

Last year I used VB.NET to send commands to Arduino.

It's because I will be using Excel to input data from tests into and to make things look nice I'd like to be able to run the Arduino servo control from Excel too. So I'll have only one interface open on the PC. It's purely for aesthetics and not necessary, I could just use physical buttons.

You can look at how Arduino to Windows PC communications are done by looking at the macro’s done by the PLX-DAQ thingy. https://forum.arduino.cc/index.php?topic=437398.0