Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Arduino Robotics workshop day2


Published on

Slides from my Arduino robotic workshop

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Arduino Robotics workshop day2

  1. 1. Arduino Robotics Workshop Day 2 Sudar Muthu (@sudarmuthu)
  2. 2. 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 run 2
  3. 3. 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 stuff 3
  4. 4. Varying the speed of the motor using PWM 4
  5. 5. Playing tones in the buzzer 5
  6. 6. Playing sound We can generate a square wave at specified frequency using tone() function Usage: tone(pin, frequency, duration) 6
  7. 7. 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
  8. 8. Let’s see some code 8
  9. 9. Let’s get some food  9
  10. 10. What are the limitations that we have faced so far? 10
  11. 11. Using Delay 11
  12. 12. Issues with delay Your microcontroller is going to sleep You can’t read or write while in delay Eg: You can’t detect an obstacle when the bot is making a turn 12
  13. 13. How to fix it? 13
  14. 14. Using Timer library 14
  15. 15. If we don’t read the pin, then we miss the value 15
  16. 16. 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(); 16
  17. 17. Interrupts 17
  18. 18. Hardware support Pin 2 and 3 Supports LOW, CHANGE, RISING, FALLING No software support is needed Can be removed as well 18
  19. 19. Let’s see some code 19
  20. 20. What if we need it on other pins? 20
  21. 21. Software Interrupts 21
  22. 22. Can be used on any pin 22
  23. 23. Let’s see some code 23
  24. 24. 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 RF 24
  25. 25. Things I have tried Controlled it using Android phone Controlled it using JavaScript and WebSockets Controlled it using Bluetooth Controlled it using RF Added a missile launcher to it 25
  26. 26. Links Arduino – Asimi – A simple bot using Arduino Getting started with hardware programming hardware-programming Getting started with Arduino arduino-and-avr
  27. 27. Questions Thank You Sudar Muthu (@sudarmuthu)