Wednesday, April 29, 2020

Microphone noice cancelation in ubantu

This will help to remove background noise when you record, usually in windows with Realtek audio do this job perfectly. but in ubuntu we gonna do it as follows, 

1. Open Nano editor,

        $  sudo nano /etc/pulse/default.pa

2. Now move down to any lines and add the following line to enable Noise cancellation module.

         $  load-module module-echo-cancel

3. Restart Pulse Audio for Noise Cancelling Linux System 
          $ pulseaudio -k 
          $ pulseaudio --start

4.
Set Default Sound Device





Friday, April 17, 2020

ECG singanal simulation using MATLAB

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 h=input('Input your heart rate (in beats per minute)= ');
 p=input('Input desired Peak voltage(in mV)= ');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%t1=10;
% t1=10 seconds is preferred to enable us have clearer RR tachograms.
% indicates the duration
x1 = p*ecg(6000).' ;
% denoising ecg signals with savitsky-golay filter for us to
% get noiseless or ideal ECG
y1 = sgolayfilt(kron(ones(1,19),x1),0,25);
m = round(h/6);
disp('Number of heart beats per 10 seconds=' )
m
            if h <= 105;
            if m==5;
                n1=32000;
            elseif m==6;
                n1=37000;
                m==7;
                n1=43000;
            elseif m==8;
                n1=49000;
            elseif m==9;
                n1=55000;
            elseif m==10;
                n1=60000;
            elseif m==11;
                n1=66000;
            elseif m==12;
                n1=75000;
           elseif m==13;
                n1=80000;
           elseif m==14;
                n1=85100;
           elseif m==15;
                n1=92000;
            elseif m==16;
                n1=98000;
            else m==17;
                n1=100000;
end
else disp('Heart Rate input exceeds limit')
        end
        n = 1:n1;
        del = round(6000*rand(1));
        mhb = y1(n + del);
        t= linspace(0,t1,n1);
        colordef white;
        plot(t,mhb, 'g');
        q=p+0.5;
        axis([0 t1 -q q]);
        grid; xlabel('Time [sec]');
        ylabel('Voltage [mV]');
        title('Artificial Electrocardiogram');
        legend('Isoelectric line');
       


Saturday, April 11, 2020

Remap any Key on Keyboard

My laptop continuously  pressed "End" key due to some hardware fault , but I don't want to change keyboard right now, I'll disable "End" key and enjoy using same keyboard … :D

1. Download SharpKeys 
2. Install as system administrator
3. Run SharpKeys
4. Disable "End" key
5. Write to registry
6. restart

Reference : https://aboutdevice.com/how-to-disable-keys-on-laptop-keyboard/
                 : https://github.com/randyrants/sharpkeys/releases


Friday, April 3, 2020

Node MCU Arduino IDE in Ubantu

Install Arduino IDE on Ubuntu

1. Download Arduino linuxIDE from https://www.arduino.cc/en/main/software
2. Extract it (tar xvf FILENAME)and Runit (./install.sh)

USB Serial Port Setup

In order to upload code an arduino board over USB, you need to add your user to the `dailout` group and connect the snap to the `raw-usb` socket. Open a terminal window, run the following commands an *reboot* your computer.

> `sudo usermod -a -G dialout $USER`

> `sudo snap connect arduino:raw-usb`

Now restart your computer and you're good to go!

NodeMCU on Arduino IDE

1. Open IDE
File>Preferances>AdditionalBoardManagerUrls>
Enter==>http://arduino.esp8266.com/stable/package_esp8266com_index.json
2. Tools>Boards>Board Manager>
select ESP2266 then update


Reference 1: https://ubuntu.com/tutorials/install-the-arduino-ide#2-installing-via-a-tarball
Reference 2: https://www.instructables.com/id/Quick-Start-to-Nodemcu-ESP8266-on-Arduino-IDE/
http://arduino.esp8266.com/stable/package_esp8266com_index.json

Search This Blog