Button LED Buzzer Introduction of Button We have

  • Slides: 13
Download presentation

Button, LED & Buzzer

Button, LED & Buzzer

Introduction of Button • We have one push button on m. Core board •

Introduction of Button • We have one push button on m. Core board • The button is an input device • You can use this button to start the m. Bot via programming or can be use as mode changing button to operate m. Bot in different modes • You can use button as counter • It has two values pressed and released

Detecting Incidents with Button In above program we have made one variable to store

Detecting Incidents with Button In above program we have made one variable to store value of button state , if button is pressed it will store value as pressed otherwise value will be stored as released

Introduction to LED • On m. Core board we have two RGB LED’s •

Introduction to LED • On m. Core board we have two RGB LED’s • RGB LED is a output device • The RGB LED can output light of any colour through the combination of Red, Green and Blue • One colour has range from 0 -255 • So total 256*256 colour combination you can do usingle RGB LED

Simple program to generate different colours using RGB LED • In above program m.

Simple program to generate different colours using RGB LED • In above program m. Bot we show different colours using RGB LED’s

Introduction to Buzzer • On m. Core board we have one piezo buzzer(piezo means

Introduction to Buzzer • On m. Core board we have one piezo buzzer(piezo means small) • Buzzer is output device • Buzzer can control the output frequency so as to give different tones • You can use buzzer to indicate some actions using sound • Examples are alarm, piano, warning sound.

Simple program to play sound if button is pressed

Simple program to play sound if button is pressed

Let’s see some examples with combination of LED, Buzzer & Button 1. Hand Presses

Let’s see some examples with combination of LED, Buzzer & Button 1. Hand Presses the Alarm When user presses the button stop the alarm

2. Play music & show colour together On m. Bot start’s up it well

2. Play music & show colour together On m. Bot start’s up it well show colour & make sound together

3. Dancing Robot In this program we have used motors to turn m. Bot

3. Dancing Robot In this program we have used motors to turn m. Bot in left & right direction so that it will look like m. Bot is dancing

4. Counter using Button Using button make counter and perform different action by pressing

4. Counter using Button Using button make counter and perform different action by pressing button

Thank You!

Thank You!