Documente Academic
Documente Profesional
Documente Cultură
Workshop on Arduino
DAY - II
ROBOT WITH
Problem Statement #1
Clue 2
Modify Line follower code by adding time based logic.
Clue 3
Time taken to reach Line is greater at corners.
Clue 4
The robot should follow the outer edge of the track.
PWM
(Pulse Width Modulation)
Pulse Width Modulation
There are 3 PWM pins available on the
Arduino Board – Pins 9,10,11.
Parameters:
pin: the pin to write to.
value: the duty cycle: between 0 (always off) and 255
(always on). [8-bit]
Clue 2:
Ic / Oc = r /(r + x)
Clue 3:
Speed = d / t
d1 / d2 = Ic / Oc
INTERRUPTS
Interrupts
attachInterrupt(interrupt, function, mode)
Interrupt:
0 for pin number 2
1 for pin number 3
Mode:
LOW
RISING
FALLING
CHANGE
Function:
Is the switching function that is called when interrupt is triggered.
SUMO Robot
Competition
Rules & Regulations:
Robot should stay in the arena at any
instant of time.
If not, you will be disqualified.
Jayasurya Dutt
js@li2-innovations.com
9951234593