I'm having some compile-problems with my program for the chipKIT MAX32. I'm using the mpide compiler.
First of all, the errors lines , as stated below, I'm getting don't give the right line numbers, to my knowledge.
But nonetheless I can suppose wich lines are meant by the errors.
Second, I do'nt understand why these kind of errors where given.
Can somebody help me out?
PS: the line numbers start with the first bar of code.
Thanks in advance.
sketch_oct27b.cpp:53:15: error: expected unqualified-id before numeric constant
sketch_oct27b.cpp:53:15: error: expected ')' before numeric constant
sketch_oct27b.cpp: In function 'void setup()':
sketch_oct27b.cpp:71:3: error: 'lcd' was not declared in this scope
sketch_oct27b.cpp: In function 'void loop()':
sketch_oct27b.cpp:120:27: error: lvalue required as left operand of assignment
sketch_oct27b.cpp:121:28: error: lvalue required as left operand of assignment
#include <LiquidCrystal.h>
const int vtnr1 = 1;
const int vtnr2 = 2;
const int vtnr3 = 4;
const int vtnr4 = 8;
const int vtnr5 = 16;
const int vnr1 = 1+32;
const int vnr2 = 2+32;
const int vnr3 = 4+32;
const int vnr4 = 8+32;
const int vnr5 = 16+32;
int vtnr1Toestand = 0;
int vtnr2Toestand = 0;
int vtnr3Toestand = 0;
int vtnr4Toestand = 0;
int vtnr5Toestand = 0;
int vnr1Toestand = 0;
int vnr2Toestand = 0;
int vnr3Toestand = 0;
int vnr4Toestand = 0;
int vnr5Toestand = 0;
byte hkvtnrToestand = B00000000;
byte hkvnrToestand = B00100000;
int ahkvnrToestand;
int ahkvtnrToestand;
const int vtnr1Pin = 40;
const int vtnr2Pin = 41;
const int vtnr3Pin = 42;
const int vtnr4Pin = 43;
const int vtnr5Pin = 44;
const int vnr1Pin = 45;
const int vnr2Pin = 46;
const int vnr3Pin = 47;
const int vnr4Pin = 48;
const int vnr5Pin = 49;
const int ledpin1 = 13;
LiquidCrystal(12, 11, 10, 9, 8, 7, 6);
void setup()
{
pinMode(vtnr1Pin, INPUT);
pinMode(vtnr2Pin, INPUT);
pinMode(vtnr3Pin, INPUT);
pinMode(vtnr4Pin, INPUT);
pinMode(vtnr5Pin, INPUT);
pinMode(vnr1Pin, INPUT);
pinMode(vnr2Pin, INPUT);
pinMode(vnr3Pin, INPUT);
pinMode(vnr4Pin, INPUT);
pinMode(vnr5Pin, INPUT);
pinMode(ledpin1, OUTPUT);
lcd.begin(16,2);
}
void loop()
{
vtnr1Toestand = digitalRead(vtnr1Pin);
if(vtnr1Toestand == HIGH){
bitWrite(hkvtnrToestand, 0, 1);
}
vtnr2Toestand = digitalRead(vtnr2Pin);
if(vtnr1Toestand == HIGH){
bitWrite(hkvtnrToestand, 1, 1);
}
vtnr3Toestand = digitalRead(vtnr3Pin);
if(vtnr1Toestand == HIGH){
bitWrite(hkvtnrToestand, 2, 1);
}
vtnr4Toestand = digitalRead(vtnr4Pin);
if(vtnr1Toestand == HIGH){
bitWrite(hkvtnrToestand, 3, 1);
}
vtnr5Toestand = digitalRead(vtnr5Pin);
if(vtnr1Toestand == HIGH){
bitWrite(hkvtnrToestand, 4, 1);
}
vnr1Toestand = digitalRead(vnr1Pin);
if(vnr1Toestand == HIGH){
bitWrite(hkvnrToestand, 0, 1);
}
vnr2Toestand = digitalRead(vnr2Pin);
if(vnr2Toestand == HIGH){
bitWrite(hkvnrToestand, 1, 1);
}
vnr3Toestand = digitalRead(vnr3Pin);
if(vnr3Toestand == HIGH){
bitWrite(hkvnrToestand, 2, 1);
}
vnr4Toestand = digitalRead(vnr4Pin);
if(vnr4Toestand == HIGH){
bitWrite(hkvnrToestand, 3, 1);
}
vnr5Toestand = digitalRead(vnr5Pin);
if(vnr5Toestand == HIGH){
bitWrite(hkvnrToestand, 4, 1);
}
int(hkvnrToestand) + 15 = ahkvnrToestand;
int(hkvtnrToestand) + 96 = ahkvtnrToestand;
int(hkvtnrToestand) = 0;
int(hkvnrToestand) = 0;
}
Mod edit; Code put into code box. AWOL