Intro: LinkitONE Pressure Sensor
Want to make a pressure sensor? Wana make your new science project or just have some fun? Got a LinkitONE board? Then you are at the right place!
Here i'll show you step by step how to interface a pressure sensor with your LinkitONE.
Step 1: What Do You Need?
1) LinkitONE Board
2) Piezo sensor (you can take it out from a speaker)
3) micro-USB cable (for programming)
4) battery pack
Step 2: Assembling the Parts
Now assemble all the parts together.
First of all, connect the jumper wires to the pizeo module. Connect 2 wires to both pins of the sensor.
Now connect the sensor to the A0 pin of the board.
PIN 1 - VCC
PIN2 - A0
Step 3: Writing Some Code
The code is really simple here! There's nothing much!
We're just taking a analog reading from sensor pressure per centimeter square. We are first analyzing reading for 30 seconds and then giving back the readings.
int Sensor_Pin = A0;
int SensorReading = analogRead(Sensor_Pin);
Okay, so now burn this code to your board.
Step 4: Testing It Out!
Now test your device!
Just burn the code on your board from the previous step and then start! Open the serial monitor on the modem port of your Linkit. Carefully observe your readings. They update every 1/4 seconds. You can even plot a graph using opensource tools available online such as plotty or ubidots.
Step 5: Final Touches
Now build your own pressure testing box!
You made your own pressure sensor, but you can make a small box that you can carry anywhere you want and that can measure weight as well!