Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BertLindeman/bert-ev3dev-examples

Open more actions menu

Repository files navigation



bert-ev3dev-examples

Examples of bits and pieces running at Jessie level

Scripts are available also as zip/tgz on the releases page.

Issues can be found here.

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. They are are meant to be run on a terminal session, like in an ssl-session.

  1. Supporting scripts 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 a beep). Uses blinkvoltage
    • showactivity Makes the right green led blink on I/O activity. Uses /usr/local/bin/tryPF
    • 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 or amber to ON or OFF and set a trigger for it. Do not confuse with setleds program to set keyboard leds.
    • showleds Provides a 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 servo) 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

No longer maintained here since Add IP address to status bar

Brickman neatly shows the current IP-address on the status bar. Kept the description as documentation.

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/

About

examples of bits and pieces running on ev3dev at Jessie level

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.