Difference between revisions of "EMG - PhantomX Reactor Robot"

From RobolaboWiki
Jump to: navigation, search
Line 18: Line 18:
 
<li> Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. </li>
 
<li> Download the TimerOne library from: [[http://www.robolabo.etsit.upm.es/wikiFiles/TimerOne.zip here ]]. </li>
  
<li> Uncompress the libraries to a path of your convenience. In this file you will find one folder: <b> TimerOne </b>
+
<li> Uncompress the libraries to a path of your convenience. In this file you will find one folder: <b> TimerOne </b> </li>
 
<li> Copy TimerOne folders to the libraries folder in the <ARDUINO_MAIN_DIRECTORY>. In some Windows you will find this folder in <i> My Documents\Arduino\libraries </i>, while in others you will find it in <i> Documents\Arduino\libraries </i>.
 
<li> Copy TimerOne folders to the libraries folder in the <ARDUINO_MAIN_DIRECTORY>. In some Windows you will find this folder in <i> My Documents\Arduino\libraries </i>, while in others you will find it in <i> Documents\Arduino\libraries </i>.
In Linux you will find this folder in <i>~/Arduino/libraries</i>.<br>
+
In Linux you will find this folder in <i>~/Arduino/libraries</i>.<br></li>
  
 
<b> Important: </b> If you do not have a <i>libraries</i> folder inside your <ARDUINO_MAIN_DIRECTORY>, create it and move the content inside it.
 
<b> Important: </b> If you do not have a <i>libraries</i> folder inside your <ARDUINO_MAIN_DIRECTORY>, create it and move the content inside it.

Revision as of 14:19, 24 February 2025


Timer

Note: Most of the information of this section is obtained from: https://www.prometec.net/timers/ Please refer to the previuos link and the library if you need more information.

A timer in electronics is a device or circuit used to measure and control time intervals. It generates precise delays or oscillations, making it essential in various applications like blinking LEDs, controlling motors or executing periodic events, between others.

It operates independently from the main program, allowing the microcontroller to perform other tasks simultaneously. Timers typically work by counting clock pulses from the microcontroller’s internal clock or an external source. They can be configured in various modes, such as delay generation, pulse width modulation (PWM), event counting, or frequency measurement.

Timers are configured by setting up several registers, to adjust the sampling time, durating, mode, starting, stoping,.... However, in our case, for the PhantomX React Robot, based on a AVR microcontroller, we will work with the TimerOne library.

TimerOne library

  • Download the TimerOne library from: [here ].
  • Uncompress the libraries to a path of your convenience. In this file you will find one folder: TimerOne
  • Copy TimerOne folders to the libraries folder in the <ARDUINO_MAIN_DIRECTORY>. In some Windows you will find this folder in My Documents\Arduino\libraries , while in others you will find it in Documents\Arduino\libraries . In Linux you will find this folder in ~/Arduino/libraries.
  • Important: If you do not have a libraries folder inside your <ARDUINO_MAIN_DIRECTORY>, create it and move the content inside it.

    Setting up the timer

    EMG