Download
latest Releases : 2.0.0-RELESE
2.0.0-RELESE | Download page |
Number of Projects
RT-Component | 153.5 |
RT-Middleware | 35 |
Tools | 22 |
Documentation | 2 |
Choreonoid
Motion editor/Dynamics simulator
OpenHRP3
Dynamics simulator
OpenRTP
Integrated Development Platform
AIST RTC collection
RT-Components collection by AIST
TORK
Tokyo Opensource Robotics Association
DAQ-Middleware
Middleware for DAQ (Data Aquisition) by KEK
In the following example, using GPIO, you can create a component (DigitalIn-RTC, DigitalOut-RTC) that detects the ON/OFF of the switch and light up the LED and understand the use of GPIO which is the feature of Raspberry Pi I will deepen. The source code of the sample component can be downloaded from the following.
(G)GIOP of Raspberry Pi
Raspberry Pi has a GPIO terminal, which allows you to use various external devices.
The pin assignment of the GPIO that is attached to the Raspberry Pi main unit is shown below.
When using GPIO, pay attention to the position of each pin, especially if using 5V terminal, mistake in wiring may damage the Raspberry Pi main unit and SD card, so be careful enough please.
(G)Breadboard wiring example
Create a circuit that lights the LED and a circuit that detects ON/OFF of the switch. If you have a breadboard etc, you can easily build a circuit, but since there are few parts even if it is not, you can easily form a circuit by soldering lead wires etc. Below is a list of necessary parts.
If there is only one Raspberry Pi, connect the following LED and switch circuit to the same Raspberry Pi. If there are two Raspberry Pi, it may be interesting to install LEDs and switches on each Raspberry Pi.
(G)Wiring example for DigitalIn-RTC
DigitalIn-RTC is a component that outputs the bool value (true/false) input to the data port to the specified GPIO port. In order to observe the output value of the GPIO port, connect the LED and resistor to the Ground pin and GPIO 18 pin and create a circuit as shown below.
This is the case when creating this circuit with breadboard.
(G)Wiring example for DigitalOut-RTC
DigitalOut-RTC is a component that outputs the bool value (true/false) input to the GPIO port from the data port. In order to input the value to GPIO, connect a resistor and a switch to Ground, 3.3V Power, GPIO 17 and create a circuit as shown below.
This is the case when creating this circuit with breadboard.
(G)Compiling components
Download the source code to Raspberry Pi from below and compile the DigitalIn-RTC/DigitalOut-RTC component.
(G)Compiling DigitalIn-RTC
Now rewrite CMakeLists.txt and set it to suppress document generation.
If OpenRTM-aist is correctly installed, configure will terminate without problems. If an error occurs due to lack of OpenRTM or coil, please confirm that OpenRTM-aist (C++ version) is correctly installed (dpkg -l |grep openrtm etc.).
The compiled component DigitalInComp is under src.
(G)Compiling DigitalOut-RTC
Compile like DigitalIn-RTC.
Now rewrite CMakeLists.txt and set it to suppress document generation.
The compiled component DigitalOutComp is under src.
(G)Running components
Once each RTC has been successfully compiled, start up each RTC after launching NameServer.
&color(red){Since the sample component uses GPIO, it must be executed with root authority.} &color(red){※サンプルコンポーネントは GPIO を利用するので root 権限で実行する必要があります。}
Launch RTSystemEditor on PC and connect to NameServewr on Raspberry Pi. After placing each RTC, connecting between the ports, activate.
When each RTC starts normally, the LED turns on/off according to the status of the takt switch.