To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.loc.itOpen lugnet.loc.it in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Local / Italia / 1013
1012  |  1014
Subject: 
Re: Regolamento.
Newsgroups: 
lugnet.loc.it
Date: 
Tue, 18 Jan 2000 21:04:51 GMT
Viewed: 
524 times
  
In lugnet.loc.it, Carlo Ottolina writes:
"Mario Ferrari" <mario.ferrari@edis.it> wrote in message
news:FoIxCy.vE@lugnet.com...
// Dragster
// ========

task main()
{
  // configura sensore di luce su porta 1
  SetSensor(SENSOR_1,SENSOR_LIGHT);

  // dimensiona datalog
  CreateDatalog(5);

  // attende di essere posizionato sulla linea di partenza
  while (SENSOR_1<SOGLIA);


Credo sia necessario inserire qui il codice per impedire che il dragster
possa essere spinto *oltre* la linea.
Era questo che intendevo con "braccia lunghe".........


  // sulla linea, pronti al via tra 5 secondi
  Wait(100); PlayTone(440,5);
  Wait(100); PlayTone(440,5);
  Wait(100); PlayTone(440,5);
  Wait(100); PlayTone(440,5);
  Wait(100); PlayTone(880,5);


Probabilmente basta inserire un'ultimo test prima della partenza, che viene
annullata se il dragster non è più sulla linea bianca:

  // test se posizione di partenza corretta
  if (SENSOR_1<SOGLIA)
  {
    // partenza annullata
    PlayTone(220,1);
    StopAllTasks();
  }

  // via!! corre e perde (il tuo) ;-))))

  StartTimer();
  OnFwd(OUT_A+OUT_B+OUT_C);

  ...

Ciao
Mario



Message is in Reply To:
  Re: Regolamento.
 
"Mario Ferrari" <mario.ferrari@edis.it> wrote in message news:FoIxCy.vE@lugnet.com... (...) Credo sia necessario inserire qui il codice per impedire che il dragster possa essere spinto *oltre* la linea. Era questo che intendevo con "braccia (...) (24 years ago, 18-Jan-00, to lugnet.loc.it)

19 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR