What we have seen so far? Basics of Robotics Using Breadboard Digital and Analog I/P and O/P Serial Communication Controlling DC Motors Assembled the robot Made it runhttp://hardwarefun.com 2
Today we will see.. Varying the speed of the motor Play some tunes using the buzzer How IR works Making use of IR to find obstacles Make the bot avoid strangers Making it autonomous Some Advanced stuffhttp://hardwarefun.com 3
Varying the speed of the motor using PWMhttp://hardwarefun.com 4
Playing tones in the buzzerhttp://hardwarefun.com 5
Playing sound We can generate a square wave at specified frequency using tone() function Usage: tone(pin, frequency, duration)http://hardwarefun.com 6
Teaching robot to avoid strangers Two IR LED’s. One receiver, one transmitter Both face the same direction Keep transmitting IR waves If receiver receives waves, then there is a obstacle Otherwise keep moving
Using Timer library https://github.com/JChristensen/Timerhttp://hardwarefun.com 14
If we don’t read the pin, then we miss the valuehttp://hardwarefun.com 15
Methods in Timer library every(long period, callback); after(long duration, callback); oscillate(int pin, long period, int startingValue); pulse(int pin, long period, int startingValue); update();http://hardwarefun.com 16
Some ideas to try Making your robot follow a line Making your robot stay in a table Replace IR with ultrasound sensor Control the bot remotely using RFhttp://hardwarefun.com 24
Links Arduino – http://arduino.cc Asimi – A simple bot using Arduino http://hardwarefun.com/project/asimi Getting started with hardware programming http://hardwarefun.com/tutorials/getting-started-with- hardware-programming Getting started with Arduino http://hardwarefun.com/tutorials/getting-started-with- arduino-and-avr
Questions Thank You Sudar Muthu (@sudarmuthu) http://hardwarefun.com/arduino-workshophttps://github.com/sudar/arduino-robotics-workshop
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.