0
Offline
Full Member
Karma: 0
Posts: 107
Arduino rocks
|
 |
« on: January 30, 2011, 08:49:57 am » |
I downloaded the t6963c library from the collection here and tried to compile the sample sketch and this is the result.  ive been playing with ) and ;'s like crazy to fix this syntax thing lol
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 269
Posts: 17035
Available for Design & Build services
|
 |
« Reply #1 on: January 30, 2011, 10:42:20 am » |
If you put the cursor just to the right of a ) or }, it will highlight the mating ( or {. Looks like that line is just missing a ( after the =
|
|
|
|
|
Logged
|
|
|
|
|
Central MN, USA
Offline
Faraday Member
Karma: 38
Posts: 6050
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
|
 |
« Reply #2 on: January 30, 2011, 01:07:10 pm » |
What is the original line before you tried to change it? You should use the "#" button to post code, not a screen shot.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 5
Posts: 200
|
 |
« Reply #3 on: January 30, 2011, 03:06:36 pm » |
Lol.... Missing a "(" before the "(_FW-1)..."
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 107
Arduino rocks
|
 |
« Reply #4 on: January 30, 2011, 04:31:51 pm » |
I posted a screen shot so you could see the error. I added parenthesis as you mentioned but still the same error, i know for every open ( there has to be a close ) but no matter what I add thats the result. The error I posted is direct from the library, I have not modifyed it at all. I just tried to compile it and it wont work. After trying a bunch of things I closed it and opened the original one that was saved and posted the screenshot of it here.
Thanks for your responses. I reciveved a new t6963c GLCD and im dying to try it out lol
|
|
|
|
|
Logged
|
|
|
|
|
Milano, Italy
Offline
Faraday Member
Karma: 10
Posts: 3081
Sideralis Arduino!
|
 |
« Reply #5 on: January 30, 2011, 04:59:24 pm » |
Look, some line before the error there is another line commented //lsb direction correction wich is the same minus one ). You should try to write the line that works.
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX
Offline
Jr. Member
Karma: 5
Posts: 91
Arduino rocks
|
 |
« Reply #6 on: January 30, 2011, 06:12:06 pm » |
OK, I got it!Change: // ------------------------------------------------------ // Set a single pixel at x,y (in pixels) to 0 (off) // ------------------------------------------------------ byte T6963::clearPixel (byte x, byte y) {
For: // ------------------------------------------------------ // Set a single pixel at x,y (in pixels) to 0 (off) // ------------------------------------------------------ byte T6963::clearPixel (byte x, byte y) (
Basically, change the "{" for "(" !!!!!and delete the extra ")" on the "tmp" line ...(_FW-1) - (x%_FW));
for (_FW-1) - (x%_FW);
and next time for God sake paste the code!!! You are welcome.
|
|
|
|
« Last Edit: January 30, 2011, 06:32:45 pm by Staedtler »
|
Logged
|
-------------------------------------- Eight bytes walk into a bar. The bartender asks, 'Can I get you anything?' - 'Yeah', reply the bytes. 'Make us a double'.
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 107
Arduino rocks
|
 |
« Reply #7 on: January 31, 2011, 08:01:56 pm » |
i fixed it as you stated and now it says theres a problem with the "Byte tmp" line. I figured example sketches should run right off the bat. I hate to bother you guys with things that are simple but im kinda new and learning how these libraries work. sometimes when I get the errors at the bottom of the screen I have no idea what they mean lol heres some code //------------------------------------------------------------------------------------------------- byte T6963::clearPixel(byte x, byte y)( byte tmp=B11110000; tmp |= (_FW-1)-(x%_FW); //LSB Direction Correction writeCommand(tmp); return tmp; } //------------------
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX
Offline
Jr. Member
Karma: 5
Posts: 91
Arduino rocks
|
 |
« Reply #8 on: January 31, 2011, 08:03:45 pm » |
i fixed it as you stated and now it says theres a problem with the "Byte tmp" line. I figured example sketches should run right off the bat. I hate to bother you guys with things that are simple but im kinda new and learning how these libraries work. sometimes when I get the errors at the bottom of the screen I have no idea what they mean lol heres some code //------------------------------------------------------------------------------------------------- byte T6963::clearPixel(byte x, byte y)( byte tmp=B11110000; tmp |= (_FW-1)-(x%_FW); //LSB Direction Correction writeCommand(tmp); return tmp; } //------------------ can you paste the new error?
|
|
|
|
|
Logged
|
-------------------------------------- Eight bytes walk into a bar. The bartender asks, 'Can I get you anything?' - 'Yeah', reply the bytes. 'Make us a double'.
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 269
Posts: 17035
Available for Design & Build services
|
 |
« Reply #9 on: January 31, 2011, 08:56:03 pm » |
Isn't it fairly obvious there is an extra ( at the end of the line?
byte T6963::clearPixel(byte x, byte y)(
or maybe it should be { to match up with this one? return tmp; }
Either or get rid of the mismatched ( and }
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX
Offline
Jr. Member
Karma: 5
Posts: 91
Arduino rocks
|
 |
« Reply #10 on: January 31, 2011, 09:23:19 pm » |
He forgot the "SetAdressPointer" line. This should work: // ------------------------------------------------------ // Set a single pixel at x,y (in pixels) to 0 (off) // ------------------------------------------------------ byte T6963::clearPixel (byte x, byte y) ( SetAddressPointer((_GH + (x / _FW) + (_GA * y))); byte tmp=B11111000; tmp |= (_FW-1)-(x%_FW); //LSB Direction Correction writeCommand(tmp); return tmp; ) // ------------------------------------------------------
|
|
|
|
« Last Edit: January 31, 2011, 09:26:26 pm by Staedtler »
|
Logged
|
-------------------------------------- Eight bytes walk into a bar. The bartender asks, 'Can I get you anything?' - 'Yeah', reply the bytes. 'Make us a double'.
|
|
|
|
Dallas, TX
Offline
Jr. Member
Karma: 5
Posts: 91
Arduino rocks
|
 |
« Reply #11 on: January 31, 2011, 09:30:27 pm » |
sometimes when I get the errors at the bottom of the screen I have no idea what they mean lol They actually tells you exactly what is going on. Try to pay attention on what the error message says.
|
|
|
|
|
Logged
|
-------------------------------------- Eight bytes walk into a bar. The bartender asks, 'Can I get you anything?' - 'Yeah', reply the bytes. 'Make us a double'.
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 107
Arduino rocks
|
 |
« Reply #12 on: February 01, 2011, 04:59:23 pm » |
ok, I changed it like the last post and the error now says "Function 'byte T6963::clearPixel(byte, byte)' is initialized like a variable" code: // ------------------------------------------------------ // Set a single pixel at x,y (in pixels) to 0 (off) // ------------------------------------------------------ byte T6963::clearPixel (byte x, byte y) ( SetAddressPointer((_GH + (x / _FW) + (_GA * y))); byte tmp=B11111000; tmp |= (_FW-1)-(x%_FW); //LSB Direction Correction writeCommand(tmp); return tmp; ) // ------------------------------------------------------
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 107
Arduino rocks
|
 |
« Reply #13 on: February 01, 2011, 05:07:35 pm » |
I do pay attention to the errors lol I'm new to C and i'm still learning the syntax. I understand that if you arrow key over the brackets and parenthesis you it points out their mates (great feature)
has anyone else used this library for a t6963c display before? am I the only one having this issue?
|
|
|
|
|
Logged
|
|
|
|
|
Dallas, TX
Offline
Jr. Member
Karma: 5
Posts: 91
Arduino rocks
|
 |
« Reply #14 on: February 02, 2011, 01:28:49 pm » |
Looks like you need to use brackets instead parenthesis, but a short junk of code is difficult to debug.
Since you didn't had any error until that line, I was duplicating the code used on ""// Set a single pixel at x,y (in pixels) to 1 (on)".
I think you have to dump all the code in one post to understand it.
Edit: I've found the library. Is a mess, and is not debugged. Let me check if I get somewhere.
|
|
|
|
« Last Edit: February 02, 2011, 01:57:34 pm by Staedtler »
|
Logged
|
-------------------------------------- Eight bytes walk into a bar. The bartender asks, 'Can I get you anything?' - 'Yeah', reply the bytes. 'Make us a double'.
|
|
|
|
|