Koa-PicoITX User Manual rev 1.0
13
-
The GPIO 2 and 3 can be used in input or output. The GPIO 4 and 5 are only
outputs.
-
With the command help you have the help.
-
You configure the direction of the port with the command configio :
configio IO_PORT_NUMBER DIRECTION
where
IO_PORT_NUMBER: port number 2..5
DIRECTION : 0 = input, 1 = output
-
Set the IO to 1 with: setio IO_PORT_NUMBER
-
Set the IO to 0 with: cleario IO_PORT_NUMBER
-
Read the IO with: readio IO_PORT_NUMBER
-
Exit the program with quit
See chapter 4 PROGRAMMING" for software development.
3.6 Motors usage
You can use the motors connectors (M0, M1, chapter 2.2: "Koa-PicoITX Overview") to
connect one or two motors (up to 4). See the KoreMotorLE user manual for more details
about the connections and motors:
http://ftp.k-team.com/korebot/documentation/KoreMotorLE.UserManual.pdf
In the directory ~/software/libkorebot_VERSION/src/tests , the kmotLE_test program
is already compiled. Run it with the command:
./kmotLE_test MOTOR_NAME
where MOTOR_NAME = KoreMotorLE:PriMotor1 : motor M0
KoreMotorLE:PriMotor2 : motor M1
=> You will have a prompt >
With the command help you have the help.
The command init set the default parameters. It is necessary to run in before any other
commands because it sets and resets different default settings.
You will have to set the controller (PID) with the command setpid:
-
Set it with the command: setpid REGULATION_TYPE P I D
where REGULATION_TYPE = pos position control