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– SMFSW2017年03月19日 11:20:19 +00:00Commented 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).Mikael Patel– Mikael Patel2017年03月19日 14:47:45 +00:00Commented 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);
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
answered Mar 19, 2017 at 15:03
lang-cpp