Adam zvukograf.nxc

From RoboWiki
Revision as of 10:18, 26 March 2008 by Palo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Krúžok Robotiky

/* adam_zvukograf.nxc

  Robot ma pripojeny zvukovy snimac na porte 1 a program vykresli
  graf hlasitosti zvuku.
  
  Autor: Adam Trizuljak
*/


task main()
{
int dB; //premenna dB
int x;  //premenna x
 for(x=0; x<=100; x++) // slucka ,,pri kazdom novom ,kole´ pricitaj k cas 1, kym cas nebude mensi alebo rovny ako 100"
 {
 SetSensorSound(S1); //nastav port S1 na zvukovy senzor
 dB = SENSOR_1; // dB = hornota zo senzora [dB]
 PointOut(x, dB); //na LCD nakresli bod podla x a dB
 }
}