Nokia 5110 backlight with HC-SR04

Hi Guys

I have connected lcd nokia 5110 to adruino uno. There is one connection from Nokia lcd “Backlight” to 3.3V. I wonder is there any way to connect this BL to sensor HC-SR04 and if I hover my hand above this sensor leds will on? I know that I can define pins but I’m not sure I can define 3.3v. I do not need have a backlight on all the time.

Regards
cry5t41

Hi,
Never used this display myself, but can't you switch the backlight via software?? What is the HC-SR05 used for, or are you thinking of just using it for this job, in which case YES it can do the job.

But we need to see your schematic and code, before we can help you, you must help us see what you mean??

Regards

Mel.

HI this is my code and photos

#include <Adafruit_GFX.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
#include <DHT11.h>
#include <Wire.h>
#include "RTClib.h"
// Software SPI (slower updates, more flexible pin options):
// pin 7 - Serial clock out (SCLK)
// pin 6 - Serial data out (DIN)
// pin 5 - Data/Command select (D/C)
// pin 4 - LCD chip select (CS)
// pin 3 - LCD reset (RST)
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
int pin=8;
DHT11 dht11(pin);
RTC_DS1307 rtc; 

void setup()   {
  Serial.begin(9600);
  display.begin();
  display.clearDisplay();
  display.setContrast(37);
  display.setTextColor(BLACK);

  Wire.begin();
  rtc.begin();

  if (! rtc.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
    // This line sets the RTC with an explicit date & time, for example to set
    // January 21, 2014 at 3am you would call:
    //rtc.adjust(DateTime(2014, 9, 15, 2, 51, 0));
  }
}

void loop() {
  timeRtc();
  readingsIn();
  display.display();
  display.clearDisplay();
}

void timeRtc(){
  DateTime now = rtc.now();

  display.setCursor(13,0);
  display.setTextSize(2);
  display.print(now.hour(), DEC);
  display.setTextSize(2);
  display.print(':');
  display.setTextSize(2);
  if (now.minute() < 10){
    display.setTextSize(2);
    display.print('0');
  } 
  display.print(now.minute(), DEC);
  display.setTextSize(1);

  display.setCursor(13,20);
  display.setTextSize(1);
  display.print(now.year(), DEC);
  display.print('/');
  if (now.month() < 10) {
    display.setTextSize(1);
    display.print('0');
  }
  display.print(now.month(), DEC);
  display.print('/');
  if (now.day() < 10) {
    display.setTextSize(1);
    display.print('0');
  }
  display.print(now.day(), DEC);
  delay(1000);
}

void readingsIn(){
  float temp, humi;
  dht11.read(humi, temp);

  display.setCursor(0,34);
  display.setTextSize(2);
  display.print(int(temp));
  display.setCursor(23,32);
  display.setTextSize(1);
  display.print("o");
  display.setCursor(29,34);
  display.print("C");

  display.setCursor(55,34);
  display.setTextSize(2);
  display.print(int(humi));
  display.setTextSize(1);
  display.setCursor(79,41);
  display.print("%");
  delay(1000);
}

Regards
cry5t41