Skip to main content

Posts

raspberry pi 3 lcd working code

# The wiring for the LCD is as follows: # 1 : GND # 2 : 5V # 3 : Contrast (0-5V)* # 4 : RS (Register Select) # 5 : R/W (Read Write)       - GROUND THIS PIN # 6 : Enable or Strobe # 7 : Data Bit 0             - NOT USED # 8 : Data Bit 1             - NOT USED # 9 : Data Bit 2             - NOT USED # 10: Data Bit 3             - NOT USED # 11: Data Bit 4 # 12: Data Bit 5 # 13: Data Bit 6 # 14: Data Bit 7 # 15: LCD Backlight +5V** # 16: LCD Backlight GND #import import RPi.GPIO as GPIO import time # Define GPIO to LCD mapping LCD_RS = 7 LCD_E  = 8 LCD_D4 = 25 LCD_D5 = 24 LCD_D6 = 23 LCD_D7 = 18 # Define some device constants LCD_WIDTH = 16    # Maximum characters per line LCD_CHR = True LCD_CMD = False LCD_LINE_1 = 0x80 # LCD RAM address for the 1st line LCD_LINE_2 = 0xC0 # LCD RAM address for the 2nd li...

garbage monitoring using arduino code with gsm

#include <SoftwareSerial.h> #include <LiquidCrystal.h> //LiquidCrystal lcd(7, 6, 5, 4, 3, 2); LiquidCrystal lcd(13, 12, 11, 10, 9, 8); SoftwareSerial mySerial(0,1); #define trigPin 2 #define echoPin 3 #define PIR_sensor 4 #define m11 5 #define m12 6 void setup() {    lcd.begin(16, 2);    lcd.print("    Garbage    ");    Serial.println("garbage ");   lcd.setCursor(0,1);   lcd.print("   Open Close    ");   Serial.println(" open close");   delay(3000);   lcd.clear();   //lcd.print(" ");   delay(2000); mySerial.begin(9600); // Setting the baud rate of GSM Module Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT);  pinMode(m11, OUTPUT);   pinMode(m12, OUTPUT);   } void loop() {  readPIR();  pingDist();  SendMessage(); } void pingDist ()   {     long duration, distance;...

gsm gps finger print arduino code

#include <string.h> #include <ctype.h> #include <LiquidCrystal.h> LiquidCrystal lcd(13, 12, 11, 10, 9, 8); #include <SoftwareSerial.h> SoftwareSerial mySerial(7, 6); // RX, TX char fy=0; // constants won't change. They're used here to // set pin numbers: const int buttonPin = 7;     // the number of the pushbutton pin int buttonState1 = 0;         // variable for reading the pushbutton status int buttonState2 = 0;         // variable for reading the pushbutton status int buttonState3 = 0;         // variable for reading the pushbutton status  int ledPin = 8;                  // LED test pin  int rxPin = 0;                    // RX PIN  int txPin = 1;                    // TX TX  int byteGPS=-1;  char li...

temparture gas humiditiy arduino code using iot

 #include <string.h>  #include <ctype.h> #include <LiquidCrystal.h> LiquidCrystal lcd(13, 12, 11, 10, 9, 8); char fy=0; // constants won't change. They're used here to // set pin numbers: const int buttonPin = 7;     // the number of the pushbutton pin int buttonState1 = 0;         // variable for reading the pushbutton status int buttonState2 = 0;         // variable for reading the pushbutton status int buttonState3 = 0;         // variable for reading the pushbutton status  int ledPin = 8;                  // LED test pin  int rxPin = 0;                    // RX PIN  int txPin = 1;                    // TX TX  int byteGPS=-1;  char linea[300] = "";  char lat[30] = "";  char ...

blood pressure using arduino code with lcd display

// include the library code: #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(13, 12, 11, 10, 9, 8); int buttonState = 0;         // variable for reading the pushbutton status // These constants won't change.  They're used to give names // to the pins used: const int analogInPine = A0;  // Analog input pin that the potentiometer is attached to const int analogInPinb = A1;  // Analog input pin that the potentiometer is attached to int sensorPin = A5;    // select the input pin for the potentiometer int sensorValue = 0;  // variable to store the value coming from the sensor int count=0,fl; unsigned long time1=0;  // store the initial time unsigned long time2;    // store the current time   int count1; int sensorValue1 = 0;        // value read from the pot void setup() {         lcd.setCur...

Dynamic Outsourced Auditing Services

Jio

Reliance Jio planning its own  cryptocurrency called JioCoin  elder son Akash Ambani leading the JioCoin project, Reliance Jio plans to build a 50-member team of young professionals to work on blockchain technology, which can also be used to develop applications such as smart contracts and supply chain management logistics

Bilevel Feature Extraction-Based Text Mining for Fault Diagnosis of Rail...

An Optimization Framework for Mobile Data Collection in Energy-Harvestin...

bh1750 digital light intensity sensor

bh1750 digital light intensity sensor working code #include <Wire.h> #include <BH1750.h> BH1750 lightMeter; void setup(){   Serial.begin(9600);   lightMeter.begin();   Serial.println("Running..."); } void loop() {   uint16_t lux = lightMeter.readLightLevel();   Serial.print("Light: ");   Serial.print(lux);   Serial.println(" lx");   delay(1000); }

Online Movie Ticket Reservation using PHP

An Adaptive Subcarrier Sharing Scheme for OFDM-Based Cooperative Cognitive Radios

An Adaptive Subcarrier Sharing Scheme for OFDM-Based Cooperative Cognitive Radios ABSTRACT: •                   Incorporation of orthogonal frequency division multiplexing (OFDM) in cooperative cognitive radio network facilitates subcarrier sharing to achieve spatial diversity with opportunistic spectrum access. •       In addition, adaptive modulation has been adopted widely in wireless communication to improve spectral efficiency. Use of adaptive modulation for cooperative cognitive relaying transmission to maximize throughput under bit error rate (BER) constraint is an open issue. •       In this paper, we propose an adaptive subcarrier sharing scheme for OFDM-based cooperative cognitive radio system, wherein cognitive (secondary) system helps the primary system to achieve its target rate of communication in exchange for opportunistic spectrum...

Cooperative Spectrum Sensing with Data Mining of Multiple Users’ Historical Sensing Data

Cooperative Spectrum Sensing with Data Mining of Multiple Users’ Historical Sensing Data ABSTRACT: •                            The current cooperative spectrum sensing still can not effectively exploit the temporal correlations among sensing data, especially the correlations between the current sensing data and the historical data. •       This paper uses sticky hierarchical Dirichlet process-hidden Markov model to exploit the historical sensing data of multiple users, and classifies the historical sensing data into groups according to their latent spectrum states. •        The proposed spectrum sensing algorithm can fuse the historical sensing data into prior knowledge, which can be used to improve the accuracy in spectrum decision. •        Furthermore, a rejection...

Cooperative Spectrum Sensing with Data Mining of Multiple Users’ Historical Sensing Data

Cooperative Spectrum Sensing with Data Mining of Multiple Users’ Historical Sensing Data MODULES: ·         Corrective Spectrum Sensing Data ·         Historical sensing data DESCRIPTION Corrective Spectrum Sensing Data:           The PU state transition probability matrix can be inferred based on the historical data mining and be used as prior knowledge to improve the performance of spectrum decision. Historical sensing data:           Sensing data with the same latent spectrum state will be fused together according to their statistical correlation. The spectrum sensing decision is a special case in decision theory, since it decides whether the channel is available or not according to the sensing data.

An Adaptive Subcarrier Sharing Scheme for OFDM-Based Cooperative Cognitive Radios

An Adaptive Subcarrier Sharing Scheme for OFDM-Based Cooperative Cognitive Radios MODULES : ·         Node  Formation ·         Primary System Rate and Outage Probability ·         Secondary System Rate and Outage Probability ·         Data transmission DESCRIPTION: NODE FORMATION: The channels over the nodes are modeled as frequency non-selective Rayleigh block fading.The instantaneous channel gain for each subcarrier over different nodes. Primary System Rate and Outage Probability:             In other words instantaneous data rate with BER-SC increases, consequently outage probability decreases. With cooperation ST behaves as an adaptive DF relay so as to provide diversity gain to the primary system. we propose an adaptive subcarrier sharing scheme for OFD...