Covid-19 patient monitoring using Raspberry Pi

Image Source: CBC Canada

A team from the University of Toronto has created a new way for health-care workers to monitor COVID-19 patients — without having to set foot in their hospital rooms.

The university got a call from Mount Sinai hospital with a requirement to figure out a way to monitor vital signs both continuously and remotely.

The students developed a raspberry pi based continuous remote monitoring system for monitoring the status of the patients without the direct intervention of the nurses.

They attached a standard fingertip probe, already in use in hospitals to monitor vital signs, to a “very, very small computer about the size of a credit card,”

That simple computer, called a Raspberry Pi, can then connect to the internet — allowing health-care workers to check on patients from any nursing station computer, or on their smartphone.

The concept is very simple, the finger clip monitors the respiratory status of the COVID-19 patients. The clip detects the light absorbed by the patient’s blood. The colour vary depending upon the oxygen level in the blood and this is the key factor to monitor. This data will be captured from the finger clip by the Raspberry pi and it gets transmitted to the devices in the nursing station.

The prototype was successful based on several trial deployments made in the Mount Sinai hospital.

References:

https://www.cbc.ca/news/canada/toronto/u-of-t-covid-19-monitoring-system-1.5540089

University of Toronto supports COVID-19 patient monitoring with Raspberry Pi

 

 

Role of Automation & AI in the modern Agriculture

Food is one of the fundamental need of any living organism. For humans in the current age, food is something that has to be purchased from the shops. Once humans became civilized, the freely available food became a commodity product. The idea behind work and salary was all for food in the earlier ages. Later it was for food, medicine and shelter. Now the priorities has changed and we all are running behind the fast moving world.

Now everyone are busy. Getting clean & good food is very difficult.

  • Vegetables are full of pesticides & chemicals
  • Meat is poisonous with antibiotics
  • Rice & grains contains harmful chemicals. People even uses plastic like materials for manufacturing similar materials
  • Water and water bodies are polluted
  • Air is polluted
  • Soil is polluted

Everything is polluted….!!!

In general, the food that we eat is not good for health and it may even take our life. What is the solution ?.

People including me are busy with their work and they don’t have time to do any cultivation. I came from an agricultural background and I have farm lands also. But now everything is unused. Now the food production is getting reduced drastically. It is basically because of the following reasons.

  • The cost of farming is high.
  • No steady income.
  • Lack of stability in the price of agricultural products and market.
  • The major share goes to the middle man
  • High labour cost. Most of the conventional farming needs more man power and the cost of man power is more in the current society.
  • Poor social status.
  • Dependency on climate and the sudden climatic changes.

Because of all these factors new generation is not even thinking about agriculture. I also moved away from agriculture because of all these factors.

Currently I stay in an apartment surrounded by farm lands. When I observed the cultivation process and the deadly harmful pesticides that they use, I got shocked. None of these vegetables are in an eatable condition. I started thinking and researching about the ways to control this.

One of the images that made me re-thing is shared below. The picture shows two oxen with their mouths masked. The reason for the mask is to avoid them eating the cabbage leaves in the farmland while ploughing the fields. Those cabbages were sprayed with highly poisonous chemicals.

pesticide_image

One of my goals in this year is to start an organic farm. Automation is required to improve the efficiency and reduce the human effort. Now my blog posts will include the updates and progress about my organic farm and my learning.

How to check the performance of DNS in your network ?

I was checking for tools to benchmark the performance of DNS servers in my network. The reason behind this performance test was to identify the root cause of the internet slowness within my network. One of the good free tool that I found online is DNS Benchmark Tool.

This is a very light weight and portable tool. This is just 180KB and helps us to perform the DNS speeed test. With this tool I figured out one anonymous DNS server running in an individuals laptop also.

dns_server

I found this tool as a useful utility.

Unique ID in Raspberry Pi

Sometimes we might need a unique id from a raspberry PI. We don’t have to worry about generating a unique id for every device. There is a simple way to use an already existing unique number within the device. The serial number of the chip will be good enough to use as a unique key.

The following command will give the details of the cpu. We can find a serial number from this details and can be used as a unique id.

pi@raspberrypi:~ $ cat /proc/cpuinfo
processor   : 0
model name   : ARMv7 Processor rev 4 (v7l)
BogoMIPS   : 38.40
Features   : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer   : 0x41
CPU architecture: 7
CPU variant   : 0x0
CPU part   : 0xd03
CPU revision   : 4

processor   : 1
model name   : ARMv7 Processor rev 4 (v7l)
BogoMIPS   : 38.40
Features   : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer   : 0x41
CPU architecture: 7
CPU variant   : 0x0
CPU part   : 0xd03
CPU revision   : 4

processor   : 2
model name   : ARMv7 Processor rev 4 (v7l)
BogoMIPS   : 38.40
Features   : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer   : 0x41
CPU architecture: 7
CPU variant   : 0x0
CPU part   : 0xd03
CPU revision   : 4

processor   : 3
model name   : ARMv7 Processor rev 4 (v7l)
BogoMIPS   : 38.40
Features   : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer   : 0x41
CPU architecture: 7
CPU variant   : 0x0
CPU part   : 0xd03
CPU revision   : 4

Hardware   : BCM2709
Revision   : a02082
Serial      : 00000000xxxxxxxx

Hope this info is helpful. !!

Good Quote.!!

“A beginning programmer writes her programs like an ant builds her hill, one piece at a time, without thought for the bigger structure. Her programs will be like loose sand. They may stand for a while, but growing too big they fall apart.

Realizing this problem, the programmer will start to spend a lot of time thinking about structure. Her programs will be rigidly structured, like rock sculptures. They are solid, but when they must change, violence must be done to them.

The master programmer knows when to apply structure and when to leave things in their simple form. Her programs are like clay, solid yet malleable.”

— Master Yuan-Ma, The Book of Programming

A simple program to begin with python tornado

Python tornado is a powerful framework for dealing with HTTP requests. It helps us to write responses to HTTP requests in a very simple and elegant way. We can write handlers for responding to the HTTP requests very easily using tornado. This is very simple to learn and use. We can create an excellent application in very few lines of code. Here I am explaining about a simple tornado application. The code is attached below. For running this code, you need tornado to be installed in your machine.

In the beginning of the code, you can see few imports related to tornado. These libraries are required for our tornado application. After that you can see a define function. This define is imported from a library called options in tornado. Using this we can get user defined arguments from commandline. Here we are defining the port in which our tornado application should run. If the user is specifying the port in the command line, it will use that value, else it will use the default value. Here I gave default value as 8888. 

The next part is a class named HelloWorldHandler. This is a class extending the tornado RequestHandler class. This is basically a handler, which means this will handle an HTTP request. This class will be called based on the navigation rules that we define in the tornado. In this class there is only one method called get(). So this handler can handle only get requests. In the get method, we are just printing a text “Someone called me” and writing a response. So whenever this class is called, The text “Someone called me” will be printed in the console and the self.write(“Welcome to Tornado..!!”) will send the this string to the HTTP response.

The next part will run the tornado application. The “tornado.web.Application(handlers=[(r”/”, HelloWorldHandler)])” defines when to invoke the handler. the r”/” is a regex. So if the url comes without any path, the request will be navigated to HelloWorldHandler class. Similar to this we can have a list of regex – handler class pairs. Here we have only one.

Execution.

python HelloTornado.py –port 9090

This will run the application in 9090 port. After this open the web browser and check http://localhost:9090. You will get a message “Welcome to Tornado.!!” on the screen. For every hit, you can see a message “Someone called me” getting printed in the console.

python HelloWorld.py

This will run the application in the default port that we specified. I specified 8888. So open the webbrowser and check http://localhost:8888.

Note: If you are executing the code in a different machine, you should use the ip address of the machine instead of localhost.

Happy Learning … 🙂

We connected computers in the past, Now computers are connecting us…!!

A new revolution is going to happen in the world with connected devices and human life. We can call it as Internet of Things. Now lot of discussions and experiments are happening around the world to make this concept a reality. This is a very simple concept from the point of view of a person who knows electronics. But the problem is that for making this internet of things a reality and to make it usable by every individuals, it needs much more effort. For developing an application that makes our life easier by connecting things, we need the skillsets of a software engineer and electronics engineer. An electronics engineer can design the circuit, wire up and get the signals in the proper way. But those signals are just some electrical signals which will be useful only to the technical people. These systems were already in the past. Then what is different in IoT..??

IoT includes connecting systems, sensing each and every members in the network and controlling of every single node in the network based on the feedback. The control may not be based on a pre-written script, it can be dynamic. This requires extensive analytic knowledge along with electronics knowledge. If we sense and control every member of a large network, the data size will be high. Here we have big data solutions. So if we combine the electronics and analytic knowledge, we can build superb systems that can revolutionize the world. If we make everything connected and everything under control, there are some pros and cons. This will be just like the atomic energy. Good people used it for energy sustenance by generating energy and bad people used it as atom bomb for destroying people. Hope IoT will be used in the right way..!!!!

The internet of bees could save our food supply

Jenkins/Hudson not executing jobs (pending – waiting for next executor)

Problem

I faced an issue in jenkins while executing multiple jobs in parallel. Upto a specific number of jobs are running in parallel, but beyond that, if we submit any job, it was going to waiting state.

Solution

In this case, jenkins is executing jobs in parallel upto some number. That means somewhere we need to increase the parallelism paramater.

  • go to Jenkins -> Manage Jenkins -> Manage Nodes
  • check whether all nodes are active and healthy
  • Check whether disk space is available in nodes
  • If everything is fine and if the machine have enough hardware configuration, you can increase the number of executors.

For that, click on configure and increase the number of executors as per your requirement. 

NB: If the jenkins is not at all executing jobs, then it might be because of offline master.

“Missing artifact jdk.tools:jdk.tools:jar:1.6”

While using maven, we may face an error like
“Missing artifact jdk.tools:jdk.tools:jar:1.6”

This problem can be fixed by adding the below lines to your pom.xml file.
Replace ${JAVA_HOME} in the xml file with the absolute path of JAVA_HOME.

<dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<scope>system</scope>
<version>1.6</version>
<systemPath>${JAVA_HOME}/lib/tools.jar</systemPath>
</dependency>