Sunday, February 1, 2015

Codebender Arduino IDE

Recently I came across this video from the Open Source Hardware group which describes a cloud based IDE (Integrated Development Environment) for Arduino. This may simplify things for some people who have had problems with setting up an Arduino Environment on their home computers. For me, it means keeping the code all in one place and the fact that I simply like it better than the Arduino IDE.



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.

7 comments:

  1. Hello Tom,

    I 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

    ReplyDelete
    Replies
    1. 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.
      These 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

      Delete
  2. Hi Konstantinos,
    My 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

    ReplyDelete
  3. I also corrected the code in the codebender window.

    ReplyDelete
  4. Thanks a lot Tom.
    Now 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

    ReplyDelete
  5. 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.

    Si53512 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

    ReplyDelete
  6. Good evening and thanks a lot Tom for all the useful explanation.
    It does compile and work now.
    You are great help and the Codebender system works nicely!
    73,
    Konstantinos, SV1ONW

    ReplyDelete