PIC16F877a/PIC16F****/PIC18F**** interface Vibration sensor module using ADC Pin. Mini Project.

Опубликовано: 18 Март 2026
на канале: Learning Microcontrollers
675
18

Guys, My lectures are free for everyone.
If you want to support my channel, then become a Youtube member by following link below:

   / @learningmicrocontrollers3561  

Seek knowledge from the cradle to the grave
/// /////////////////////////////////////////////////////**********************************///////////////////////////////// Hello guys,
Welcome to Learning Microcontrollers youtube Channel,

Guys I have also compiled course on Udemy as well. Where you will learn under my direct supervision in a more supervised way.
Here is the links to the courses I have on Udemy, By taking any of these courses you will be supporting my channel aswell.
This will help me to make more videos with better hardware in the future. I hope you look forward to it.
Courses Links:

1- https://www.udemy.com/course/pic16f87...
2- https://www.udemy.com/course/mikroc-f...
3- https://www.udemy.com/course/mikroc-f...
4- https://www.udemy.com/course/pic-micr...
5- https://www.udemy.com/course/learn-ar... ///////////////////////////////////////////////////// Hello Folks, welcome to learning microcontrollers, this video is about interfacing a very cheap and easily available vibration sensor module with PIC microcontroller.
you can request the code by emailing me at:
[email protected]

Become a Patreon and support my channel using link below:
https://patreon.com/user?u=81261678


In code below replace ( greater than sign ) with grater than sign as in video. beacuse youtube dont allow entering it in description.
MikroC programming is as under:
int vibrate;
void main() {
TRISB = 0x00;
PORTB = 0x00;
Delay_ms(100);

ADC_init();
delay_ms(500);

while(1)
{
vibrate = ADC_Read(0);
Delay_ms(150);

if ( vibrate ( write here greater than sign as in video ) 800 )
{
PORTB = 0xff;
Delay_ms(100);
}
else
{
PORTB = 0x00;
delay_ms(100);
}

}
}