Skip to content

Instantly share code, notes, and snippets.

View ektor5's full-sized avatar

Ettore Chimenti ektor5

View GitHub Profile
#!/bin/sh
set -e
# quick example script to get acc/mag values from Pololu cmp01b
# enable accelerometer
i2cset -f -y 3 0x19 0x20 23
# enable magnetometer
i2cset -f -y 3 0x1e 0x02 0
alias print_iec="numfmt --to=iec"
total() {
xargs du -b | cut -f 1 |
( while read dim; do let S+=$dim ; done ; echo $S )
}
declare -A D
#!/bin/bash
threads=8
dtb=( imx6{q,dl}-udoo{-{15,7}lvds,}.dtb )
export KCFLAGS="-O2 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -pipe -fomit-frame-pointer"
export ARCH=arm
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
export KBUILD_DEBARCH=armhf
export KBUILD_IMAGE=zImage
#!/bin/bash
# Little script that make a RGB led glow
# on UDOO with ReadASCIIString example
#
# Ek5 @ 2016
DEV=${3:-ttyMCC}
STEP=${2:-15} # could be 1,3,5,15,17,51,255
OS1=0 # offset 1
/*
Reading a serial ASCII-encoded string.
This sketch demonstrates the Serial parseInt() function.
It looks for an ASCII string of comma-separated values.
It parses them into ints, and uses those to fade an RGB LED.
created 13 Apr 2012
by Tom Igoe
@ektor5
ektor5 / stepper_udoo.sh
Last active January 20, 2016 15:21
Little script that make a RGB led glow on UDOO with ReadASCIIString example
#!/bin/bash
# Little script that make a RGB led glow
# on UDOO with ReadASCIIString example
#
# Ek5 @ 2016
DEV=ttymxc3
STEP=17 # could be 1,3,5,15,17,51,255
OS1=51 # offset 1