Das Open-Control-Projekt - Die Alternative zur C-Control-I


Das Forum zur C-Control-1
Welche C-Control-Varianten existieren?
Übersicht - Suchen - Neueste 50 Beiträge - Neuer Beitrag - Login - Registrieren
INFO - FAQ - CC2-Forum - CCPro-Forum 

 C-Control II Station Kategorie: C-Control I V1.1 (von Bram Vooys - 23.04.2006 21:21)
To everybody,

I am currently using the (new) C-Control II Station and I want to put the results from the AD conversion to the RS232 and present it to a terminal.
For some reason I can not get it to work, what am I doing wrong?
Any suggestion are welcom.  


// C-Control II Station
//------------
  thread main
//------------
{
  float  voltage;
  string output;
  string v,s, s1;
  station_lcd.init();
  station_io.init();
  hwcom.init();
  hwcom.setspeed(5); //9600 Baud
  loop
  {
    voltage = ports.adc(0) * 0.004;  // 4 mV per ADC Digit
    station_lcd.cursorpos(1,0);
    output = "U = ";
    str.putfloatf (output, voltage, 3);
    s1 = " Waarde " ;
    hwcom.send (s1,10);

//  I wil send this to a terminal and read it.

    hwcom.send (voltage, 3); // this not working

    station_lcd.print(output);
    v = " VOLT ";
    station_lcd.print(v);
    station_lcd.cursorpos(2, 0);
    s = "AD conversie";
    station_lcd.print(s);
    sleep 10;
  }
}

Bram

 Antwort schreiben

Bisherige Antworten:

Re: C-Control II Station (von Dietmar - 28.04.2006 14:29)