Tuesday, 26 December 2023

Living the Green Dream


Introduction: Meet George Kuzhivelil, a true inspiration for anyone seeking a sustainable lifestyle. For over a decade, he's been transforming his Kerala home into a green haven, proving that eco-friendly living is not just possible, but incredibly rewarding.

Solar Power Champion: In 2012, Dad's journey began with two solar panels. Fast forward to today, his rooftop boasts a 12-panel farm, silently capturing the sun's energy and lighting the way towards clean power.

Beyond Panels: Sustainability doesn't stop with electricity. Dad further reduced his environmental footprint by installing a solar water heater in 2016, ensuring a warm welcome while minimizing carbon emissions.


Rainwater Harvest: Monsoon showers aren't wasted in Dad's home. Four strategically placed rainwater harvesting tanks collect the bounty, providing abundant water for plants, gardens, and even car washes throughout the year.

Waste to Energy: Embracing sustainable waste management, Dad installed a biogas fuel system. This ingenious system not only recycles waste but also generates clean cooking fuel, reducing reliance on traditional, often polluting sources.

Giving Back to the Grid: In 2021, Dad reached a remarkable milestone – becoming a net contributor to the KSEB electricity grid. His solar panels now produce more than his home consumes, making him not just self-sufficient but also an active contributor to the community's clean energy future.

A Visionary Path: Importantly, Dad embraced these sustainable practices long before they became trendy. He's a true pioneer, demonstrating that living green is not just about following the latest fads, but about a genuine commitment to the planet and a vision for a brighter future.

Conclusion: Dad's story is an inspiring testament to the power of individual action. His dedication to sustainability showcases the positive impact we can all have on our environment, one step at a time. So, let's take a page from Dad's green playbook and start our own journeys towards a more sustainable future!

Monday, 2 October 2023

CASE Connected vehicles

The car of the future is connected, autonomous, shared, electric – and it’s already here. For example, by 2030, more than 95 percent of passenger miles will be served by autonomous cars. With sensors now built into every imaginable aspect of a vehicle, from fully voice-operated features and driver attention monitoring to biometric security for reducing theft, the possibilities for the customer experience are endless. Car manufacturers have started thinking beyond traditional car features like design and engine type to consider cutting-edge digital capabilities like personalized subscription services where user can opt in or out of a range of on-demand features from a centralized marketplace.

Because of this, customers have changed the way they purchase cars – it’s not just about aesthetics or performance anymore. There is a shift in customer preferences to include features like personalized digital entertainment and data-powered productivity. Connected cars of the future will also offer facial recognition systems that change in-car settings for the driver, in-car gesture control and voice recognition for advanced security, and in-car shopping with geo-based prompts.


Research indicates that the automotive industry is a leading adopter of smart factories and use of digital technologies such as IoT connectivity, intelligent automation, and cloud-based data analysis and management. However, to take advantage and truly commercialize on the possibilities of the connected vehicle, automotive leaders need to ensure they have a strong technological foundation and that they are:

  • Adopting next-gen capabilities that will drive innovation. This includes 5G, cloud, and AI. In fact, up to 15 percent of all new vehicles sold in 2030 could be fully autonomous using next-gen capabilities.
  • Conforming to safety and security demands. Given the sensors and the data-driven nature of connected vehicles, they may be more prone to hacking. But turning control completely over to software could lead to new hacking vulnerabilities and other liability issues that companies cannot ignore. To overcome this, automotive companies have to allow drivers to intervene in emergencies.
  • Choosing the right operating systems, hypervisor options, embedded software design, and hardware compatibility. These parameters are critical factors to consider given the increasing share of electrified vehicles as a percentage of new vehicle sales. For electrified vehicles, it’s important to have the right OS and embedded software and software.
  • Enabling rapid prototyping, development, and testing/verification. There’s no denying that the future of the automotive industryis tied closely to additive manufacturing. Continued innovations in the 3D printing industry – including new materials, printers, and techniques – will continue to change the way companies design and create. To remain competitive, or simply stay relevant, organizations need to adopt smarter and faster ways to prototype and develop.
  • Enhancing the capabilities behind design and production. A connected vehicle requires multiple end-to-end capabilities. The industry is in a critical period of disruption, and those who build in the software capabilities in the same way they think about hardware will be able to win mindshare and market share over the long term.
  • Think beyond the vehicle. For connected cars, the ecosystem is not just within the vehicle. Because of this, automotive manufacturers need to work with fleet suppliers and service providers to deliver sustainable, connected value across the ecosystem. For example, automobile manufacturers need to work with city planners for better sustainability options such as placement of electric vehicle charging stations based on data.

Monday, 21 August 2023

What's the value of an Industry Cloud

In this video I explain the purpose and value of an Industry cloud. What are the key elements and how can this be useful to your Industry

Tuesday, 18 July 2023

Java String Program - Part 1

 Program 1


Write a program in Java to accept a string in lower case and change the first letter of every word to upper case. Display the new string.
Sample input: we are in cyber world
Sample output: We Are In Cyber World

import java.util.Scanner;

class P1{
    
    public static void change(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter a sentence");
        
        String s = sc.nextLine();
        String newstr = "";
        
        s = s.toLowerCase();
        s = s.trim();
        s = " " + s;
        
        for(int i=0; i<s.length(); i++){
            char ch = s.charAt(i);
            if(ch == ' '){
                newstr = newstr + ch;
                newstr = newstr + Character.toUpperCase(s.charAt(i+1));
                i++;
            }
            else {
                newstr = newstr + ch;
            }
        }
        
        System.out.println("new string = " + newstr);
    }
}

Program 2

Write a program to accept a string. Convert the string into upper case letters. Count and output the number of double letter sequences that exist in the string
sample Input: SHE WAS FEEDING THE LITTLE RABBIT WITH AN APPLE
Sample Output:4

import java.util.Scanner;

class P2{
    
    public static void countDouble(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter a sentence");
        String s = sc.nextLine();
        
        int count = 0;
        
        s = s.toUpperCase();
        
        for(int i =0; i<s.length()-1 ; i++){
            char ch = s.charAt(i);
            char ch1 = s.charAt(i+1);
            if(ch == ch1){
                count++;
            }
        }
        
        System.out.println("count of double letter seq = " + count);
    }}
        

Program 3

Special words are those words which start and end with the same letter.
Example: EXISTENCE, COMIC, WINDOW

Palindrome words are those words which read the same from left to right and vice-versa.
Example: MALYALAM, MADAM, LEVEL, ROTATOR, CIVIC

All palindromes are special words but all special words are not palindromes.

Write a program to accept a word. Check and display whether the word is a palindrome or only a special word or none of them.

import java.util.Scanner;

class P3{
    
    public static void check(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter a word");
        String w = sc.next();
        
        boolean isSpecial = false;
        boolean isPalin = false;
        
        // decide if the word is a special word
        
        char fc = w.charAt(0);
        char lc = w.charAt(w.length()-1);
        
        if (fc == lc)
            isSpecial = true;
            
        String rev = "";
        for(int i = w.length()-1; i >= 0; i--){
            rev += w.charAt(i);
        }
        
        if(w.equals(rev))
            isPalin = true;
        
        if( isSpecial && isPalin )
            System.out.println(w + " is special and palindrome ");
        else if(isSpecial)
            System.out.println(w + " is special");
        else if(isPalin)
            System.out.println(w + " is palindrome ");
        else
            System.out.println(w + " is neither special nor palindrome ");
        }}   


Video explanations for these programs 



 

            

            
            
        


Saturday, 15 July 2023

Java - Bubble Sort Numbers and Strings

Bubble sort code for sorting numbers in ascending order


import java.util.Scanner;
public class Bubble_Asc{
    public static void sort_number_asc(){
        // input array elements
        Scanner sc = new Scanner(System.in);
        int a[] = new int[5];
        System.out.println("Enter five array elements");
        for(int i=0; i<a.length; i++){
            a[i] = sc.nextInt();
        }
        
        // sort array elements 
        for(int i=0; i<a.length; i++){
            for(int j=0; j<a.length-1-i; j++){
                if( a[j]>a[j+1] ){
                    //swap elements
                    int temp = a[j];
                    a[j] = a[j+1];
                    a[j+1] = temp;
                }
            }
        }
        
        
        // output the sorted array
        System.out.println("Sorted array is");
        for(int i=0; i<a.length; i++){
            System.out.print(a[i] + " ");
        }
        
    }
}

Bubble sort code for sorting numbers in descending order

import java.util.Scanner;

public class Bubble_Desc{
    public static void sort_number_desc(){
        // input array elements
        Scanner sc = new Scanner(System.in);
        int a[] = new int[5];
        
        System.out.println("Enter five array elements");
        
        for(int i=0; i<a.length; i++){
            a[i] = sc.nextInt();
        }
        
        // sort array elements 
        for(int i=0; i<a.length; i++){
            for(int j=0; j<a.length-1-i; j++){
                if( a[j]<a[j+1] ){
                    //swap elements
                    int temp = a[j];
                    a[j] = a[j+1];
                    a[j+1] = temp;
                }
            }
        }
        
        
        // output the sorted array
        System.out.println("Sorted array is");
        for(int i=0; i<a.length; i++){
            System.out.print(a[i] + " ");
        }
        
    }
}


Bubble sort code for sorting strings in ascending order

import java.util.Scanner;

public class Bubble_Asc_Strings{
    public static void sort_string_asc(){
        // input array elements
        Scanner sc = new Scanner(System.in);
        String a[] = new String[5];
        
        System.out.println("Enter five array elements");
        
        for(int i=0; i<a.length; i++){
            a[i] = sc.next();
        }
        
        // sort array elements
        for(int i=0; i<a.length; i++){
            for(int j=0; j<a.length-1-i; j++){
                if( a[j].compareTo(a[j+1])>0 ){
                    //swap elements
                    String temp = a[j];
                    a[j] = a[j+1];
                    a[j+1] = temp;
                }
            }
        }
        
        
        // output the sorted array
        System.out.println("Sorted array is");
        for(int i=0; i<a.length; i++){
            System.out.print(a[i] + " ");
        }
        
    }
}
        
        

Bubble sort code for sorting strings in descending order

import java.util.Scanner;

public class Bubble_Desc_Strings{
    public static void sort_string_desc(){
        // input array elements
        Scanner sc = new Scanner(System.in);
        String a[] = new String[5];
        
        System.out.println("Enter five array elements");
        
        for(int i=0; i<a.length; i++){
            a[i] = sc.next();
        }
        
        // sort array elements
        for(int i=0; i<a.length; i++){
            for(int j=0; j<a.length-1-i; j++){
                if( a[j].compareTo(a[j+1])<0 ){
                    //swap elements
                    String temp = a[j];
                    a[j] = a[j+1];
                    a[j+1] = temp;
                }
            }
        }
        
        
        // output the sorted array
        System.out.println("Sorted array is");
        for(int i=0; i<a.length; i++){
            System.out.print(a[i] + " ");
        }
        
    }
}

Youtube video link explaining the above code is



 











        
             
                
        

Monday, 10 July 2023

Java - Class based program

 Program 1 - Eshop




import java.util.*;

class Eshop {
    String name;
    double price;
    
    void accept(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter name and price");
        name = sc.next();
        price = sc.nextDouble();
    }
    
    void calculate(){
        if (price >= 1000 && price <=25000)
            price = price - 0.05 * price;
        else if (price >= 25001 && price <= 57000)
            price = price - (7.5/100.0) * price;
        else if (price >=57001 && price <= 100000)
            price = price - (10/100.0) * price;
        else 
            price = price - (15.0/100.0) * price;
    }
    
    void display(){
        System.out.println("name = " + name);
        System.out.println("net amount to be paid = " + price);
    }
    
    public static void main(){
        Eshop obj = new Eshop();
        obj.accept();
        obj.calculate();
        obj.display();
    }
}

/* Variable Description Table

Variable        Type        Use
name            String      to store name of product
price           double      to store price of product

*/


 Program 2 - CabService



    
import java.util.Scanner;

class CabService{
    // member variables
    
    String car_type;
    double km;
    double bill;
    
    // member methods
    
    CabService(){
        car_type = "";
        km = 0.0;
        bill = 0.0;
    }
    
    void accept(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter car_type and km");
        car_type = sc.nextLine();
        km = sc.nextDouble();
    }
    
    void calculate(){
        if (car_type.equals("AC CAR"))
        {
            if (km<=5){
                bill = 150;
            }
            else {
                bill = 150 + (km - 5) * 10;
            }
        }
        else if (car_type.equals("NON AC CAR"))
        {
            if (km<=5) {
                bill = 120;
            }
            else {
                bill = 120 + (km - 5) * 8;
            }
        }
    }
    
    void display (){
        System.out.println("CAR TYPE: " + car_type);
        System.out.println("KILOMETER TRAVELLED: " + km);
        System.out.println("TOTAL BILL: " + bill);
        
    }
    
    public static void main(){
        CabService obj = new CabService();
        obj.accept();
        obj.calculate();
        obj.display();
    }
}

/*

Variable    Datatype    Usage
car_type    String      used to store cartype
km          double      used to store kilometre
bill        double      used to store bill amount
obj         CabService  object used to invoke methods

*/
      

Program 3 - employee


import java.util.Scanner;
class employee{
    // member variables
    
    int eno;
    String ename;
    int age;
    double basic;
    double net;
    
    // member methods
    
    void accept(){
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter eno, ename, age, basic salary");
        eno = sc.nextInt();
        ename = sc.next();
        age = sc.nextInt();
        basic = sc.nextDouble();
    }
    
    void calculate(){
        double hra = 18.5/100.0 * basic;
        double da = 17.45/100.0 * basic;
        double pf = 8.10/100.0 * basic;
        net = basic + hra + da - pf;
        // net = basic + (18.5/100.0*basic) + (17.45/100.0 * basic) - (8.10/100.0 * basic);
        if (age > 50)
        {
            net = net + 5000;
        }
    }
    
    void print(){
        System.out.println("eno \t ename \t age \t basic \t net");
        System.out.println(eno + "\t" + ename + "\t" + age +
                           "\t" + basic + "\t" + net );
     }
     
     public static void main(){
         employee obj = new employee();
         obj.accept();
         obj.calculate();
         obj.print();
        }
    }

/* Variable description table

Variable    Datatype    Usage
eno         int         used to store employee no
ename       String      used to store name
age         int         used to store age
basic       double      used to store basic salary
net         double      used to store net salary

*/
         

Explanation of above code can be found at


                    

        

        

        

        

        

        

        

    

  

        
        
    
        
        
        
        
        
        
    
    
    
    
    
    
     
    
    
    
    
    
    
        
        

How to connect Raspberry Pi Pico to a external temperature sensor(DHT11 or DHT22)

How to connect Raspberry Pi to DHT 11 / DHT 22   Connect your DHT11 sensor to the Pico accordingly -   Left pin (Signal) - GPIO Pin 22 (or a...