loading

This instructable is part of a series of instructables with the Particle Core or Photon, my previous instructables shows you how to get stated with the core, some really cool projects, internet button and lots more. So make sure, you check you that first before trying out this.

In this instructable I'm going to show you how to control a Pressure sensor using the particle core (it's the same for the photon). I am using a restive pressure sensor which can be found in the particle maker kit.

So let's get started.....

Step 1: Tools and Components

This is a really simple tutorial and all you need to get started is -

  • Particle Core or Photon
  • 330 ohm resistor
  • Pressure sensor
  • Breadboard

No soldering skills are required as we will be using a breadboard.

Step 2: Getting Started

If you have followed my previous instructables you already have set up your core and have it connected to the internet.

If you are here first, then you can check the step two of any of the previous instructables in the series for steps on how to get started.

The steps involve -

  • Creating an account at Particle.io
  • Getting it connected to the internet.
  • Claiming a Core
  • Trying out Tinker
  • Trying out my previous instructables

If you have gone through all of these steps, then you are good to proceed to the next step.

Step 3: Circuit

The circuit is really simple and has only a few components, also like I told earlier we will be using a breadboard so no soldering skills are required.

All you need is follow the picture above and proceed to uploading the code.

Step 4: Code

The code is really very simple, login into your particle account and upload the code to your core. The core will flash a pink color indicting that the code is being written and after that is done the core will connect back to the internet.

After uploading the code, put some pressure over the pressure sensor and notice that the LED at digital pin 7 should glow. If you encountered any error feel free to leave a comment below or PM me.

<p>const int buttonPin = 0;<br>const int ledPin =  7;  
int buttonState = 0;
void setup() {
  pinMode(ledPin, OUTPUT);      
  pinMode(buttonPin, INPUT);     
}
void loop(){
  buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH) {     
    digitalWrite(ledPin, HIGH);  
  } 
  else {
    digitalWrite(ledPin, LOW); 
  }
}</p>

About This Instructable

1,759views

23favorites

License:

Bio: Hey I'm a College school student, I love to work on projects and Arduino powers most of them. Follow me @ https://www.facebook.com ...
More by ThisIsSteve:Linkit One Text to Speech Linkit One Kitchen Timer Intel Edison Talks to Linkit One 
Add instructable to: