Pages: [1]   Go Down
Author Topic: Error on Charlieplex Library Playground page  (Read 828 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was having trouble with the example program posted on the Playground page:

http://www.arduino.cc/playground/Code/Charlieplex

When I compiled the program I kept getting back the error:

sketch_jul01b:20: error: 'plex' was not declared in this scope
sketch_jul01b:22: error: 'plex' was not declared in this scope

When making sure I had loaded the library correctly I saw the folder "examples." On the chance it might have something that would be helpful I opened it. In it was what looked like the same program on the Playground page. When I compiled it though this one went through without an error message.

The difference is this. The program on the Playground page has these lines:
Code:
if (singleOn){ plex.clear(); }
plex.charlieWrite(led1,HIGH);

The correct syntax is:

Code:
if (singleOn){ charlieplex.clear(); }
charlieplex.charlieWrite(led1,HIGH);

So it's charlieplex. NOT plex.

This is really frustrating and confusing to new programmers like me who are having enough trouble figuring out how to program never the less working from samples programs with errors. What would be the best way to get the playground page corrected?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 548
Posts: 27386
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Aren't those editable by anyone?
Click the Edit button, scroll down, make the fixes.
Makes one wonder if a global search/replace was done that screwed things up.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 224
Posts: 13919
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

from the playground code:

I would love feedback at alexanderbrevig at gmail dot com
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@CrossRoads You're right it is editable by anyone. I fixed it.

@robtillaart I did email him as well but I've done that in the past and he hasn't answered the email.

Thanks guys!
Logged

Pages: [1]   Go Up
Jump to: