Examples of bits and pieces running at Jessie level

These shell-scripts are located on my EV3-brick at /usr/local/bin but with some simple edits you can place them where you want them.

  1. Supporting script(s) used by other scripts
    • asciicolor Creates some variables to ease using ANSI colors in shell script. E.G. red blue etc.
    • bert_ev3dev_functions Replaces asciicolor and adds some common functions.
  2. Scripts related to managing the EV3-brick
    • checkpower Add this script to a crontab to check for the battery voltage. On lower power the EV3-led on the left will blink green on lower voltage, then amber and eventually red (with one beep). Uses blinkvoltage
    • showactivity Makes the right green led blink on I/O activity.
    • stopmotors Well, stops all motors.
  3. Scripts discovering sensors and / or motors
    • blinkleds Simply blink the EV3 leds a few times.
    • setled Script to set an EV3-led red / green / amber ON or OFF and set a trigger for it. Do not confuse with the setleds program to set keyboard leds.
    • showleds Provides a very small display of the status of the EV3-leds.
    • showmotor Finds the tacho-motor number for attached motors. Displays many fields related to the motor(s). Tested with EV3 (large and mini) and NXT motor.
    • showpower Shows various fields related to the EV3-power.
    • showsensors Show data about connected sensors. Only regular sensors that are recognized are reported, I assume I2C sensors are not yet supported by the script.
    • showsound Shows a little info from the snd-legoev3 driver. (Not to be confused with the sound-sensor!)
    • testmotor Test one motor. Too simple script, only uses a fixed suffix on /sys/class/tacho-motor/tacho-motor The kernel takes the next number if a motor is plugged in. Algorithm in showmotor is connecting motor port to tacho-motor suffix. You can call testmotor with one parameter: the number of the motor. E.g. testmotor 3

Have your EV3 report the IP-addresses by speach after boot

Starting at ev3dev image ev3dev-jessie-2014-10-07

For this an update is needed to /etc/rc.local

Add the next lines near the bottom of /etc/rc.local But before the exit 0

if [ -e /media/mmc_p1/tellIP ]; then
echo "Executing /media/mmc_p1/tellIP"
. /media/mmc_p1/tellIP
fi

and place the script tellIP in the directory: /media/mmc_p1/

OLDER ev3dev images (ev3dev-jessie-2014-10-07-12 and before)

For this an update is needed to /media/mmc_p1/ev3dev.rc.local

Add the next lines to the bottom of /media/mmc_p1/ev3dev.rc.local

if [ -e /media/mmc_p1/tellIP ]; then
echo "Executing /media/mmc_p1/tellIP"
. /media/mmc_p1/tellIP
fi

and place the script tellIP in the same directory: /media/mmc_p1/

Project Info