2

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 Mar 19 '17 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). – Mikael Patel Mar 19 '17 at 14:47
3

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);

    pause(0.5);

    writeDigitalPin(a, 'D11', 0);

    pause(0.5);

end

% 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, privacy policy and cookie policy

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