Go Down

Topic: Arduino Leonardo ERROR compilling on WIN XP and WIN 7 (Read 471 times) previous topic - next topic

xrosas

Aug 07, 2012, 10:32 am Last Edit: Aug 07, 2012, 10:47 am by xrosas Reason: 1
ERROR compilling.
In file included from D:\arduino\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/HardwareSerial.h:66,
                from D:\arduino\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/Arduino.h:193,
                from ultraS_2dig.cpp:5:
D:\arduino\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/USBAPI.h:158: error: expected ',' or '...' before numeric constant
D:\arduino\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/USBAPI.h:188: error: expected ',' or '...' before numeric constant
D:\arduino\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino/USBAPI.h:189: error: expected ',' or '...' before numeric constant
Code: [Select]
define clock 8
#define data 9
#define dimm 10

const int VIS1=11;

#include <Ultrasonic.h>
Ultrasonic ultrasonic(4,5);
int distancia = 0;
int distancia_ = 0;
int Mdistancia = 0;
int o_chan = 0;
int led = 13;
int brillo = 250;


int segs[10] ={63, 6, 91, 79, 102, 109, 124, 07, 127, 103};
int unidade = 0;
int decena = 0;
byte punto = B10000000;
byte nada = B00000000;


void setup()
{
  pinMode(VIS1, OUTPUT);  // VIS1
  pinMode(clock, OUTPUT);
  pinMode(data , OUTPUT);
  pinMode(dimm , OUTPUT);

  pinMode(led , OUTPUT);

  analogWrite(dimm, brillo);
  Serial.begin(9600);


  axuste();

   Serial.println("Preparado");

  if ( o_chan > 99) digitalWrite(VIS1, HIGH);
    else digitalWrite(VIS1, LOW);

  distancia = o_chan;        //só para poder pintalo
  pinta();

  delay(1000);
           
  atenua();
 
}

 
void loop()
{
  distancia_ = distancia;
.
.
.
.
.






xrosas

Rename
Code: [Select]
//#define clock 8
//#define data 9
//#define dimm 10

For
Code: [Select]
const int clock= 8;
const int data= 9;
const int dimm= 10;

And eliminate Serial.begin(9600);

works

Go Up