Hi all
I am unable to place all the code as it's to big, so here is the part of the code that i think has a prob:
//---Libraries
#include <Wire.h> // I2C library
#include <LiquidCrystal_I2C.h> // I2C LCD library
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 20 chars and 4 line display
//--Define constants
#define encoder0PinA 2 // Setup the encoder pins
#define encoder0PinB 4 // Setup the encoder pins
#define encoderbtn 6 // encoder pushbutton
#define DDS_CLOCK 180000000 // 30MHz x 6 (onboard rock)
//---define variables
volatile long encoder0Pos = 10000000; // setup a value to count with
volatile long oldencoder0Pos = encoder0Pos ; // used to compare
int varVal; // variable for reading the pin status
int varHz = 1; // 1=Hz, 2=KHz, 3=10KHz, 4=100KHz, 5=MHz tuning step mode
int long varMult = 1; // used to plug in as the multiplier
char varBuf1[8]; // used to convert an int to a string array for the freq display
char varBuf2[10]; // used to format the freq display with commas
unsigned long varCurrentMillis; // current time via the Millis function
long varPreviousMillis = 0; // used as a timer to avoid bounce
long varInterval = 500; // interval used with a timer (milliseconds)
byte ddsLOAD = 8; // AD9851 LOAD Arduino D8
byte ddsCLOCK = 9; // AD9851 CLOCK Arduino D9
byte ddsDATA = 10; // AD9851 FQ_UD Ardunio D10
long varTuning_word; // Used to hold the word for the DDS
void setup() {
//---Setup encoder
pinMode(encoderbtn, INPUT);
pinMode(encoder0PinA, INPUT);
digitalWrite(encoder0PinA, HIGH); // turn on pullup resistor
pinMode(encoder0PinB, INPUT);
digitalWrite(encoder0PinB, HIGH); // turn on pullup resistor
attachInterrupt(0, doEncoder, CHANGE); // encoder pin on interrupt 0 - pin 2
//---Initial screen setup
lcd.init(); //THIS IS LINE 42 // initialize the lcd
lcd.backlight(); // turn on the lcd backlight
lcd.clear(); // good practice to make sure that display is clear
lcd.setCursor(0,0); // column,row
lcd.print("Freq: ");
sprintf(varBuf1,"%8lu", encoder0Pos); // convert initial freq for display
sprintf(varBuf2,"%1c%1c,%1c%1c%1c,%1c%1c%1c", varBuf1[0], varBuf1[1], varBuf1[2], varBuf1[3], varBuf1[4], varBuf1[5], varBuf1[6], varBuf1[7], varBuf1[8]);
lcd.print(varBuf2);
lcd.setCursor(18,0); // column,row
lcd.print("Hz"); // prints out step; should variablize
//---setup pins for AD9851
pinMode (ddsDATA, OUTPUT); // sets pin 10 as OUPUT
pinMode (ddsCLOCK, OUTPUT); // sets pin 9 as OUTPUT
pinMode (ddsLOAD, OUTPUT); // sets pin 8 as OUTPUT
sendFrequency(encoder0Pos); // send the initial freq to the DDS
}
I get this error msg when i try and compile:
_9851_code.ino: In fuction 'void setup()':
_9851_code:42: error: 'class liquidcrystal_I2c' has no member named 'INT'
Howard