Soluții

Fix Black Screen with cursor problem in Windows 11

Booting your Windows 11/10 computer into a Black Screen with a cursor can be annoying. If you see a Windows 11/10 Black Screen with the cursor before or after login, try these suggestions:

  1. Disable App Readiness Service and see
  2. Run Automatic Startup Repair
  3. Troubleshoot in Clean Boot State
  4. Uninstall/Reinstall or Update your Graphics Card
  5. Use System Restore via Advanced Startup Options
  6. Perform an In-place Upgrade.

Go through the list and see what may apply in your case. You can try the suggestions in no particular order.

As a general first step, press WinKey+Ctrl+Shift+B keyboard shortcuts to restart your Display driver and see if that helps. If it doesn’t, then you can also use the online Black Screen Troubleshooter from Microsoft and see if that helps. If it doesn’t, then read on to learn about the specific troubleshooting suggestions.

[mai mult...]

Windows Backup and Restore stuck

Use the following fixes if the Windows Backup and Restore tool gets stuck at a certain percentage like 97%, 12%, etc. while creating a system image:

  1. Repair your system image files
  2. Run the chkdsk scan
  3. Disable your antivirus and firewall
  4. Try in the Clean Boot state
  5. Exclude unnecessary folders
  6. Use another program
[mai mult...]

Error! Memory configured incorrectly, System halted!

If you encounter the “Memory configured incorrectly” error on system startup, the solutions provided in this article will help you. When you turn on your system, it performs the POST. If the system detects a hardware issue, it halts the boot process and displays the corresponding error message. Your system cannot boot into Windows until you fix this error.

The complete error message is:

Error! Memory configured incorrectly. Please enter setup for memory information details. System halted!

Use the following solutions if you cannot boot into Windows due to the “Memory configured incorrectly” error:

  1. Clean and reinstall RAM
  2. Clear CMOS
  3. Test your RAM sticks
  4. Decode the beep sound (if applicable)
  5. Verify the RAM configuration with the user manual
  6. Hardware fault

All these fixes are explained in detail below:

[mai mult...]

Windows PC is using CPU instead of GPU

If your Windows PC is using a CPU instead of a GPU, this can ruin your gaming experience, resulting in lower FPS, stuttering, and poor gaming performance. Some users encountered this issue. This article lists working fixes for this problem.

Use the following suggestions if your Windows PC is using the CPU instead of the GPU:

  1. Reseat your GPU
  2. Check your monitor connections
  3. Install required updates
  4. Check your power plan
  5. Disable the Link Power State Management setting
  6. Force Windows to use the dedicated GPU
  7. Reinstall the graphics card driver
  8. Update your BIOS and chipset driver
  9. Upgrade your hardware.
[mai mult...]

ESP32 Light sensor

ESP32 Light Sensor

1. Introduction

Light sensors allow the ESP32 to measure ambient light levels and react intelligently to environmental changes. Typical projects include automatic lighting, brightness control, weather stations, smart blinds, energy-saving systems, and IoT monitoring dashboards.

This guide provides a complete and detailed technical walkthrough for using light sensors with the ESP32. It covers sensor selection, wiring, ADC behavior, calibration, power optimization, software design, and real-world applications.

2. Types of Light Sensors for ESP32

2.1 LDR (Light Dependent Resistor / Photoresistor)

Best for: Simple and low-cost ambient light detection

An LDR changes its resistance based on the amount of light falling on it. As light intensity increases, resistance decreases. Because the ESP32 cannot measure resistance directly, an LDR must be used with a voltage divider circuit.

  • Very inexpensive and widely available
  • Simple analog interface
  • Non-linear response curve
  • Slow response compared to digital sensors

2.2 Photodiode / Phototransistor

Photodiodes and phototransistors provide faster and more precise light detection than LDRs. They generate current proportional to light intensity and are commonly used in applications requiring quick response times or better linearity.

These sensors often require additional circuitry such as transimpedance amplifiers or comparator circuits.

2.3 Digital Light Sensors

Digital light sensors communicate with the ESP32 using I2C and output calibrated light measurements directly in lux.

  • BH1750 – Ambient light sensor (lux output)
  • TSL2561 / TSL2591 – High dynamic range sensors
  • VEML7700 – High precision, ultra-low power

Advantages: High accuracy, wide dynamic range, no ADC noise issues, and factory calibration.

3. ESP32 ADC Overview

The ESP32 features a 12-bit Analog-to-Digital Converter (ADC). While powerful, it has limitations that must be understood to achieve reliable light measurements.

3.1 ADC Channels

  • ADC1: GPIO 32–39 (recommended)
  • ADC2: Shared with Wi-Fi (avoid when Wi-Fi is active)

3.2 ADC Resolution and Attenuation

Attenuation Input Voltage Range
0 dB ~1.1 V
2.5 dB ~1.5 V
6 dB ~2.2 V
11 dB ~3.9 V

Correct attenuation settings are essential to avoid ADC saturation and inaccurate readings.

4. Using an LDR with ESP32

4.1 Wiring an LDR (Voltage Divider)

An LDR must be connected in a voltage divider configuration to convert resistance changes into voltage.

  • LDR → 3.3V
  • 10kΩ resistor → GND
  • Junction point → GPIO 34 (ADC1)

4.2 Arduino Code Example (LDR)

#define LDR_PIN 34

void setup() {
  Serial.begin(115200);
  analogReadResolution(12);
}

void loop() {
  int rawValue = analogRead(LDR_PIN);
  Serial.println(rawValue);
  delay(500);
}

4.3 Improving LDR Accuracy

  • Use ADC1 pins only
  • Add a 0.1µF capacitor for noise filtering
  • Average multiple ADC readings
  • Shield sensor from electrical noise

5. Using BH1750 Digital Light Sensor

5.1 BH1750 Features

  • Measures ambient light in lux
  • I2C interface
  • Range: 1–65,535 lux
  • Operating voltage: 3.3V

5.2 Wiring BH1750 to ESP32

  • VCC → 3.3V
  • GND → GND
  • SDA → GPIO 21
  • SCL → GPIO 22

5.3 Arduino Code Example (BH1750)

#include 
#include 

BH1750 lightMeter;

void setup() {
  Serial.begin(115200);
  Wire.begin();
  lightMeter.begin();
}

void loop() {
  float lux = lightMeter.readLightLevel();
  Serial.print("Light: ");
  Serial.print(lux);
  Serial.println(" lx");
  delay(1000);
}

6. Calibration and Lux Mapping

LDRs are non-linear and require calibration to map ADC values to real-world light levels. This is typically done using known light sources and curve fitting or lookup tables.

  • Measure ADC values at known lux levels
  • Plot logarithmic response curve
  • Apply scaling or lookup table in software

7. Power Optimization

For battery-powered projects, power consumption must be minimized.

  • Reduce sampling frequency
  • Use sensor sleep modes
  • Enable ESP32 deep sleep

esp_sleep_enable_timer_wakeup(10 * 1000000);
esp_deep_sleep_start();

8. Automation and Logic Integration

  • Turn lights ON when lux falls below a threshold
  • Adjust LED brightness using PWM
  • Disable motion detection during daylight

9. Common Issues and Troubleshooting

  • Noisy readings: Improve grounding and average samples
  • Incorrect lux values: Check I2C wiring and sensor mode
  • ADC saturation: Adjust attenuation

10. Real-World Applications

  • Smart street lighting
  • Automatic display brightness
  • Greenhouse and agriculture monitoring
  • Weather stations
  • Solar tracking systems

11. Advanced Enhancements

  • Combine LDR and digital sensors for redundancy
  • Send lux data via MQTT
  • Cloud logging and dashboards
  • Machine learning for light pattern analysis.

[mai mult...]

ESP32 Motion sensor

The ESP32 is a powerful, low-cost microcontroller with built-in Wi-Fi and Bluetooth, making it an excellent platform for motion-sensing projects such as smart lighting, security systems, occupancy tracking, and IoT automation.

1. Motion Sensors Compatible with ESP32

1.1 PIR Motion Sensor (HC-SR501)

Best for: Human motion detection, low power consumption, simple digital output

  • Detects changes in infrared radiation from warm objects
  • Outputs HIGH when motion is detected
  • Detection range: 3–7 meters (typical)

Limitations: Cannot detect stationary objects and has slower response than radar sensors.

1.2 Microwave Radar Sensor (RCWL-0516)

Uses Doppler radar instead of infrared. It is more sensitive than PIR sensors and can detect motion through thin walls, but may cause more false triggers.

1.3 Accelerometer / IMU (MPU6050)

  • Detects motion, tilt, and vibration
  • Common in robotics and wearables
  • Uses I2C communication

2. PIR Motion Sensor Basics

2.1 PIR Sensor Pinout (HC-SR501)

Pin Name Description
1 VCC 5V (some support 3.3V)
2 OUT Digital output (HIGH on motion)
3 GND Ground

Note: Most HC-SR501 modules output 3.3V logic, which is safe for ESP32 GPIO pins.

2.2 Onboard Adjustments

  • Sensitivity potentiometer (detection range)
  • Time delay potentiometer (output HIGH duration)
  • Trigger mode jumper: H = repeat, L = single trigger

3. ESP32 GPIO and Power Considerations

Recommended GPIO pins: 13, 14, 25, 26, 27, 32, 33

Avoid boot-sensitive pins: 0, 2, 12, 15 unless you understand ESP32 boot modes.

ESP32 uses 3.3V logic. PIR sensors may require 5V power. Always connect grounds together.

4. Wiring the PIR Sensor to ESP32

  • VCC → VIN (5V) or 3.3V (if supported)
  • GND → GND
  • OUT → GPIO 27

5. Basic Arduino Code Example

#define PIR_PIN 27

void setup() {
  Serial.begin(115200);
  pinMode(PIR_PIN, INPUT);
}

void loop() {
  if (digitalRead(PIR_PIN)) {
    Serial.println("Motion detected!");
    delay(500);
  }
}

6. Interrupt-Based Motion Detection

#define PIR_PIN 27
volatile bool motionDetected = false;

void IRAM_ATTR motionISR() {
  motionDetected = true;
}

void setup() {
  Serial.begin(115200);
  pinMode(PIR_PIN, INPUT);
  attachInterrupt(digitalPinToInterrupt(PIR_PIN), motionISR, RISING);
}

void loop() {
  if (motionDetected) {
    Serial.println("Motion detected via interrupt!");
    motionDetected = false;
  }
}

7. Power Saving with Deep Sleep

esp_sleep_enable_ext0_wakeup(GPIO_NUM_27, 1);
esp_deep_sleep_start();

This allows the ESP32 to sleep until motion is detected, ideal for battery-powered systems.

8. Common Problems and Solutions

  • False triggers: Reduce sensitivity and avoid heat sources
  • No detection: Allow sensor warm-up time (30–60 seconds)
  • Random resets: Ensure stable power supply

9. Applications

  • Smart lighting systems
  • Home security and alarms
  • Occupancy detection
  • Energy-saving automation.

[mai mult...]