Why does the MATLAB support for Arduino use a different command syntax?
2 ビュー (過去 30 日間)
古いコメントを表示
The Arduino command for configuring the digital pins is pinMode()
eg. pinMode(3,OUTPUT) configures digital pin 3 as an output.
In MATLAB I have to use a different command syntax, namely configureDigitalPin()
eg. configureDigitalPin(a,3,'output')
where 'a' is the arduino object
I am deterred by this because I cannot easily develop my program in MATLAB and deploy on the Arduino without changing alot of code.
I have seen a third syntax which goes like this, a.pinMode(), where 'a' is still the Arduino object.
eg. a.pinMode(3,OUTPUT)
This is much better - the syntax is exactly the same as Arduino syntax, with the 'a.' added. I can easily change this to embed the code in the Arduino by a simple find and replace of 'a.' for '' (nothing). Also I don't have to learn two separate commands for the same command.
Can someone explain how I can enable this final form of the syntax?
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Arduino Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!