Effacer les filtres
Effacer les filtres

Recording time stamps in a log file from an Arduino and camera.

3 vues (au cours des 30 derniers jours)
Sajida Khan
Sajida Khan le 6 Oct 2022
Modifié(e) : Aditya Srikar le 25 Mai 2023
Hi
I am very new to matlab, so please let me know if it is even possible.
I want to send an output signal to an arduino board, which controls an air puff system, so far I can send the signal. But the first problem is that I want to send air puffs in the following pattern.
The first two (air puffs) are 10msec apart then there is a 30seconds wait and then another set of two.
I want to recod the time stamps for the airpuffs in a log file.
In the same log file I also want to record the time stamps for a Basler camera video.
Any hep would be greatly appreciated.
Thank you.

Réponses (1)

Aditya Srikar
Aditya Srikar le 25 Mai 2023
Modifié(e) : Aditya Srikar le 25 Mai 2023
Yes, it is certainly possible to send output signals to an Arduino board from MATLAB and control an air puff system.
You can use MATLAB's `pause` and `serial` functions to send signals to an Arduino board for air puff control, and `tic` and `toc` functions to log time stamps. Basler camera time stamps can be added to the log file using the same approach, and the `fopen` and `fprintf` functions can be used to write to the log file. Helpful references include `tic`, `toc`, MATLAB- Arduino communications, and Basler camera time stamping.
Here is some reference to help you get started:-
Timing execution of code with tic and toc: https://www.mathworks.com/help/matlab/ref/tic.html

Catégories

En savoir plus sur MATLAB Support Package for IP Cameras dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by