Charlieplexing Library

robrlstn

  • Jr. Member
  • **
    • Posts: 6
    • View Profile
    • Video clips of my projects
I've got the TinyShield 16 Edge LEDs board working (please see the short TinyDuinoEdgeLeds clip at:http://www.youtube.com/user/robrlstn/videos.

Code is modification of example on TinyCircuits tutorial page.

PROBELM:  I cannot get the Charlieplexing Library to work at all. I have downloaded that library, put it unzipped into the Arduino/libraries folder, and imported the Library so I can get the #include <Charlieplex.h> statement added to a sketch.

But the example included with that library, SimpleCharlie.pde, will itself not compile, throwing many errors with Arduino 1.0.5.

As an Arduino newbie, I cannot troubleshoot the meaning of these errors. So I cannot tell if I'm doing something wrong or that library has problems.

Thank you in advance for any help.  Robert

Errors:

In file included from _16LEDs_CPlib_1.ino:1:
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:14: error: 'byte' does not name a type
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:15: error: 'byte' does not name a type
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:26: error: expected `)' before '*' token
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:30: error: 'byte' has not been declared
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:31: error: 'byte' has not been declared
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:36: error: 'byte' does not name a type
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:37: error: ISO C++ forbids declaration of 'byte' with no type
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:37: error: expected ';' before '*' token
_16LEDs_CPlib_1:4: error: no matching function for call to 'Charlieplex::Charlieplex(byte [5], int)'
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:20: note: candidates are: Charlieplex::Charlieplex()
C:\Users\RR\Documents\Arduino\libraries\Charlieplex/Charlieplex.h:20: note:                 Charlieplex::Charlieplex(const Charlieplex&)
_16LEDs_CPlib_1:5: error: too many initializers for 'charliePin'
_16LEDs_CPlib_1:6: error: expected `}' before ')' token
_16LEDs_CPlib_1:6: error: too many initializers for 'charliePin'
_16LEDs_CPlib_1:6: error: expected ',' or ';' before ')' token
_16LEDs_CPlib_1:9: error: expected initializer before 'void'


robrlstn

  • Jr. Member
  • **
    • Posts: 6
    • View Profile
    • Video clips of my projects
Ok, I think I figured this out (but not yet extensively tested).

The example included with the Charlieplex library, SimpleCharlie.pde, now compiles and runs. Also, a simple program I wrote now also runs using that library.

The problem was in the header file, Charlieplex.h.  In there, I changed the statement #include <wProgram.h> to #include <Arduino.h>, following the 'Writing a Library for Arduino" article.

Apparently, this change, from wProgram.h to Arduino.h was made in some earlier version of the Arduino code.


 

SMF spam blocked by CleanTalk