Welcome to the 8th tutorial of the series using matlab gui with arduino and this is part 3 of the project “interfacing l298n motor driver with arduino using matlab gui” .
Click here to read previous tutorial, “Part 2: Creating GUI“
In the last tutorial we created this gui for our project and today we will write code for it so that required commands can be given to arduino through this GUI:
Watch video version of this part of project for better understanding of Commands used:
CODE:
1. Under Opening function type:
2. Under M1f pushbutton function type:
3. Under M1b pushbutton function type:
4. Under M2f pushbutton function type:
5. Under M2b pushbutton function type:
6. Under FWD pushbutton function type:
7. Under BWD pushbutton function type: