Time.x() función not syncing time


#1

Hi everyone

I can’t seem to get a valid time and date from the time functions.
I always have 1.1.1970 2 am
Have tried the particle sync time function but it does not address the problem
The DK is connected to the internet, and publishing events to the particle cloud without any problems.

Any thoughts on this?

Luigi.


#2

Currently this isn’t implemented, but I will admit to the list! I don’t think this should be too difficult since all the underlying requirements are there.

For now, our docs are up to date with all implemented functions. The way the Patticle HAL firmware works is that the functions are sort of all there, they just may not be hooked in yet. Our docs will let you know what is currently working and what isn’t: http://docs.bluz.io/


#3

Hi,

++ for this feature.

Time Class is very important to our application .

Thanks


#4

@lmartu and @Bacichetti Good news, I just added support for this into the develop branch. So if you want to test with the absolute latest firmware by compiling locally, you can access this feature now. Here is the example I am using to test: https://github.com/bluzDK/bluzDK-firmware/blob/develop/user/applications/time/time.cpp

If you want to wait, this will be in the next official release.


#5

@eric thank you, but how do you go about compiling locally?


#6

There are good instructions here: SPI tutorial or notes anyone?

So you would change the APP from tinker to time, but that should work.

I need to get this wrapped into a tutorial and up on the docs site…


#7

This is also a great all in one installer that will get you up and running quickly, as it can be very daunting. This is intended for particle devices, it also installs all the right things to get started with Bluz too. @mumblepins wrote it, he is also active in this forum also.


#8

guys, I would love to try but my second DK just died on me. There’s something about powering them with the spark fun battery shield which kills them.

Must now wait ages for replacements (I live in Italy).

L.


#9

Thanks @eric and @Hootie81!

I tested the local compilation version from develop and Time is working fine! Thank again.

I don’t know if it’s an issue on this version, but my analogread(A5) is not returning a value. It was working right before I’ve flash the new version. Could anyone also test it?


#10

Found new information about the issue from Particle.

The new system version don’t requires “pinMode(an_pin, OUTPUT)”

From Particle:
Note: do not set the pinMode() with analogRead(). The pinMode() is automatically set to AN_INPUT the first time analogRead() is called for a particular analog pin. If you explicitly set a pin to INPUT or OUTPUT after that first use of analogRead(), it will not attempt to switch it back to AN_INPUT the next time you call analogRead() for the same analog pin. This will create incorrect analog readings.

Besides that, it still not working here.


#11

It is certainly possible that something changed/broke there when we updated to 0.5.0. There were numerous breaks in other places and if Particle changed something in the ADC area, it is quite possible it broke something on our side.

I am creating an issue on this to track it: https://github.com/bluzDK/bluzDK-firmware/issues/24


#12

Sorry for the delays, but I just went back and tried this and with the default tinker app and a basic pull up/down resistor, I was able to get proper readings. I am using the latest develop branch.

Are you still seeing this issue? Would it be possible for you to post your code? Or potentially put Tinker back onto bluz and try it that way?

Let me know. Thanks!