How can I make a loop for sending a signal in form of step, using only Matlab and Arduino Mega 2560 (not Simulink nor step function itself)?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi everyone
I'm working with arduino Mega 2560 and Matlab and I'm using the function "writePWMVoltage" for sending a specific voltage to outside.
My issue is the following situation:
I don't know how to make a loop for creating a "step" signal (without using the function of matlab itself, nor Simulink).
For example, I want to send a voltage of 2 volts since t = 0 to 30 seconds, and from the instant 31 second, send a voltage of 2.5 Volts (If you see, this is like a "step function")
I'm trying with the functions "for", "while", and I don't know how to get this thing, it appears some errors, I'm a amateur in programation.
Please help me.
Thank you so much for reading and answer me in advance.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Arduino Hardware 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!