Posts

Linux Hanged 2

I get what you're saying! If your Linux system with XFCE freezes entirely—no mouse movement, keyboard input, etc.—it's likely a kernel-level or hardware-level hang. But if it's only partially frozen (mouse moves, some keys work), there are a few ways to open a task manager or recover control. Here’s what you can try: 1️⃣ Use XFCE’s Task Manager (xfce4-taskmanager): If the freeze is partial and you can still move your mouse:     Press Alt + F2 to open the Run Application dialog.     Type:     xfce4-taskmanager     and hit Enter. 2️⃣ Use a Terminal: If you can switch to a virtual terminal:     Press Ctrl + Alt + F1 (or F2, F3… up to F6).     Log in with your username and password.     Run: top or     htop     (if you have htop installed—it’s a friendlier version of top). Find the process causing issues (often something like firefox, chrome, or a heavy app)...

Linux Hanged 1

1. Use TTY to Regain Control (Very Useful) Even if the GUI is frozen, Linux still runs in the background. You can switch to a TTY (text console): 👉 Press: css Copy Edit Ctrl + Alt + F2  (or F3, F4... up to F6) This brings you to a black screen asking for login. Log in with your username and password, then: bash Copy Edit htop Or use: bash Copy Edit top Find the highest CPU or memory usage process, and kill it: bash Copy Edit kill -9 <PID> If you don’t have htop yet: bash Copy Edit sudo apt install htop To return to the desktop GUI after killing the offending process: 👉 Press: nginx Copy Edit Ctrl + Alt + F1  (or sometimes F7, depending on distro) 🔹 2. Hard Reset as Last Resort If TTY doesn't work (rare but possible), you can force a system reboot safely: 👉 Press: nginx Copy Edit Alt + SysRq + REISUB That’s: Alt + Print Screen (SysRq key) + type R E I S U B slowly. It safely unmounts disks and reboots — better than holding the power button. ⚙️ How to Prevent Future Fr...

Embedded systems Guide

 Embarking on a journey into embedded systems can indeed feel overwhelming, especially when foundational concepts seem scattered across different domains like electronics and programming. It's completely normal to feel this way as you're integrating knowledge from multiple areas. Let's break down a structured approach to help you build a solid foundation and progressively advance your understanding of embedded systems. 1. Understand What Embedded Systems Are Embedded Systems are specialized computing systems that perform dedicated functions within larger mechanical or electrical systems. Examples include: Home Appliances: Washing machines, microwaves. Consumer Electronics: Smartphones, cameras. Automotive Systems: Airbags, engine control units. Industrial Machines: Robotics, control systems. Key Characteristics: Dedicated Functionality: Designed for specific tasks. Real-Time Operation: Often require timely responses. Resource Constraints: Limited processing power, ...

Micropython basic tasks for ESP-32 server

 BASIC WIFI DETECTION import network import time def scan_wifi():     wlan = network.WLAN(network.STA_IF)  # Create a WLAN object in station mode     wlan.active(True)  # Activate the WLAN interface     print("Scanning for Wi-Fi networks...")     networks = wlan.scan()  # Scan for available networks     for net in networks:         ssid = net[0].decode('utf-8')  # SSID is the first item in the tuple         print("Found network: SSID: {}".format(ssid)) if __name__ == "__main__":     scan_wifi() BASIC SERVER import network import socket import time def setup_wifi():     wlan = network.WLAN(network.STA_IF)     wlan.active(True)     wlan.connect("NETWORK", "PASSWORD")     while not wlan.isconnected():         time.sleep(1)     print('Connected to Wi-Fi network:', wlan.ifconfig()) def start_server()...

How to develop own Block chain

 Yes, you can absolutely develop your own blockchain ! The process involves building the core technology and ensuring that it functions securely, efficiently, and with the desired features. However, it’s a complex process that requires understanding cryptography, distributed systems, and programming. Here's a guide on how you can develop a blockchain and potentially earn from it: Steps to Develop a Blockchain 1. Learn the Fundamentals Before you start coding, make sure you understand the following key concepts: Blockchain Architecture : How blocks, chains, and nodes interact. Cryptographic Hashing : Secure hash functions like SHA-256 used to secure the blockchain. Consensus Mechanisms : Like Proof of Work (PoW), Proof of Stake (PoS), or newer alternatives (e.g., Delegated Proof of Stake, Proof of Authority). Networking : How decentralized peer-to-peer networks function. Familiarity with these concepts will make it easier to design and develop your blockchain. 2. Choose the Right Pr...

MicroPython with microcontroller and sensor

 Yes, you can definitely use MicroPython with the ESP32 microcontroller and the MPU6050 sensor. MicroPython provides libraries and tools to interact with various hardware components, including I2C sensors like the MPU6050. Here's how you can set up and use the MPU6050 with MicroPython on the ESP32: 1. Setting Up MicroPython on ESP32 Install MicroPython Firmware : Download the latest MicroPython firmware for ESP32 from the MicroPython website . Flash the firmware to your ESP32 using a tool like esptool.py . Set Up Development Environment : Use a tool like Thonny or uPyCraft to write and upload MicroPython scripts to your ESP32. 2. Connecting the MPU6050 to ESP32 Wiring : MPU6050 VCC to ESP32 3.3V MPU6050 GND to ESP32 GND MPU6050 SCL to ESP32 GPIO 22 (or any other GPIO configured as SCL) MPU6050 SDA to ESP32 GPIO 21 (or any other GPIO configured as SDA) Add Pull-Up Resistors : Add 4.7kΩ pull-up resistors to the SDA and SCL lines. 3. MicroPython Code for MPU6050 Install Requir...

Sensor with Microcontroller with Android app

 Great choice! The ESP32 microcontroller combined with the MPU6050 sensor is a powerful setup for your project. Here’s a step-by-step guide to help you get started with programming and embedding this setup with an Android device: 1. Hardware Setup Connect MPU6050 to ESP32 : Wiring : MPU6050 VCC to ESP32 3.3V MPU6050 GND to ESP32 GND MPU6050 SCL to ESP32 GPIO 22 (or any other GPIO you configure as SCL) MPU6050 SDA to ESP32 GPIO 21 (or any other GPIO you configure as SDA) Note : Ensure you use pull-up resistors (typically 4.7kΩ) on the SDA and SCL lines. Power Supply : Ensure the ESP32 is powered adequately. The MPU6050 will draw minimal current, but ensure the entire system has a stable power source. 2. Programming the ESP32 Set Up the Development Environment : Install Arduino IDE : You can use the Arduino IDE to program the ESP32. Add ESP32 Support : Go to the Arduino IDE Preferences and add the ESP32 board URL. Install the ESP32 board support via the Boards Manager. Install ...