Différences entre versions de « Arduino Robot-Librairie »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 1 : Ligne 1 :
 
{{Arduino-Robot-NAV}}
 
{{Arduino-Robot-NAV}}
 +
 +
== La librairie Robot ==
 +
The Robot library is included with Arduino IDE 1.0.5 and later.
 +
 +
The Robot has a number of built in sensors and actuators. The library is designed to easily access the robot's functionality.
 +
 +
The robot has two boards, a motor board and control board. Each borad has a separate programmable processor.
 +
 +
The library allows you to interface with the various sensors and peripherals on the control board :
 +
 +
* potentiometer
 +
* 5 momentary switches
 +
* 160x120 pixel color screen
 +
* 512Kbit EEPROM
 +
* speaker
 +
* compass
 +
* 3 I2C connectors
 +
* 8 TinkerKit input connectors
 +
 +
The library also enables you to do a number of things with the motor board :
 +
 +
* control motor speed and direction
 +
* sense the current used by each motor
 +
* read the state of the 5 floor sensors (also known as line detection sensors)
 +
* access I/O pins on the board
 +
* control an I2C port
 +
* read the state of 4 TinkerKit inputs
 +
 +
For more information about the Robot, visit the [[Arduino Robot-Guide démarrage|Guide Démarrage]] et [[Arduino Robot|la présentation matérielle]].
 +
 +
== Library structure
 +
 +
This library enables easy access to the functionality of the [http://mchobby.be/PrestaShop/product.php?id_product=308 Arduino Robot]. It relies on a number of 3rd party libraries including [https://code.google.com/p/fat16lib/ Fat16], [https://github.com/madsci1016/Arduino-EasyTransfer EasyTransfer], [https://github.com/stg/Squawk Squawk], and [https://github.com/shirriff/Arduino-IRremote IRRemote]. It also relies on a number of Arduino libraries like [http://arduino.cc/en/Reference/TFTLibrary TFT], [http://arduino.cc/en/Reference/SPI SPI] et [http://arduino.cc/en/Reference/Wire Wire]. Their functionality has been replicated inside the robot's library to optimize the code's size.
 +
 +
It is possible to program both the Control and the Motor boards. However, it is recommended that novice programmers begin with programming the control board, leaving the motor board for later. The library exposes the sensors on both boards through a single object.
 +
 +
There are two main classes that command the robot:
 +
 +
* RobotControl: commands the Control Board as well as the I/Os and motors on the Motor Board, when running the default firmware.
 +
 +
* RobotMotor: commands the Motor Board. Use it to make your own custom version of the Motor Board firmware
 +
 +
== Exemples ==
 +
 +
Voici quelques exemples pour illustrer les possibilités du robot et vous aider à démarrer rapidement avec les fonctionnalités de base.
 +
 +
* [http://arduino.cc/en/Tutorial/RobotLogo Logo] <small>''arduino.cc''</small> - tell your robot where to go through the on-board keyboard
 +
* [http://arduino.cc/en/Tutorial/RobotLineFollowing Line Following] <small>''arduino.cc''</small> - draw a racing track and get your robot to run on it
 +
* [http://arduino.cc/en/Tutorial/RobotDiscoBot Disco Bot] <small>''arduino.cc''</small> - turn your robot into an 8-bit jukebox and dance to the beat
 +
* [http://arduino.cc/en/Tutorial/RobotCompass Compass] <small>''arduino.cc''</small> - plan a treasure hunt with this digital compass
 +
* [http://arduino.cc/en/Tutorial/RobotInputs Inputs] <small>''arduino.cc''</small> - learn how to control the knob and the keyboard
 +
* [http://arduino.cc/en/Tutorial/RobotWheelCalibration Wheel Calibration] <small>''arduino.cc''</small> - tune the wheels to perform even better
 +
* [http://arduino.cc/en/Tutorial/RobotRunawayRobot Runaway Robot] <small>''arduino.cc''</small> - play tag with your robot using a distance sensor
 +
* [http://arduino.cc/en/Tutorial/RobotRemoteControl Remote control] <small>''arduino.cc''</small> - reuse that old tv-remote to command the bot on distance
 +
* [http://arduino.cc/en/Tutorial/RobotPictureBrowser Picture browser] <small>''arduino.cc''</small> - want to use your own images? This is how
 +
* [http://arduino.cc/en/Tutorial/RobotRescue Rescue] <small>''arduino.cc''</small> - train your robot to look for hidden pearls in a maze
 +
* [http://arduino.cc/en/Tutorial/RobotHelloUser Hello User] <small>''arduino.cc''</small> - hack the robot's welcome demo and make your own
 +
 +
== Autre ==
  
 
Les liens vers les noms de fonction doivent commencer par "RB-ARD-ROBOT-Func-" avec comme exemple RB-ARD-ROBOT-Func-digitalRead pour Robot.digitalRead()
 
Les liens vers les noms de fonction doivent commencer par "RB-ARD-ROBOT-Func-" avec comme exemple RB-ARD-ROBOT-Func-digitalRead pour Robot.digitalRead()

Version du 14 septembre 2013 à 18:56


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

La librairie Robot

The Robot library is included with Arduino IDE 1.0.5 and later.

The Robot has a number of built in sensors and actuators. The library is designed to easily access the robot's functionality.

The robot has two boards, a motor board and control board. Each borad has a separate programmable processor.

The library allows you to interface with the various sensors and peripherals on the control board :

  • potentiometer
  • 5 momentary switches
  • 160x120 pixel color screen
  • 512Kbit EEPROM
  • speaker
  • compass
  • 3 I2C connectors
  • 8 TinkerKit input connectors

The library also enables you to do a number of things with the motor board :

  • control motor speed and direction
  • sense the current used by each motor
  • read the state of the 5 floor sensors (also known as line detection sensors)
  • access I/O pins on the board
  • control an I2C port
  • read the state of 4 TinkerKit inputs

For more information about the Robot, visit the Guide Démarrage et la présentation matérielle.

== Library structure

This library enables easy access to the functionality of the Arduino Robot. It relies on a number of 3rd party libraries including Fat16, EasyTransfer, Squawk, and IRRemote. It also relies on a number of Arduino libraries like TFT, SPI et Wire. Their functionality has been replicated inside the robot's library to optimize the code's size.

It is possible to program both the Control and the Motor boards. However, it is recommended that novice programmers begin with programming the control board, leaving the motor board for later. The library exposes the sensors on both boards through a single object.

There are two main classes that command the robot:

  • RobotControl: commands the Control Board as well as the I/Os and motors on the Motor Board, when running the default firmware.
  • RobotMotor: commands the Motor Board. Use it to make your own custom version of the Motor Board firmware

Exemples

Voici quelques exemples pour illustrer les possibilités du robot et vous aider à démarrer rapidement avec les fonctionnalités de base.

  • Logo arduino.cc - tell your robot where to go through the on-board keyboard
  • Line Following arduino.cc - draw a racing track and get your robot to run on it
  • Disco Bot arduino.cc - turn your robot into an 8-bit jukebox and dance to the beat
  • Compass arduino.cc - plan a treasure hunt with this digital compass
  • Inputs arduino.cc - learn how to control the knob and the keyboard
  • Wheel Calibration arduino.cc - tune the wheels to perform even better
  • Runaway Robot arduino.cc - play tag with your robot using a distance sensor
  • Remote control arduino.cc - reuse that old tv-remote to command the bot on distance
  • Picture browser arduino.cc - want to use your own images? This is how
  • Rescue arduino.cc - train your robot to look for hidden pearls in a maze
  • Hello User arduino.cc - hack the robot's welcome demo and make your own

Autre

Les liens vers les noms de fonction doivent commencer par "RB-ARD-ROBOT-Func-" avec comme exemple RB-ARD-ROBOT-Func-digitalRead pour Robot.digitalRead()

Robot.digitalRead()

Robot.digitalWrite()

Robot.analogRead()

Robot.motorsWrite()



Source: Arduino Robot, getting started with the Arduino Robot, the Robot's library pages. Crédit: Arduino.cc, licence Creative Common Attribution ShareAlike.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.