Sunday, April 3, 2016

Scott H. put the time and the effort to port the Wise Clock 4 code (also the HDSP-Proverb and WiFiChron code) to Arduino 1.6.8 (the latest, but maybe not the greatest). This is a big endeavor, which I did not plan to pursue any time soon. Now, thanks to Scott, here we have it. I compiled it and uploaded it myself, on Windows (he did it on Mac).

The Wise Clock 4 files are all in the same "TheClock" folder, directly under "libraries", as shown in the following screenshot.

But before uploading to ATmega1284, this section needs to be inserted in boards.txt (*):

The two highlighted lines are new for 1.6.8: "upload.tool" and "build.board" (which has a default value though).

Next, as specified in the line "atmega1284.build.core=sanguino", we need to create the folder "sanguino", containing the core files. Folder structure should look like this:

Note that a few sanguino core files that worked in Arduino 1.0.6 need to be modified to compile on 1.6.8. Like the Wise Clock 4 code itself, most of these changes are related to the PROGMEM definition, which now requires every progmem variable to be constant. The modified files are WString.* and Print.*, copies of the arduino core files.

Talking about sanguino core files, which served pretty well so far, it is worth mentioning that the current implementation for pinMode(pin, INPUT_PULLUP) (in file wiring_digital.c) is not working. Until I find a software solution, I will still need to use pull up resistors.

(*) There is a more "user friendly" way to add a new board, that involves downloading packages from a specified URL, but I found the learning curve for this method too steep (or, to say it differently, I was too lazy).

8 comments:

Hello Florin. My name is Alex. Immediately I apologize for my bad English - I am from Russia. I want to thank you for your efforts in Wise Clock. I have long wanted to write a comment but did not dare. I'm "sick" hours since childhood, so once came across your blog, immediately I decided to repeat. But .... the issue price and rate your "green" greatly disturbed me do it. So I decided to save money and as well as Scott H tried to compile your code for the Arduino Mega 2560 is still for version 1.6.5. Scott H cheated a little - he turned off the set of functions in userconf.h I tried to turn them on and got some code mistakes. (Try to include such getMessageAndReminder). The errors I corrected a reference to the code (or the code itself) can give. But ... I still do not have assembled the device to yourself to check it all. Yesterday I finally got a screen from Sure and ready to gather all. Please show me where you can take the wiring diagram ?! Thank you.

Here is the link to my code. https://yadi.sk/d/Q4_0mKDTqrgJMOnce again draw attention to - the code is not checked on the "live" hardware (since it is not). In userconfig.h options enabled to test the code only. In terms of ideas - now is only desire. I have LCD full color panel 16x32 and 32x64 want to connect them. They are without the controller (it's very bad). Another may be it would be nice to see (I can take part in development) Wise clock as Shield to the Arduino Mega. I believe it will reduce costs.

link to my code https://yadi.sk/d/Q4_0mKDTqrgJM. All changes can be seen over time. Once again I warn - code has not been tested on real hardware, compiled only!. options in the userconfig.h are activated to test the code only.Ideas yet, only desire :). I have a couple of full-color led matrix 32x16 and 64x32 (though "without brains") there is a desire to use them. Little idea to make a clock like as Shield for Arduino Mega, it can reduce the price?

Thanks.Full color LED matrix takes more pins to drive, more processing power and more display memory, without adding much more value, I think.Give me your address (my email address is in the top right corner), I will send you a partially assembled (but functional board) I have, so you can experiment with it.