Connect to a ADXL335

10 ビュー (過去 30 日間)
Thomas Merry
Thomas Merry 2020 年 7 月 17 日
編集済み: Gayatri Menon 2022 年 3 月 13 日
I am looking to connect a ADXL335 via the Arduino Uno microcontroller to MATLAB. I have downloaded the matlab support package (add-on). Within the support package list of functions is readAcceleration, also within the functions is a list of 3 accelerometer (mpu9250, lsm9ds1, mpu6050).
Having already purchased an ADXL335 i am hoping to use the readAcceleration function with my ADXL335. I have successfully connected the Aruino to MATLAB i now want to read the acceleration of the accelerometer. What MATLAB does not tell me is how to set up the ADXL335 so recive the acceleration readings.
If anyone can aswer whether the AXDL335 can be used with readAccleration?
If so how should the Arduino board be wired and what would the code look like?
thank you
Tom
  1 件のコメント
Luan Angelino
Luan Angelino 2020 年 10 月 3 日
I am have the same problem. Do you find a way to read the data from ADXL335?

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

回答 (1 件)

Gayatri Menon
Gayatri Menon 2022 年 3 月 13 日
編集済み: Gayatri Menon 2022 年 3 月 13 日
Hi
Assuming one of the analog output pin on the sensor is connected to A4 on Arduino . Now voltage read needs to be converted to acceleration as mention in datasheet.
a = arduino;
readVoltage(a,'A4')
I guess there should be some formula in the datasheet to make the conversion.
Hope this helps
Thanks
Gayatri

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by