To add a new library in Codebender click on the codebender gear in the upper left corner of the page (if you are on the code page) or "Upload library" on the upper right if you are at the home page. The library must be zipped. If it is downloaded from NT7S Si5351 or Rotary it is already zipped for you. In that case, just drag them from your download folder onto the Codebender "Upload a personal library" pop up that occurs when you press the green button.
Codebender allows me to embed my sketch into my blog where you can have your way with it. If you have Codebender installed on your browser, you can compile and download to your Arduino from here. If you want just the LCD_VFO_Si5351_IF.ino file for the Arduino IDE click here.
Hello Tom,
ReplyDeleteI tried to run on my UnoR3 your sketch for the Si5351A both with the codebender and directly from my computer.
In both cases I get compilation error. Here is the dump from my compilation.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
In file included from LCD_VFO_Si5351_IF_offset.ino:10:
C:\Users\tubester\Documents\Arduino\libraries\Si5351Arduino-master/si5351.h:32:18: error: Wire.h: No such file or directory
LCD_VFO_Si5351_IF_offset.ino: In function 'void setup()':
LCD_VFO_Si5351_IF_offset:153: error: 'Wire' was not declared in this scope
Although I am programming PICs for a long time, I am relatively new to Arduino enviroment.
I would appreciate any hint for my problem.
I have also installed both NT7S and Rotary libraries on my PC.
Thanking you in advance,
73 de Konstantinos, SV1ONW
The error message is because the compiler cannot find the Si5351 library. Read again this post above about installing libraries into the Codebender IDE. The previous post covers installing user libraries into the Arduino IDE.
DeleteThese three lines:
LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);
Si5351 si5351;
Rotary r = Rotary(ENCODER_A, ENCODER_B);
...create objects from their respective libraries to be used throughout the program. LiquidCrystal and Rotary are passed parameters that are needed by the libraries. They are given the names LCD, si5351 and r.
Open Source Hardware group (the creator of the video above) have excellent tutorials for using Arduino.
73,
Tom, ak2b
Hi Konstantinos,
ReplyDeleteMy mistake. Try:
#include instead of:
#include "Wire.h"
The quotes around an include assume a local library in the same folder as the program file instead of the Libraries folder.
Let me know.
Tom, ak2b
I also corrected the code in the codebender window.
ReplyDeleteThanks a lot Tom.
ReplyDeleteNow I run into another error message.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
LCD_VFO_Si5351-copy.ino:29: error: 'Si5351' does not name a type
LCD_VFO_Si5351-copy.ino: In function 'void setup()':
LCD_VFO_Si5351-copy.ino:155: error: 'si5351' was not declared in this scope
LCD_VFO_Si5351-copy.ino: In function 'void loop()':
LCD_VFO_Si5351-copy.ino:184: error: 'si5351' was not declared in this scope
What I do not understand is the line in your program Si5351 si5351;
It seems to be the starting point of the new problem.
Thanks,
Konstantinos, SV1ONW
The error is because the compiler cannot find the Si5351 library. Make sure you have both the Rotary and Si5351 libraries installed as described above. The previous post covers the Arduino IDE.
ReplyDeleteSi53512 si5351;
LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);
Rotary r = Rotary(ENCODER_A, ENCODER_B);
These 3 lines instantiate the objects (from their respective libraries) you are using and gives them a name. As you can see, some of the objects need parameters passed to them at the time of their creation.
Tom, ak2b
Good evening and thanks a lot Tom for all the useful explanation.
ReplyDeleteIt does compile and work now.
You are great help and the Codebender system works nicely!
73,
Konstantinos, SV1ONW