Updating server code on board Nano3 (COM5). Please wait. How can I solve this?

14 ビュー (過去 30 日間)
wisam kh
wisam kh 2018 年 8 月 10 日
コメント済み: wisam kh 2018 年 8 月 18 日
Hello
When I try to connect to arduino I get this message
>> a=arduino('com5','nano')
Updating server code on board Nano3 (COM5). Please wait.
but after about 10 seconds it connect and give me the details
a =
arduino with properties:
Port: 'COM5'
Board: 'Nano3'
AvailablePins: {'D2-D13', 'A0-A7'}
Libraries: {'I2C', 'SPI', 'Servo'}
whats the problem? Because when I want to read RFID works fine, but where I then want to turn on a green led that shows the same error and stops the RFID reader then I can only turn on the light
I can not read RFID again until I do restart for the Arduino board and load the skitch again.
I tried a lot of proposed solutions but could not find a solution
  2 件のコメント
Madhu Govindarajan
Madhu Govindarajan 2018 年 8 月 13 日
Can you explain your workflow a little bit for us to be able to understand your situation better and assist?
Here are some points to clarify in the meantime -
1) When you use a = arduino, you are downloading a server sketch from MATLAB to Arduino that will make your arduino respond to a set of functions/methods. It does erase any previous sketch running on the Arduino from Arduino IDE or Simulink support for Arduino.
2) If you want to run a sketch from the Arduino IDE and still be able to communicate with MATLAB, then you must use serial communication which comes with the Instrument Control Toolbox to get full functionality.
HTH, Madhu
wisam kh
wisam kh 2018 年 8 月 15 日
編集済み: wisam kh 2018 年 8 月 15 日
@Madhu Govindarajan
Thank you for this interaction. At first I would like to clarify something, the code is placed on the Arduino panel until it reads the RFID, using the Arduino C language, but it is up to the Matlab to make scan of the Arduino so that Matlab can have what the Arduino read.
What I understand from your words is that I have to use another port if I want to control other things on the Arduino

サインインしてコメントする。

回答 (1 件)

Madhu Govindarajan
Madhu Govindarajan 2018 年 8 月 17 日
Create a serial object in MATLAB for the port you are writing data to via your Arduino Sketch. Go through this list of functions to see which one is appropriate to read the type of data you are sending-
https://www.mathworks.com/help/releases/R2018a/matlab/serial-port-devices.html

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by