How I can read data from VL53L0X in simulink?

조회 수: 23 (최근 30일)
Héctor Maestre
Héctor Maestre 2019년 3월 4일
댓글: Ansari86 2022년 5월 19일
Hi.
I am trying to read the distance data of a VL53L0X sensor in simulink (I2C).
I successfully got to read the data in the workspace with the Adafruit library (https://github.com/sandorcourane/matlab-vl53l0x). However, I need to work in simulink because I want to do a PID and PWM to control a servo.
what is the best way to get the sensor data in simulink?
I thought to take the data from the workspace to simulink with the block 'from workspace', but I realized that I can not connect to the arduino board from the workspace of matlab and simulink at the same time.
I am using R2017a
Thank you in advance!
  댓글 수: 3
Jan
Jan 2019년 3월 27일
편집: Jan 2019년 3월 27일
@Kieran Daw: Please remember that UPPERCASE means shouting in the forum. Calm down and ask a specific question. What is a "successful read"? What have you tried so far and what is your problem?
Ansari86
Ansari86 2022년 5월 19일
Hi!
How did you add the library (https://github.com/sandorcourane/matlab-vl53l0x) succesfully, for me it shows that the library is not added via addpath command.
Thanks in advance,
Yasmin

댓글을 달려면 로그인하십시오.

채택된 답변

Madhu Govindarajan
Madhu Govindarajan 2019년 3월 4일
편집: madhan ravi 2019년 3월 5일
I would recommend creating your own block using the techniques described in this video - https://www.youtube.com/watch?v=qoj8Pa2wi0A
  댓글 수: 1
Madhu Govindarajan
Madhu Govindarajan 2019년 3월 5일
If you end up creating your own block, I would like to request you to contribute the files to MATLAB File Exchange so that others can benefit from your work.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by