Basically what I am looking to do is have the spark core somehow detect that a person is exiting or entering a doorway. In the above video, they do this using the “Touch Board” and a few very simple circuits painted with electronic ink.
I would guess that they are sensing micro-volt currents induced into the painted circuit through the electromagnetic field of a person walking past the circuit.
I have no idea if my assumption is accurate, and even if it is, I have no idea how to implement it with a Spark Core. I would use the “Touch Board” product except that it does not have the WiFi capability of the Spark Core which is paramount to my potential project.
I would greatly appreciate any help anyone can provide me with.
It looks like they use the MPR121 Capacitive Touch Sensor. I would suggest purchasing a breakout board (Sparkfun for example has one https://www.sparkfun.com/products/9695) and going from there!
What a cool product by the way! Let us know when you get something similar working with the core!
That MPR121 breakout works nicely. With a 5x5cm piece of aluminum foil I was able to detect my hand through ~5cm of wood. Depending on how big you make your sensor, I guess you could detect a person. Also, you can connect those twelve sensors to create one ‘big’ sensor, which should be more suited for this project I think.
It sounds like you have some experience with this MPR121 breakout board. Do you have any code you can share for implementation of this board with a Spark Core? And could you elaborate a bit more on how you would “connect those twelve sensors to create one ‘big’ sensor”?
I haven’t really done anything other than trying it through my table to test if the range would suffice. I just followed this tutorial with the code, which worked out fine. This might be helpful as well for the ‘big’ sensor. I personally haven’t tried that yet, but it’s supposed to work.
My grand master plan is to eventually mount 12 pieces of aluminum foil behind my wall paper, allowing me to create invisible buttons all over my room
Matt from Bare Conductive here. We do use the MPR121, it’s a pretty amazing piece of kit. SparkFun’s breakout boards are great. Check out our library as we’ve worked hard to make some of the MPR121’s more advanced features easily accessible (like setting individual electrode thresholds). Find the library here.
Also, not sure if it’s useful, but we’ve got a processing sketch and a bit of code (designed to run on the Touch Board) that gives you the data straight from each electrode in real time. It’s useful for understand the behavior of a sensor. Find that here.
I downloaded the software for the MPR121 and tried to compile it. I am getting wire.h no such file or directory. I created the wire.h file from arduino but it’s still now working. Can you help me with this? Sorry for the noob question but I am new to all this
Thanks
I could be mistaken, but I believe the Wire.h library is already included, and therefor doesn’t need to be mentioned anymore. (Could you confim this @harrisonhjones?)
under the Firmware folder there are 2 folder
Arduino Sketch
C code
under Arduino Sketch there are 2 files
mpr121.h
mpr121.ino
Under the C code there are 7 files
defs.h
i2c.h
main.c
main.hex
Makefile
mpr121.h
types.h
I opened the Arduino Sketch folder under Spark Dev and compiled getting the wire.h no such file or directory. I am missing something or not compiling it correctly?
I just used the SparkDev to compile a empty project (except for main and setup):
#include "wire.h"
/* This function is called once at start up ----------------------------------*/
void setup()
{
}
/* This function loops forever --------------------------------------------*/
void loop()
{
//This will run in a loop
}
And it compiled so it looks like wire.h is available. Would you mind posting your entire code in perhaps a zip @mrabie?
@harrisonhjones I tried your code and still got the same error.
I created a new file called it test.ino
copied and pasted your code
compiled
got the same error
@peekay123 It worked great thanks. But it would be interesting to know why is it working for @harrisonhjones and not for me. Maybe a bug or different library versions