Created Mon, 17 Feb 2014 10:03:11 +0000 by RickyMcC
Mon, 17 Feb 2014 10:03:11 +0000
Hi,
I have a Chipkit Pi board and a Basic IO shield connected to a Pi with the recommended Noobs Raspbian installation providing the MPIDE. I can use this to program the Chipkit Pi but cannot get the example OLED sketch to compile for the Basic IO Shield. It appears to be looking for Wprogram.h. Am I doing something wrong, does the sketch need modified or do I need to install more files? Surprised if the example doesn't work without additional installation although this does not seem to be a problem for others judging by the lack of info on the forums.
Thanks Richard
Mon, 17 Feb 2014 10:17:45 +0000
My immediate thought, though I don't have the IO shield code in front of me, is that it should be looking for "WProgram.h" not "Wprogram.h". Linux is case sensitive, and if that is the wrong case it won't find the file. Check that it is in fact the wrong case and correct it if needed.
Mon, 17 Feb 2014 14:46:29 +0000
Thanks majenko,
I have included the definitions listed in the program:
/* ------------------------------------------------------------ */
/* Include File Definitions */
/* ------------------------------------------------------------ */
#include <IOShieldOled.h>
#include <Wprogram.h>
I will try changing it to WProgram.h later but searching google seems to suggest that you could be correct since all references seem to have a capital P. Will post later...
Mon, 17 Feb 2014 19:48:06 +0000
Hi majenko / anyone
Yes, changing from a lower case p to upper case P in WProgram.h definition solved the problem - well done. However, I now have the following compilation errors:
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c: In function 'OledHostInit':
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:233:4: error: #error "No Supported Board Defined"
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:236:14: error: 'prtDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:236:14: note: each undeclared identifier is reported only once for each function it appears in
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:236:26: error: 'bitDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:237:14: error: 'prtVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:237:26: error: 'bitVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:238:14: error: 'prtVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:238:27: error: 'bitVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:247:14: error: 'prtReset' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:247:24: error: 'bitReset' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c: In function 'OledHostTerm':
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:274:14: error: 'prtDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:274:26: error: 'bitDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:276:14: error: 'prtReset' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:276:24: error: 'bitReset' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:282:14: error: 'prtVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:282:26: error: 'bitVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:283:14: error: 'prtVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:283:27: error: 'bitVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c: In function 'OledDevInit':
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:373:16: error: 'prtDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:373:28: error: 'bitDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:377:16: error: 'prtVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:377:28: error: 'bitVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:386:16: error: 'prtReset' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:386:26: error: 'bitReset' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:400:16: error: 'prtVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:400:29: error: 'bitVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c: In function 'OledDevTerm':
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:445:14: error: 'prtVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:445:27: error: 'bitVbatCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:450:16: error: 'prtVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:450:28: error: 'bitVddCtrl' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c: In function 'OledDisplayOn':
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:476:16: error: 'prtDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:476:28: error: 'bitDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c: In function 'OledDisplayOff':
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:502:16: error: 'prtDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:502:28: error: 'bitDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c: In function 'OledUpdate':
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:592:17: error: 'prtDataCmd' undeclared (first use in this function)
/home/pi/sketchbook/libraries/IOShieldOled/utility/OledDriver.c:592:29: error: 'bitDataCmd' undeclared (first use in this function)
All function errors appear in the same order as they are listed in OledDriver.c. Could there be a file missing or in the wrong place and can't be found? The "No Supported Board Defined" is a bit of a worry! Could the other errors be because the board really can't be found and therefore the definitions are missing?
Mon, 17 Feb 2014 20:49:56 +0000
First thing I would do is check for other case sensitive issues with include files, if it was there once it might be there again. I don't have an IO Shield nor a chipKIT PI board to test.
Jacob
Mon, 17 Feb 2014 21:22:07 +0000
That to me looks like typical Digilent hard-coding all the used pins into the library and selecting which ones to use depending on which board you're using. Not a good way of doing things, and I have often wondered why they went and did that. It's the same with the WiFi library, and even in the SD library...
It basically means that when a new board is release by anyone then Digilent have to go through all their libraries and add support for that board.
Or... just don't bother and make it so the libraries don't work on other boards other than the handful they have hard coded in there.
So the long and the short of it is: you'll have to edit the library and add your own board definition to it by copying one of the others and modifying it to work with the ckPI.
Wed, 19 Feb 2014 13:16:13 +0000
Hi majenko,
I think you are correct in your previous post. I have successfully run the example program on a Chipkit UNO32 connected to a PC with the Basic IO Shield. It does appear that the shield is probably hardware compatible with the Chipkit Pi board but with no software support (yet). Seems a strange way to design a board and certainly less useful or maybe they expect others to do the work for them! Have spent too much time on this already so will probably leave it for the time being.
Thanks for your help,
Richard