Tag archive for: Windows

How to make applications on your Windows 10 laptop use the camera and microphone of your webcam

One of the demo stations in my office needs to run applications that receive video and voice from the user. Since we have several Windows 10 laptop lying around, we decided to use one to run the applications.

Given that the Windows 10 laptop is to be hidden in a cabinet, I need to use an external webcam with microphone.

However, the integrated camera and microphone can be chosen by the applications that I run on that laptop.

So how can we make applications on a Windows 10 laptop to use the camera and microphone of your webcam?

This post shows how I made applications on my Windows 10 laptop use the camera and microphone of my Logitech C525 HD Webcam.

How to use NSSM to setup Jupyter Notebook as a Windows Service running its own Python 3 virtual environment

When you take Andrew Ng’s Deep Learning Coursera course, you can get a better understanding of deep learning. In addition, you will get many Jupyter Notebook documents that you can reference while building models that can solve interesting problems.

When you want to readily access those documents, you can setup Jupyter Notebook as a Windows Service on your Windows machine.

As I had mentioned in how to use NSSM to run a Python 3 application as a Windows Service in its own Python 3 virtual environment, NSSM is a very helpful tool for us to create Windows Services.

Since we can install Jupyter Notebook via pip, we can run Jupyter Notebook from its own virtual environment. In addition to that, since we can create a Python 3 virtual environment in Windows 10, we can setup Jupyter Notebook as a Windows Service running its own Python 3 virtual environment.

Given these points, let us look at how we can use NSSM to setup Jupyter Notebook as a Windows Service running its own Python 3 virtual environment.

How to use NSSM to run a Python 3 application as a Windows Service in its own Python 3 virtual environment

If you want to run a Python 3 application as a Windows Service, then you are going to love NSSM. Since NSSM handles the life cycle of a Windows Service for our Python 3 application, we can keep it platform agnostic.

Previously, we saw how we can use a Python 3 virtual environment in Windows 10. Given that, let’s see how we can use NSSM to run a Python 3 application as a Windows Service in its own Python 3 virtual environment.

How to write a C# program to communicate with an ESP32 development board via Bluetooth Serial

Coupled with Bluetooth Serial and GPIO pins, ESP32 can augment a Windows machine with the ability to read from sensors.

So with an ESP32 development board, you can turn your old Windows machine into an IOT gateway that can sense its operating environment.

Given these points, let us look at how we can write a C# program to communicate with an ESP32 development board via Bluetooth Serial.

How to use C# to read sensor data from Arduino or ESPx via serial connection

When you have an old Windows machine, you can convert it into an IOT gateway.

So how can we read sensor data with our windows machine? Since our windows machine probably do not have GPIO pins, we can read sensor data via an intermediary device.

For example, we can first attach an Arduino Uno or ESP32 development board as the intermediary device to our windows machine via USB. Given that connection, the intermediary device will read the sensor data and send those values via serial. On our Windows machine, we can then run a program to read those values from serial.

So how can we read sensor data from Arduino or ESPx via serial connection on our Windows machine? Since C# is a programming language for creating windows application, we can use C# to read those data from serial.

How to use a Python 3 virtual environment in Windows 10

When you need each Python 3 application that you are building to run in its own isolated environment, you can turn to virtual environments.

Since Python is available on Windows 10, you can also use virtual environments on Windows 10.

Typically, using a Python 3 virtual environment in Windows 10 involves the following steps:

  1. Installing Python 3 with pip and several features.
  2. Creating a Python 3 virtual environment with Python 3 venv module.
  3. Activating the Python 3 virtual environment.
  4. Installing Python 3 packages that your Python application is using into the virtual environment.
  5. Running your Python 3 application within the Python 3 virtual environment.
  6. Deactivating the Python 3 virtual environment.

Steps to check whether a process had utilised a port before your application does with windows built in facilities

As a systems analyst, it is inevitable for me to go to windows based computers to check out the applications that I am taking care of. Most of my applications listen to commands via TCP/IP ports in order to do work.

Whenever a user reports that one of such applications is failing on their machine, the first thing that I will check out is whether that application is able to reserve the port that it is supposed to listen to.

Although there are Sysinternal suite of diagnostic tools for me to use, there are client machines does not allow foreign executables to execute on them.

This post details the steps that I take to check out whether there is a port binding issue in the event that my application fail to run in windows based machines.