More questions...

More
1 year 4 months ago #9579 by MikeS
More questions... was created by MikeS
OK, I've got my Classic v6 running, with the WiFi time provider. The blue LED on the WiFi is blinking briefly about once a second - that seems right from the WiFi code, but the WiFi manual says "The module needs to be in
“configured” mode. This mode is indicated by the blue LED flashing slowly (1 second on, 1
second off)." The 1/1 timing seems to be the default state, but there's also an "all OK, flash 10 millisecond per second" near the top of loop(), which is what it's doing?

Anyway, I'm still awaiting more components to complete my display board, so I'm running blind. Everything seems OK - I have HV and can talk to the WiFi module. BUT, the "Configure clock settings" page on WiFi is filled with (defaults?) They're not legal values, because it complains if I don't change anything but just click on "set" (e.g. PIR value shows as 0, but must be >=60), and if I set things and then reload the page, none of the settings are kept. I was thinking that perhaps the clock needed to complete initial setup before that would work, but don't see anything in the code which says so.

The troubleshooting section says "If the module is fully configured and still does not communicate with the clock, look at the main configuration page for the value for “Found I2C slave at”. It should say “104”." (i.e. 0x68)

But, the DS3231 RTC has an I2C address of 0x68 (104 dec), according to its datasheet. And, that's fixed, so neither the clock nor the WiFi should be using that address.

It looks like the clock uses
#define I2C_SLAVE_ADDR  0x69
(dec 105) when it's in slave mode. But the scan that WiFi does doesn't find that, either.

Is any of this working for anyone (ClassicV6 clock version 655, WiFi version 355)?

I'm simply trying to make sure everything is in place for when my display board is ready...
Attachments:

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9580 by Ty_Eeberfest
Replied by Ty_Eeberfest on topic More questions...
Regardless of what the docs may say, if the ESP is happy the blue led gives a brief flash (10mS I thing) once per second. Also, if the ESP and the clock controller are talking to one another you will see this on the Summary page:

"Found I2C slave at (ping) 105"

If you are not seeing this there is a problem. The most likely cause is version mismatch between ESP and clock controller. It's not clear to me whether or not you installed version 355 on the clock controller. If you did, you also need to put 355 on the ESP.

As you surmised, the ESP takes on the Master role. It expects the clock controller to be a slave at 0x69 (105 dec). If both ESP and RTC are present, I believe the clock controller basically ignores the RTC as long as it is receiving time updates from the ESP. If the ESP stops sending time updates for some reason the clock controller periodically goes into Master mode and attempts to talk to the RTC at 0x68 (104 dec). When it is not actively talking with the RTC it sits in slave mode hoping to hear from the ESP.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9581 by Ty_Eeberfest
Replied by Ty_Eeberfest on topic More questions...
Also - I do not have a Rev 6 running here, but I am running a Modular Rev 3 with Version 355 in both the clock and the WiFi. It works fine. This is essentially the same code as the Rev 6 clock. It is the "Version 2" code with "Neopixel" LEDs, not RGB LEDs.

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9582 by Ian
Replied by Ian on topic More questions...
Oh that's an old version of the Docs.

I'll roll out an updated version of the WiFi manual today. Things changed quite a bit.

So, to be totally clear: 105 0x69 is the clock slave address: It goes into slave mode normally, and only goes to master mode for a few mS at a time to communicate with the RTC. It used to be 104 0x68, but that caused a collision when the RTC was there.

For the lack of communication, there are two possibilities:

EITHER: there is a version mismatch between the WiFi Module code and the Clock code,
OR: there is a problem on the SMD level shifter circuit.

The way to tell is to see if there are time updates coming to the clock, and for that, I guess you need the display to work.

The time update is a common protocol for all clock versions, but the configuration changes from version to version.

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago - 1 year 4 months ago #9583 by MikeS
Replied by MikeS on topic More questions...
A version mismatch shouldn't stop the I2C "pings" from working. Checked that both 5v and 3.3v levels were good on SDA and SCL.

It's something with the Classic code. I stripped down the sketch to a bare minimum {all the functions outside of setup() and loop() are still around, but mostly unused}, and the WiFi module now sees and talks to the Classic:
void setup()
{
  // Read EEPROM values
  readEEPROMValues();

 Wire.end();
  Wire.begin(I2C_SLAVE_ADDR);
  Wire.onReceive(receiveEvent);
  Wire.onRequest(requestEvent);
}

//**********************************************************************************
//**********************************************************************************
//*                              Main loop                                         *
//**********************************************************************************
//**********************************************************************************
void loop()
{

}
Then, I went right back and used the latest code at bitbucket.org/isparkes/nixiefirmwarev2/r...Rev6/ClassicRev6.ino , and it's back to not talking.

I commented out all calls to getRTCTime() and setRTC(), which were the only functions which changed to I2C master (but should be going back to slave when they're done), and added this to then end of setup():
Wire.end();
  Wire.begin(I2C_SLAVE_ADDR);
  Wire.onReceive(receiveEvent);
  Wire.onRequest(requestEvent);
No change WiFi still can't see it. I removed everything from loop(). No change. Restored loop() and removed everything from setup() except what's shown above. It's working again (the WiFi/I2C, obviously not much else).

One more hint: without the WiFi plugged in, you should see the Classic polling the RTC once a minute. That doesn't happen, either.
Attachments:
Last edit: 1 year 4 months ago by MikeS.

Please Log in or Create an account to join the conversation.

More
1 year 4 months ago #9587 by Ian
Replied by Ian on topic More questions...
Is this thread sort of dead with the realisation that the clock was in test mode?

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.171 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com