Chapter 3. Controlling a Motor from LabVIEW

In this chapter, we will write our first VI (LabVIEW program) from scratch. As an example, we will control a DC motor that is connected to the Arduino board. We will build the VI from scratch and then control the direction and speed directly from the LabVIEW graphical interface.

Hardware and software requirements

On the hardware side, you will first need an Arduino Uno board.

For the motor, I chose a small 5V DC motor from Amazon. You can choose any brand that you want for the motor; the important thing is that it has to be rated to work at 5V so that it can be powered directly from Arduino. You can also get a motor that uses higher voltages or currents, but you will need to modify the hardware configuration ...

Get Programming Arduino with LabVIEW now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.