My project is based on controlling a moving fan using different hand gestures. I am using image processing toolbox from matlab to detect and identify various hand movements.I want to link my matlab codes to arduino for hardware implementation. How to link these two?

  • this may help: arduino support from matlab. Firmata may also be what you need to link matlab to arduino.
    – SMFSW
    Commented Mar 19, 2017 at 11:20
  • Seems like Serial is often used but then you need a protocol. You can use everything from textual or binary blocks to more advanced parsing. To give you more advice you would need to describe what you want to communicate and how often (for the bandwidth and response time calculation). Commented Mar 19, 2017 at 14:47

1 Answer 1


This block of code can give you some idea...

% create an arduino object

a = arduino('com3', 'uno');     

% start the loop to blink led for 10 seconds

for i = 1:10

    writeDigitalPin(a, 'D11', 1);


    writeDigitalPin(a, 'D11', 0);



% end communication with arduino

clear a

For more details on this code and working of it you can visit.... Here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.