Not eXactly C

Not eXactly C
Not eXactly C
Influencé par C
Système d'exploitation firmware NXT Mindstorm
Site web http://bricxcc.sourceforge.net/

Le Not eXactly C (pas exactement du C) ou NXC est un langage de programmation spécifique au robot NXT basé sur le NBC, un langage assembleur. L'IDE associé à ce langage est BricxCC.

Sommaire

Historique

La première version du NXC date de 2007, année de libération de la norme NXT sous licence publique Mozilla. Son développeur, John Hansen, avait déjà mis au point le NQC pour le RCX ; il développe également l'IDE BricxCC.

Jusqu'à la version 1.26 du micro-programme, l'utilisation de nombres à virgule flottante était impossible sur le NXT, car non utilisés pour la commande des moteurs et l'acquisition des mesures de capteurs. Depuis cette version, cela est aussi possible avec le NXC.

Exemples de programmes NXC

Voici deux exemples de programmes réalisables avec le NXC, suivis de l'explication de leur effet.


task main()
{
  OnFwd(OUT_A);
  Wait(1000);
}

L'actionneur relié à la prise "A" du NXT démarre puis le programme s'arrête au bout d'une seconde.


task main()
{
  SetSensorTouch(S1);
  SetSensorLight(S2);
  OnFwd(OUT_A);
  while(SENSOR_1 == FALSE)
  {
    if(SENSOR_2 > 50)
    {
      PlayTone(440, 10);
    }
  }
}

L'actionneur relié à la prise A du NXT est démarré et le type des capteurs 1 et 2 est défini ; si l'on met le capteur 2 (capteur de luminosité) devant une source de lumière, le NXT produit une tonalité (de fréquence 440 Hz donc un la3) durant 10 millisecondes. L'appui sur le capteur 1 (capteur de contact) provoque l'arrêt du programme.


Voir aussi

Articles connexes

Liens externes

Références



Wikimedia Foundation. 2010.

Contenu soumis à la licence CC-BY-SA. Source : Article Not eXactly C de Wikipédia en français (auteurs)

Игры ⚽ Поможем написать реферат

Regardez d'autres dictionnaires:

  • Not eXactly C — Not eXactly C, or NXC, is a high level programming language for the Lego Mindstorms NXT. NXC, which is short for Not eXactly C, is based on Next Byte Codes, an assembly language. NXC has a syntax like C. The IDE for NXC is the Bricx Command… …   Wikipedia

  • not exactly — BY NO MEANS, not at all, in no way, certainly not; not really. → exactly * * * informal 1) not at all that was not exactly convincing 2) not quite but close to being not exactly agitated, but disturbed * * * not exactly informal 1 used in speech …   Useful english dictionary

  • not exactly — spoken 1) used for saying that something is slightly different from a particular thing It s not exactly a novel, more an extended short story. 2) used for saying that something that someone says is not completely right You re leaving, aren t you? …   English dictionary

  • not exactly — I m not exactly a spring chicken Syn: by no means, not at all, in no way, certainly not; not really …   Thesaurus of popular words

  • not the sharpest knife in the drawer — not the sharpest knife in the ˈdrawer | not the sharpest tool in the ˈbox idiom (informal, humorous) not intelligent • He s not exactly the sharpest knife in the drawer, is he? Main entry: ↑sharp …   Useful english dictionary

  • not the sharpest tool in the box — not the sharpest knife in the ˈdrawer | not the sharpest tool in the ˈbox idiom (informal, humorous) not intelligent • He s not exactly the sharpest knife in the drawer, is he? Main entry: ↑sharp …   Useful english dictionary

  • not be a barrel of laughs — (not) be a barrel of laughs informal to not be enjoyable. He s a bit serious, isn t he? Yeah, not exactly a barrel of laughs …   New idioms dictionary

  • not necessarily — not certainly, actually no, not exactly …   English contemporary dictionary

  • not really — not exactly, not necessarily …   English contemporary dictionary

  • not be backward in coming forward — (not) be backward in coming forward British & Australian, humorous to be confident and always ready to express an opinion. If he doesn t like it, he ll tell you. He s not exactly backward in coming forward …   New idioms dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”