buffer in serial comm


hello :)

i'm sending data arduino program on borland builder c++ , graphing it. there problems, , want send on buffer on arduino.
there wrong code , i'm not being able find problem is.
the code below... can see, create vector called buffer, indicated analog read, , once fulled (with 100 bytes), it's printed on screen. can same numbers, always. no matter potentiometer (which way i'm getting data of) numbers never change.

[glow]void setup() {
 serial.begin(9600);
}

void loop() {
 int buf[100], i;
   
 for (i=0; i<100; i++) {
     buf=analogread(a0);
 }
         serial.print(buf);
       delay(1000);
}[/glow]

thanks :)

you're printing 1 value, , that's invalid!
don't use a0, use 0


Arduino Forum > Forum 2005-2010 (read only) > Software > Interfacing > buffer in serial comm


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums