Unfortunately according to the Intel® Edison Arduino* Board Schematic there's no direct access to this pin on the Arduino expansion board headers. However, it could be reached on the testing point TP23 (which is found on the back side of the board). You could try soldering this point to get access to this pin. If you decide to do so, be careful since it is very easy to create short circuits between this and the other points.
that's really bad - as written above it's the great thing about Edison that everything is included directly on the board and you don't need a lot add-on modules (RTC, WiFi, Bluetooth, ...) which are needed for a lot of applications!
Therefore I don't understand why this very important PIN is not made easily accessible (making the RTC more or less useless).
Anyway, I would try soldering it which looks like doable to me if you can answer the first question:
how I can access/set the Edison RTC from Arduino?
As soon as I have the RTC up and working with Arduino I will try the soldering part.
I searched already on the web, but did not find any Arduino code regarding the Edison RTC:
could you please send me a short example code on how to access the RTC?
Best regards and thanks again for your quick support
I'm sorry, I completely missed that question. I personally have never used the RTC but you can read it on /proc/driver/rtc and change it with the command timedatectl.
That being said, you can use it by making a system call from the Arduino side with the command system. I'll give you a simple example of how this command is used:
system("echo hello world");
I'll attach a couple of links to threads that might be of help for you:
first thanks for your quick reply again!
OK, I looked through the threads mentioned and additional searched a bit. I would get the Edison hardware RTC from Arduino to be set like this:
system("date -s \"2015-08-05 21:00:00\"");
system("hwclock -w"); // set hardware RTC according to system time
This seems to work fine so far.
But the other way round seems to be a bit more complicated.
Resetting the Linux system time to the time of the hardware RTC is easy again:
I could then output the system date e. g. like this:
system("date +\"%Y-%m-%d %H:%M:%S\"");
But how the heck I get that back into my Arduino process?
The only spontaneous option that came to my mind would be writing it into a file on the SD storage and then reading this file from Arduino again - but this sounds really crazy just for getting the time from the RTC!
Is there any other option to get this time back into the Arduino process?
I mean e. g. getting the output of above system call back?
Best regards and thanks again
Unfortunately, that's the only option I can think of as well. However there is a very good document about this that might interest you: IoT - Data sharing between programming environments on Intel® Edison | Intel® Developer Zone.
although it does not seem like a very "clean" solution and it's a pity that Intel does not provide an Arduino library to access the Edison hardware RTC directly, it's OK for me:
the approach (writing to file and reading it back from Arduino) works fine and reliable in my tests - so I can live with it.
But I need to change the voltage/ampere settings for the RTC battery charge and I don't get that done although I tried a lot of different codes changes already:
Please help here as I really want to get this project finally done.
Best regards and again thanks for your support
> one of the cool things about Edison is that it already includes more or less everything you need: WiFi and even a real time clock. ;-)
One of the cool things about Edison is that it also includes Linux.
You overlooked a major obstacle: when you set the current time, you should also set the current timezone. You need an Arduino library with timezones, which should be regularly updated. That's true unless your area doesn't observe summer time.
Linux already has a library with timezones. Also, Linux has an NTP client which will automatically adjust time from the Internet.
If you want to interact with Linux, run a daemon on Linux, to which you can connect from Arduino, send commands and receive results. That's what the Arduino Yun does when it interacts with Linux.
As for the super capacitor that you selected, it has a very small capacitance. It can only work for 10 minutes, it's purely for a tiny power outage. Get a 1F-10F super capacitor, it will charge the clock for hours and days, but it'll be BIG.
I'm an Arduino developer and Intel says the Edison board supports Arduino development. So I don't want to write any Linux daemon. ;-)
The reason why I'm using Edison is, because it has a lot of power (for such a small board), two cores and WiFi plus RTC included. I don't care about the operating system at all - it just needs to work. :-)
And regarding time zones you're absolutely right, of course. Therefore I'm using this Arduino time zone library which works very well:
And although getting the RTC time via the Linux command writing to text file and reading that again from Arduino is a bit messy, it works very well in my tests. So I can live with that.
As I wrote the only problem left is that I did not manage to change the charging settings of the integrated charging circuit:
So if you should have any idea on that your help would be highly appreciated!
Best regards and thanks a lot in advance