Page 1 of 1

DIO as output

Posted: Fri Aug 13, 2021 10:36 am
by aidilazma
hi everyone
I'm a bit new with Matlab. I wanted to make a DIO as an output using matlab. But it's not working as it should be. The LEDs are on even before i ran it. And when i do, they're off. I'm stumped.
Could anyone help me with this? This is my code

fprintf(tcpipObj,'DIG:PIN:DIR OUT, DIO6_N,1');
pause (5);
fprintf(tcpipObj,'DIG:PIN:DIR OUT, DIO6_N,0');

thankyou
from : aidilazma

Re: DIO as output

Posted: Mon Sep 06, 2021 2:17 pm
by redpitaya
First,you will need to set the pin direction and define it as output, then you can control it with a separate command:
https://redpitaya.readthedocs.io/en/lat ... mands.html