Difference between revisions of "Lickometer"

From MagnetoWiki
Jump to navigation Jump to search
(add links to adafruit tutorial and software)
(Fix table to use tabs.)
 
(2 intermediate revisions by one other user not shown)
Line 9: Line 9:
 
Total: $124.80 (not including shipping, about $30)
 
Total: $124.80 (not including shipping, about $30)
  
<tab class="wikitable" border = "1" cellspacing="3" cellpadding = "3" head = top>
+
<tab sep=tab class="wikitable" border = "1" cellspacing="3" cellpadding = "3" head = top>
 
Item PID Price Quantity Total
 
Item PID Price Quantity Total
 
[https://www.adafruit.com/product/3058 Raspberry Pi 3 Model B Starter Pack - Includes a Raspberry Pi 3] 3058 $84.95 1 $84.95
 
[https://www.adafruit.com/product/3058 Raspberry Pi 3 Model B Starter Pack - Includes a Raspberry Pi 3] 3058 $84.95 1 $84.95
Line 18: Line 18:
 
[https://www.adafruit.com/product/2336 Brass M2.5 Standoffs for Pi HATs - Black Plated - Pack of 2] 2336 $0.75 2 $1.50
 
[https://www.adafruit.com/product/2336 Brass M2.5 Standoffs for Pi HATs - Black Plated - Pack of 2] 2336 $0.75 2 $1.50
 
</tab>
 
</tab>
 
 
  
 
==Software==
 
==Software==
Line 27: Line 25:
 
[https://github.com/adafruit/Adafruit_Python_MPR121 Adafruit Python library]
 
[https://github.com/adafruit/Adafruit_Python_MPR121 Adafruit Python library]
  
===Patch for I2===
+
===Enable I2C===
 +
 
 +
Be sure to enable i2c!
 +
 
 +
raspberry menu -> Preferences -> Raspberry Pi Configuration -> Interfaces => enable I2C
 +
 
 +
see [https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c Configuring I2C]
 +
 
 +
===Patch for I2C===
  
 
"the latest Raspbian Jessie and Stretch releases have an updated I2C driver that isn't compatible with how this library enables repeated I2C start bits.   
 
"the latest Raspbian Jessie and Stretch releases have an updated I2C driver that isn't compatible with how this library enables repeated I2C start bits.   
Line 38: Line 44:
 
  sudo apt-get update
 
  sudo apt-get update
 
  sudo apt-get install build-essential python-dev python-smbus python-pip git
 
  sudo apt-get install build-essential python-dev python-smbus python-pip git
 +
 +
===Install Python MPR121 Library===
 +
 +
cd ~
 +
git clone https://github.com/adafruit/Adafruit_Python_MPR121.git
 +
 +
===Run Test Software===
 +
 +
cd Adafruit_Python_MPR121
 +
sudo python setup.py install
 +
cd examples
 +
sudo python simpletest.py

Latest revision as of 15:39, 4 July 2022

Raspberry PI Lickometer

Touch Sensor

Datasheet for MPR121: https://cdn-shop.adafruit.com/datasheets/MPR121.pdf

Materials

Total: $124.80 (not including shipping, about $30)

Software

Adafruit Tutorial

Adafruit Python library

Enable I2C

Be sure to enable i2c!

raspberry menu -> Preferences -> Raspberry Pi Configuration -> Interfaces => enable I2C

see Configuring I2C

Patch for I2C

"the latest Raspbian Jessie and Stretch releases have an updated I2C driver that isn't compatible with how this library enables repeated I2C start bits. From the thread about this issue there's a workaround to enable the older I2C driver. Edit the /boot/config.txt on your SD card and add:

dtoverlay=i2c-bcm2708

Dependencies

sudo apt-get update
sudo apt-get install build-essential python-dev python-smbus python-pip git

Install Python MPR121 Library

cd ~
git clone https://github.com/adafruit/Adafruit_Python_MPR121.git

Run Test Software

cd Adafruit_Python_MPR121
sudo python setup.py install
cd examples
sudo python simpletest.py