What can I do with IGEPv2
From IGEP - ISEE Wiki
|
|
Contents
Overview
This is the 2/3 chapter of IGEPv2 Tutorial Guide.
We will learn some basic tasks such to send a file between IGEPv2 and your PC , handle the IGEPv2 Leds, update the pre-installed software to the latest release, etc.
What can I do
Handle the gpio-LED's
Basic
Log into IGEPv2 (for example via SSH, as shown in the previous chapter), and run the following commands to turn LED's on:
echo 1 > /sys/devices/platform/leds-gpio/leds/d240\:green/brightness echo 1 > /sys/devices/platform/leds-gpio/leds/d240\:red/brightness echo 1 > /sys/devices/platform/leds-gpio/leds/d440\:green/brightness echo 1 > /sys/devices/platform/leds-gpio/leds/d440\:red/brightness
You can turn them down using the same command and write '0' instead of '1'.
Know more
IGEPv2 LED's are controlled with it's platform device at /sys/devices/platform/leds-gpio/leds/
If you want to trigger the leds you can enable this mode and select the trigger source (none by default) to: mmc0, mmc1, timer, heartbeat and default-on.
To enable any of this modes you just have to change a parameter in the directory of the led you want to control. You can see all the possibilities using the instruction 'cat':
$ cat /sys/devices/platform/leds-gpio/leds/d240\:green/trigger [none] mmc0 mmc1 timer heartbeat default-on
In the example above, we have checked the status of the trigger in led D240:green. Mode 'none' is selected.
To change it, for example, to the timer mode you can use 'echo':
echo timer > /sys/devices/platform/leds-gpio/leds/d240\:green/trigger
In this case, we have set the trigger to the 'timer' mode. Now you can set the time for what the led is ON and the time it is OFF using:
echo 250 > /sys/devices/platform/leds-gpio/leds/d240\:green/delay_on echo 750 > /sys/devices/platform/leds-gpio/leds/d240\:green/delay_off
Now the selected led is configured with a timer consisting of 250 miliseconds ON and 750 miliseconds OFF.
Mount a MicroSD card
Basic
Log into IGEPv2 and run any of the following commands:
- Access to Generic FAT32 microSD:
mount -t vfat /dev/mmcblk0 /mnt/tmp/
- Access to Generic USB Flash disk:
mount -t vfat /dev/sda1 /mnt/tmp/
- Safety Remove microSD:
umount /mnt/tmp
- Access to IGEP demo microSD:
mount -t jffs2 /dev/mmcblk0 /mnt/tmp/
How to use RS-485
Follow the link to the extensive article: How to use RS-485 on IGEPv2 board
Get sound in (audio in)
Basic
External Audio input devices, such as a powered microphone or the audio output of a PC or MP3 player, can be connected to the via a 3.5mm jack (Audio IN).
You can record audio in with the application Arecord, for example:
arecord -t wav -c 2 -r 44100 -f S16_LE -v audio-in.wav
Following output is expected on console:
Recording WAVE 'audio-in.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Plug PCM: Hardware PCM card 0 'TWL4030' device 0 subdevice 0 Its setup is: stream : CAPTURE access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 32768 period_size : 2048 period_time : 46439 tick_time : 7812 tstamp_mode : NONE period_step : 1 sleep_min : 0 avail_min : 2048 xfer_align : 2048 start_threshold : 1 stop_threshold : 32768 silence_threshold: 0 silence_size : 0 boundary : 1073741824
When ever you think you want to stop recording just press CTRL+C
Get sound out (audio out)
Basic
Connect an external output audio device to the 3.5mm jack Audio Out connector in IGEPv2, such as external stereo powered speakers.
The amplifiers for the headset output are disabled by default, so the first thing you'll do is enable these amplifiers with:
amixer set -D hw:0 'Headset' 0dB amixer set -D hw:0 'HeadsetL Mixer AudioL2' on amixer set -D hw:0 'HeadsetR Mixer AudioR2' on
Then you can easily play a *.wav sound with the application Aplay, for example:
aplay audio-in.wav
Connect to the Serial Debug interface
Basic
In the preinstalled software, the serial port is configured as a Debug interface.
Therefore, if you connect an external device to the serial port you will be able to see the Linux Kernel traces, as the system boots.
Follow these steps:
- Connect an AT/Everex Cable to the 10-pin serial header on IGEPv2 and a null modem DB9 male-male serial cable between the board and your host machine.
- Refer to the article: How to setup the IDC10 cable to setup the IDC10 cable.
- You can also use a Serial port in your host machine you might need a USB to Serial converter to communicate via this port.
- Run a serial console, or any program that can interact with the serial port in your host machine, such Minicom, PuTTy (Linux, Windows), Terminal (Windows), etc.
- Refer to this extended article about Using serial debug port to communicate to setup the right configuration of your serial console.
Now, as you are connected to the serial debug port, you will see the system traces as the board is starting up.
Finally you will see the boot prompt asking for login.
You have successfully completed this chapter of the guide.
|
![]() |
If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat | ![]() |
|
|