how to use picontrol?
-
- Posts: 30
- Joined: 03 Sep 2018, 10:01
Hi sir,we don't know how to use piControl,We don't know how to use the functions in the code,Do you have any instructions about the header files and functions of piControl?
A good starting point is the piTest source code which you can find in the home directory of the Pi user on every RevPi. The source code is also available on the revPi repository on Github.
Nicolai
Nicolai
-
- Posts: 30
- Joined: 03 Sep 2018, 10:01
Thank you,NicolaiB,but we have the piTest code,but we don't know how to use the function of piControl,we want to know how to use this code.do you know ?
The piTest program makes use of the piControl device and is therefore a good reference. Do you have a specific example where you got stuck with ?
-
- Posts: 30
- Joined: 03 Sep 2018, 10:01
The current requirement is that I read the value of a single DI channel of the DIO module to trigger the action of DO, or read the value of a single channel of AIO, and there is a write to the AO channel
We use piTest -r variable name, What type is the return value of a single variable and how to use this return value to drive piTest -w variable name Value
It is that
if (piTest -r variable name)
piTest -w variable name value
endif
How to write it?
We use piTest -r variable name, What type is the return value of a single variable and how to use this return value to drive piTest -w variable name Value
It is that
if (piTest -r variable name)
piTest -w variable name value
endif
How to write it?
Hi huanghuapan, well I would prefer to use Python and the RevPiModIO library here. Hi have a look at this snippet here:
viewtopic.php?f=6&t=1626&p=6250&hilit=mirror#p6250
viewtopic.php?f=6&t=1626&p=6250&hilit=mirror#p6250
-
- Posts: 30
- Joined: 03 Sep 2018, 10:01
Hi,Dirk
Now we use the AIO module,When I read the value of a single channel of AIO, and how to write to the AO channel,how to use RevPiModIO?
Now we use the AIO module,When I read the value of a single channel of AIO, and how to write to the AO channel,how to use RevPiModIO?
Hi, here are some example scripts:
-
- Posts: 30
- Joined: 03 Sep 2018, 10:01
Thank you,Dirk,These example scripts can use in AIO modules?
-
- Posts: 30
- Joined: 03 Sep 2018, 10:01
In other words, we know that the program BitMirror.py can implement Mirror DIO channel 1 input to DIO channel 1 output, now we want to implement mirror AIO channel 1 input to AIO channel 1 output, how to write this code?