Gergely Imreh
Published © MIT

Standalone IRC channel monitoring

See what's the chatter on an IRC channel even when you are not logged on yourself

BeginnerFull instructions provided1,355
Standalone IRC channel monitoring

Things used in this project

Hardware components

Intel Edison
Intel Edison
×1
Grove starter kit plus for Intel Edison
Seeed Grove starter kit plus for Intel Edison
×1
Grove LCD RGB Backlight
×1
Grove Red LED
Optional
×1
Grove Buzzer
Optional
×1

Software apps and online services

balenaCloud
balenaCloud

Story

Read more

Schematics

Connection diagram

How to connect the different hardware parts required by this project

Code

gpio_setup.sh

SH
Shell script to set up Edison's I2C connectivity
#!/bin/bash

# Mount needed for GPIO pins to be enabled correctly
if mount -l -t debugfs | grep "on /sys/kernel/debug"; then
    echo "debugfs already mounted"
else
    mount -t debugfs nodev /sys/kernel/debug
fi


# From http://www.emutexlabs.com/project/215-intel-edison-gpio-pin-multiplexing-guide
# Example 4: Configure IO18/IO19 for I2C connectivity

echo "Setting up GPIO"

# IO18 Pin Multiplexing
IO18=(14 27 204 236 212)
for i in ${IO18[@]}; do
    if [ ! -e /sys/class/gpio/gpio${i} ]; then
	echo ${i} > /sys/class/gpio/export
    fi
done

# IO19 Pin Multiplexing
IO19=(165 28 205 237 213)
for i in ${IO19[@]}; do
    if [ ! -e /sys/class/gpio/gpio${i} ]; then
	echo ${i} > /sys/class/gpio/export
    fi
done

# TRI_STATE_ALL low before all changes
if [ ! -e /sys/class/gpio/gpio214 ]; then
    echo 214 > /sys/class/gpio/export
fi
echo low > /sys/class/gpio/gpio214/direction 

## Set up parameters
# I2C
echo low > /sys/class/gpio/gpio204/direction 
echo low > /sys/class/gpio/gpio205/direction
# Set as input
echo in > /sys/class/gpio/gpio14/direction 
echo in > /sys/class/gpio/gpio165/direction 
# Disable output
echo low > /sys/class/gpio/gpio236/direction 
echo low > /sys/class/gpio/gpio237/direction 
# Enable pull-up
echo in > /sys/class/gpio/gpio212/direction 
echo in > /sys/class/gpio/gpio213/direction
# I2C-6
echo mode1 > /sys/kernel/debug/gpio_debug/gpio28/current_pinmux 
echo mode1 > /sys/kernel/debug/gpio_debug/gpio27/current_pinmux 

# Re-enabled TRI_STATE_ALL
echo high > /sys/class/gpio/gpio214/direction

# Let it rest
sleep 1

Resin.io project

Credits

Gergely Imreh

Gergely Imreh

8 projects • 18 followers
Physicist, hacker, commander of a Zerg hive.

Comments

Add projectSign up / Login