SimpleTimer library problem

Asked by ntronics at 15:34 on 04 Sep 2017.

Hi, I'm unable to add SimpleTimer to the existing project. UECIDE shows "SimpleTimer.h: No such file or directory" error on compilation attempt. SimpleTimer was installed using UECIDE Plugin Manager and resides in UECIDE\libraries\Time\SimpleTimer directory. Main sketch already contains other #include directives like:

include <SimpleTimer.h>

include <SPI.h>

include <ugfx-arduino.h>

include "gui.h"

Interestingly SimpleTimer library compiles correctly if added to the empty project. Can you please point me to the right direction?

Sign up or log in for live updates and to post messages.

I'd like to point you in the right direction, but I don't know what that direction is. I can't see why it would fail, and I can't get it to fail.

Which board are you compiling for? Which version of UECIDE are you on for this?

Posted 04 Sep 2017, 15:41, 0 votes
matt
Rating: 3

UECIDE version is 0.8.9-pre17 and project is complied for Fubarino SD board

Posted 04 Sep 2017, 15:46, 0 votes
ntronics
Rating: 0

Just compiled fine for me. Which operating system are you using?

Posted 04 Sep 2017, 15:53, 0 votes
matt
Rating: 3

Windows 10 Pro x64 build 15063.540

Posted 04 Sep 2017, 15:54, 0 votes
ntronics
Rating: 0

Ok. I'll have to boot my VM and (slowly) try it on there. It works fine on Linux.

Posted 04 Sep 2017, 15:54, 0 votes
matt
Rating: 3

This is the one thing that annoys me more than anything else with Windblows:

VirtualBox_Windows 10 Professional 64_05_09_2017_09_38_16.png

Maybe next month I will get to actually use it... It seems that every time I want to boot up or shut down it wants to update, and take forever over it. Meanwhile the rest of my computer becomes almost unusable as it hogs all the resources.

Posted 05 Sep 2017, 09:41, 0 votes
matt
Rating: 3

This picture is painfully familiar to me too :) Sometimes after windows update I enjoy watching this animation for up 20 minutes.

Posted 05 Sep 2017, 09:46, 0 votes
ntronics
Rating: 0

Ok, I see it failing in Windows. Why only Windows though, and why only that library, I have no clue.

Posted 05 Sep 2017, 10:24, 0 votes
matt
Rating: 3

Ok, it seems to be something to do with the pic32-tools preprocessor that I use to identify included files. If I disable that and fall back to the internal routine it finds SimpleTimer fine. Time to do some debugging I think...

Posted 05 Sep 2017, 10:29, 0 votes
matt
Rating: 3

Riiiiight..... It's not UECIDE at fault, and it's not SimpleTimer at fault...

... it's ugfx that's at fault!

When preprocessing (not compiling) ugfx throws an error:

#error "GOS: More than one operation system has been defined as TRUE."                                                                         
 ^                                                                                                                                             

In file included from C:\Users\matt\Documents\UECIDE\libraries\ugfx-master/gfx.h:206:0,                                                          
                 from C:\Users\matt\Documents\UECIDE\libraries\ugfx-master/ugfx-master.h:4,                                                      
                 from C:\Users\matt\Documents\UECIDE\libraries\ugfx-arduino/ugfx-arduino.h:4,                                                    
                 from C:\Users\matt\AppData\Local\Temp\build-2dace0d7-a456-4f8b-b722-295f9dc9713c\deps-temp.h:4:                                 
C:\Users\matt\Documents\UECIDE\libraries\ugfx-master/src/gos/gos.h:507:3: error: #error "Your operating system is not supported yet"             
  #error "Your operating system is not supported yet" 

And because of that preprocessing fails.

Posted 05 Sep 2017, 10:40, 0 votes
matt
Rating: 3

This ugfx thing looks ghastly. A real nightmare.

I do wish you'd use DisplayCore - it has a keyboard widget now, by the way. Part of the ShinyButton library.

Posted 05 Sep 2017, 10:58, 0 votes
matt
Rating: 3

Until I can sort out why this is causing it to fail only on Windows you can disable the gcc preprocessing by finding compilers/pic32-tools/compiler.txt and commenting out the line that starts compile.preproc=. Refresh the internals, or restart UECIDE, and it should work.

Posted 05 Sep 2017, 11:00, 0 votes
matt
Rating: 3

Matt, thanks for helping me with this issue. I do not understand how it faults at uGFX module if is #included on the first line of the main sketch. How does pre-processor includes header files? Sequentially as in the main sketch or randomly?

uGFX module should not show this error because GFX_USE_OS_ARDUINO is defined. Otherwise it would not compile on its own. This all is very confusing.

I agree that uGFX is difficult to work with, but I have already invested so much effort into it. How much time do you think it can take to configure DisplayCore library for ILI9341(not sure if it is supported out of the box) display with TCS2046 touch panel?

UECIDE compiles fine after commenting out compile.preproc=. Thank you.

Posted 05 Sep 2017, 11:45, 0 votes
ntronics
Rating: 0

Using the ILI9341 with DisplayCore:

#include <DSPI.h>
#include <ILI9341.h>

// DSPI channel 0 is where the screen is connected
DSPI0 spi;

// It is wired to use CS pin 10 and RS (AKA DC) pin 9.
ILI9341_DSPI tft(spi, 10, 9);

I don't know the TCS2046 - is that compatible with the XPT2046?

#include <XPT2046.h>

XPT2046 ts(spi, 4, 240, 320);

There's examples that use both of those (though not together) in the various libraries.

Posted 05 Sep 2017, 11:59, 0 votes
matt
Rating: 3

Looking at the datasheet it looks like the TCS2046 may be just TI's number for the XPT2046.

Posted 05 Sep 2017, 12:08, 0 votes
matt
Rating: 3

Thats great, thank you for the tip. I will consider using DisplayCore library for the next project.

Posted 05 Sep 2017, 12:11, 0 votes
ntronics
Rating: 0

I have tried to make DisplayCore as clean and simple to use as possible. It's 100% OO with plenty of polymorphism, and the widget system is all event based. Creating your own custom widgets is pretty simple too.

Posted 05 Sep 2017, 12:13, 0 votes
matt
Rating: 3

I'm tempted to try it as soon as possible

Posted 05 Sep 2017, 12:25, 0 votes
ntronics
Rating: 0

This site uses cookies to maintain your current login session and improve your browsing experience. By continuing to use this site you agree to the placing of these cookies on your computer or device.

About cookies | Close this popup