Skip to main content

Posts

Showing posts from September, 2020

How to use ADXL345 accelerometer with raspberry pi

 Hey,  Today's blog we are going to use ADXL345   Accelerometer with raspberry pi. WHAT YOU NEED : Raspberry pi 3 SD card (8gb+ recommend) Power supply ADXL345 accelerometer  Breadboard CIRCUIT :  PREPARING RASPBERRY PI : 1.  Before we can get our Raspberry Pi to retrieve data from our ADXL345 Accelerometer, there are a few changes we must make to the Pi’s configuration. Let’s first ensure that everything is up to date by running the following two commands. sudo apt-get update sudo apt-get upgrade 2.  Once the Raspberry Pi has finished updating, we will need to go ahead and launch the Raspberry configuration tool so that we can  enable I2C  on the Raspberry Pi. Run the following command to launch the  raspi configuration tool . sudo raspi-config 3.  On this screen, you need to head to the “ 5 Interfacing Options ” menu. You can navigate the  raspi-config  tools menus by using the  arrow keys . Use the  ENTER  key to select particular options. 4.  Now within the interfacing options

How to use BH1750 Ambient light sensor with Arduino

  Hey, In today's blog we are going to use BH1750 ambient light sensor with Arduino. WHAT YOU NEED : Arduino Uno 16×2 LCD display 10k potentiometer BH1705 Light sensor Breadboard Jumper wires CODE : #include<Wire.h> #include<LiquidCrystal.h>   int BH1750address = 0x23; byte buff[2]; LiquidCrystal lcd (7,6,5,4,3,2); //RS, E, D4, D5, D6, D7 void setup() {   Wire.begin();   //Serial.begin(9600);   lcd.begin(16,2);   lcd.print("  BH1750 Light  ");   lcd.setCursor(0,1);   lcd.print("Intensity Sensor");   delay(2000); }   void loop() {   int i;   uint16_t value=0;   BH1750_Init(BH1750address);   delay(200);     if(2==BH1750_Read(BH1750address))   {     value=((buff[0]<<8)|buff[1])/1.2;     lcd.clear();     lcd.print("Intensity in LUX");     lcd.setCursor(6,1);     lcd.print(value);          //Serial.print(val);          //Serial.println("[lux]");    }   delay(150); }   int BH1750_Read(int address)  {   int i=0;   Wire.beginTransmi

DIY fingerprint based car ignition system

  Hey, In today's blog we are going to make a fingerprint based car ignition system. WHAT YOU NEED : Arduino nano R305 fingerprint sensor EM18 RFID reader 16×2 LCD display DC motor L293D motor driver Breadboard Connecting wire 12v battery CODE : #include <Adafruit_Fingerprint.h> #include <LiquidCrystal.h> char input[12]; int count = 0; int a = 0; const int rs = 6, en = 7, d4 = 2, d5 = 3, d6 = 4, d7 = 5; LiquidCrystal lcd(rs, en, d4, d5, d6, d7); SoftwareSerial mySerial(12,11); Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial); void setup() {    pinMode(9,OUTPUT);    pinMode(10,OUTPUT);    digitalWrite(9,LOW);    digitalWrite(10,LOW);    Serial.begin(9600);    lcd.begin(16, 2);    lcd.setCursor(0, 0);    lcd.print( "   WELCOME TO       " );    lcd.setCursor(0, 1);    lcd.print( "  CIRCUIT DIGEST       " );    delay(2000);    lcd.clear();    lcd.setCursor(0, 0);    lcd.print( "Please swipe           " );    lcd.setCursor