How can I read the raw AD-value from my Lego Mindstorms Ev3 ? (MATLAB or Simulink)

2 views (last 30 days)
I am using Matlab R2015a and the MATLAB & Simulink library for the Lego Mindstorms Ev3.
Is it possible to read the AD-value from the input ports ? I'd like to read the digital value, because i would like to use a potentiometer for calculating the angle.
In MATLAB there's a function called:
mytouch = touchSensor(mylego,1) // Read the value of the touch sensor - pressed (1) and not pressed (0) readTouch(mytouch)
but the result is only a boolean value. Here I'd like to recieve the digital value (0-1023).
In Simulink there's a block called Colour Sensor. For the Nxt 2.0 there's an option to read the raw AD value. Unfortunately this is not supported for the Ev3...
Is there any solution to get the digital value of the input-ports ?
Thanks a lot!

Answers (0)

Categories

Find more on MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!