Pages: [1]   Go Down
Author Topic: Arduino Leonardo ERROR compilling on WIN XP and WIN 7  (Read 439 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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;
.
.
.
.
.




« Last Edit: August 07, 2012, 03:47:47 am by xrosas » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Rename
Code:
//#define clock 8
//#define data 9
//#define dimm 10
For
Code:
const int clock= 8;
const int data= 9;
const int dimm= 10;
And eliminate Serial.begin(9600);

works
Logged

Pages: [1]   Go Up
Jump to: