Skip to main content

Posts

Showing posts from April, 2020

Barometric pressure sensor with Arduino

Hardware Required - Arduino or Genuino board - SCP1000 Pressure Sensor Breakout Board - hook-up wires  Procedure  Follow the circuit diagram and make the connections as shown in the image given below. Arduino Code /******* All the resources for this project:   https://lihuo.blogspot.com *******/ The code below starts out by setting the SCP1000 's configuration registers in the setup() . In the main loop, it sets the sensor to read in high resolution mode, meaning that it will return a 19-bit value, for the pressure reading, and 16 bits for the temperature. The actual reading in degrees Celsius is the 16-bit result divided by 20.   Then it reads the temperature's two bytes. Once it's got the temperature, it reads the pressure in two parts. First it reads the highest three bits, then the lower 16 bits. It combines these two into one single long integer by bit shifting the high bits then using a bitwise OR to combine them...

Microphone Sensor with arduino

Microphone sound detection module For sound detection Module has two outputs: AO, analog output, real-time output voltage signal of the microphone DO, when the sound intensity reaches a certain threshold, the output high and low signal The threshold-sensitivity can be adjusted via potentiometer on the sensor Connecting to the Arduino Pin + to Arduino 5+ Pin - to Arduino - Pin A0 to Arduino A0 (for analog program) Pin D0 to Arduino 13 (for digital program) Procedure of Digital Pin Follow the circuit diagram and make the connections as shown in the image given below. Arduino Code for Digital Pin /******* All the resources for this project:   https://lihuo.blogspot.com *******/ int Led = 13 ; // define LED Interface int buttonpin = 2 ; // define D0 Sensor Interface int val = 0 ; // define numeric variables val   void setup ( ) {   pinMode ( Led , OUTPUT ) ; // define LED as output interface   pinMo...