Page 1 of 1

I2C Touch Sensor V1.1 doesn't work

Posted: Sun Jan 13, 2013 5:54 pm
by rlu_ricardo

My new touch sensor doesn't work. Because I'm new to arduino I don't know if it is a software or hardware problem.

I use the i2cdev and the mpr121 libraries (see attached sketch). During the init I'm testing the connection with touch.testConnection - but it always returns false.
After that I'm reading back other previous set register but I'm always getting a 0x00 although they were set to different values.

The touch board is connected on one of the two i2c connectors of a Grove-Base Shield v1.2 (I've tried both of the connectors).

For me the sketch looks correct, now I'm not sure if it's a hw problem?

Thanks for your help.


Re: I2C Touch Sensor V1.1 doesn't work

Posted: Mon Jan 14, 2013 3:11 pm
by Jacket Chen
Hey , i'm sorry that i have not seen your attachment~~~could you post it again

Re: I2C Touch Sensor V1.1 doesn't work

Posted: Tue Jan 15, 2013 3:07 am
by rlu_ricardo
Hi jacket

You are right! I can't upload the code because after hitting "Add the file" it get an error message "The extension ino is not allowed."?!

So I paste the code here... The output of the code is always "MPR00000".

// ********************** CODE BEGIN ******************************************
// Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation
// is used in I2Cdev.h
#include "Wire.h"

#include <SerialLCD.h>
#if ARDUINO < 100
#include <NewSoftSerial.h> //this is a must
#include <SoftwareSerial.h>

// Touch Sensor
#include "I2Cdev.h"
#include "MPR121.h"

// Init LCD
SerialLCD slcd(11,12);//this is a must, assign soft serial pins
// Init Touch
MPR121 touch(0x5A);

uint8_t buffer = 0;

void setup() {
// set up
// join I2C bus (I2Cdev library doesn't do this automatically)

buffer = 0;
I2Cdev::readByte(0x5A, 4, &buffer);

buffer = 0;
I2Cdev::readByte(0x5A, 5, &buffer);

buffer = 0;
I2Cdev::readByte(0x5A, 6, &buffer);

buffer = 0;
I2Cdev::readByte(0x5A, 7, &buffer);

void loop() {

// ********************** CODE BEGIN ******************************************

Thanks for your help!


Re: I2C Touch Sensor V1.1 doesn't work

Posted: Tue Jan 15, 2013 5:11 pm
by Jacket Chen
hi,are you sure this code you posted could compile right? i could not compile it ,and with many errors.