hwiguna / MorphingClock_for_MatrixPortal

MIT License
3 stars 0 forks source link

Matrix Portal M4 Sketch Code about Connecting Issue by hwiguna #1

Closed daddyusa17 closed 11 months ago

daddyusa17 commented 11 months ago

Hi.

I have Adafruit Matrix Portal M4 with 32 x 64 RGB LED board. I downloaded the latest sketch with verified and uploaded properly. I changed SSID and PASS to my personal need in MORPHCLOCK.ccp. Also same thing with removed ' // ' include // AdaFruit Matrix Portal M4 uses WiFiNINA instead. It looked good so far so good. I plugged it up and it came up with MORPH CLOCK board. Connecting to my SSID. I checked on Serial Monitor on Arduino IDE 2.2.1 that it states Connecting to my SSID ... with PASS. The only problem lies calling begin ... called begin .......Connecting to SSID with PASS ... calling begin ... called begin ... Connecting to SSID with PASS ... continually. The Morph Clock is nowhere to be seen.

Do I need to upgrade ESP32 Firmware? I don't know what to do since I had a hard time to make it reset to MATRIXBOOT. Sometimes I got it then I dragged the firmware.UF2 to MATRIXBOOT. It froze. Do I need ethernet cable? I use WI-FI to connect properly.

Do I need to install CircuitPython language? It is too complex for me to understand how. Each time I installed the language and I see CIRCUITPY will appear. I added Adafruit Libraries. Even MU Editor as well. Very difficult to do like that since CIRCUITPY disappeared for no reason. I had to start all over again. Nothing worked. Bad board?

I wish someone with highly skilled programmer is here to resolve its problem for me.

Merry Christmas to you all. Have a Safe Holiday. Cheers~

Terry.

czecht commented 11 months ago

Sorry, I do not know what would fix your problem. I used USB-C and Arduino IDE, I uploaded the sketch and it works great. Happy Holidays!

On Sat, Dec 23, 2023 at 11:13 AM daddyusa17 @.***> wrote:

Hi.

I have Adafruit Matrix Portal M4 with 32 x 64 RGB LED board. I downloaded the latest sketch with verified and uploaded properly. I changed SSID and PASS to my personal need in MORPHCLOCK.ccp. Also same thing with removed ' // ' include // AdaFruit Matrix Portal M4 uses WiFiNINA instead. It looked good so far so good. I plugged it up and it came up with MORPH CLOCK board. Connecting to my SSID. I checked on Serial Monitor on Arduino IDE 2.2.1 that it states Connecting to my SSID ... with PASS. The only problem lies calling begin ... called begin .......Connecting to SSID with PASS ... calling begin ... called begin ... Connecting to SSID with PASS ... continually. The Morph Clock is nowhere to be seen.

Do I need to upgrade ESP32 Firmware? I don't know what to do since I had a hard time to make it reset to MATRIXBOOT. Sometimes I got it then I dragged the firmware.UF2 to MATRIXBOOT. It froze. Do I need ethernet cable? I use WI-FI to connect properly.

Do I need to install CircuitPython language? It is too complex for me to understand how. Each time I installed the language and I see CIRCUITPY will appear. I added Adafruit Libraries. Even MU Editor as well. Very difficult to do like that since CIRCUITPY disappeared for no reason. I had to start all over again. Nothing worked. Bad board?

I wish someone with highly skilled programmer is here to resolve its problem for me.

Merry Christmas to you all. Have a Safe Holiday. Cheers~

Terry.

— Reply to this email directly, view it on GitHub https://github.com/hwiguna/MorphingClock_for_MatrixPortal/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEDVU22I5LGRO4FVR5J5DYK4GMNAVCNFSM6AAAAABBA5KOYKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TIOBUGY3DQOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

hwiguna commented 11 months ago

Terry, Sorry the code is giving you trouble. Let's go through some possible causes and solutions.

  1. Does your SSD and or password have special characters such as backslash "\" or quotes? if yes, put two instead of one. ie: \\ or "".

  2. Let's make sure there is no confusion as to where you put your actual wifi ssd and wifi password.

Before:

String credentials[][2] = {
  { "SSID", "SSDPassword" },
  { "OptionalOtherSSID", "OptionalOtherSSDPassword" },
};

After:

String credentials[][2] = {
  { "myWifi", "supersecret" },
};

To address your other questions: No, you do not need to worry about what firmware is on the ESP32. Arduino IDE does not use CircuitPython and completely clobbers everything on the ESP32 each time you upload a sketch.

Arduino IDE compiles "C++" to binary and puts that on the ESP, while CircuitPython installs firmware that allows it to interpret python code that you put on the ESP (no compiling, no uploading). So, as you can see, they're completely different worlds that as you discovered, do not like each other :-)

czecht commented 11 months ago

Thanks for the explanation.

On Sat, Dec 23, 2023 at 1:31 PM Hari Wiguna @.***> wrote:

Terry, Sorry the code is giving you trouble. Let's go through some possible causes and solutions.

1.

Does your SSD and or password have special characters such as backslash "" or quotes? if yes, put two instead of one. ie: \ or "". 2.

Let's make sure there is no confusion as to where you put your actual wifi ssd and wifi password.

Before:

String credentials[][2] = { { "SSID", "SSDPassword" }, { "OptionalOtherSSID", "OptionalOtherSSDPassword" }, };

After:

String credentials[][2] = { { "myWifi", "supersecret" }, };

To address your other questions: No, you do not need to worry about what firmware is on the ESP32. Arduino IDE does not use CircuitPython and completely clobbers everything on the ESP32 each time you upload a sketch.

Arduino IDE compiles "C++" to binary and puts that on the ESP, while CircuitPython installs firmware that allows it to interpret python code that you put on the ESP (no compiling, no uploading). So, as you can see, they're completely different worlds that as you discovered, do not like each other :-)

— Reply to this email directly, view it on GitHub https://github.com/hwiguna/MorphingClock_for_MatrixPortal/issues/1#issuecomment-1868356892, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEDVX6QMME377GIA7YES3YK4WQHAVCNFSM6AAAAABBA5KOYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGM2TMOBZGI . You are receiving this because you commented.Message ID: @.***>

czecht commented 11 months ago

Where did you change the SSID and PASSWORD? What tab were you on and what line number?

On Sat, Dec 23, 2023 at 11:01 PM daddyusa17 @.***> wrote:

Hi Hwiguna. Thank you for a quick reply. First of all, thank you for enlightened up about CircuitPython do not mix together with Arduino IDE. What a different world. Thank you for ESP32 firmware question I asked so no more worry about it. Great. Yes, The Preferences for SSID and PASS code I copied it and pasted it in the sketch and changed to my SSID and PASS as well. These letters which I counted inside my SSID has 9 Capital cases, one space, one hyphen. My PASS has two Capital cases, two dollar signs and 10 lower cases with two digital numbers. No special character. No luck. Still running ' Connecting to ___ .... continually. Even I restarted the Charter modem. Still the same issue. Once again, I am really appreciate it that you do your best thing to help me out on this one. We NEVER give up. 👍 Till we got it~

— Reply to this email directly, view it on GitHub https://github.com/hwiguna/MorphingClock_for_MatrixPortal/issues/1#issuecomment-1868433380, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEDVSOKIF7EBB45BIFSIDYK6ZLBAVCNFSM6AAAAABBA5KOYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGQZTGMZYGA . You are receiving this because you commented.Message ID: @.***>

hwiguna commented 11 months ago

Terry, The photo did not show up for me. That's ok, I think this thread is public.

I've just learned that AdaFruit has three different versions of the Matrix Portal. From reading the specs, the MatrixPortal S3 does not have a co-processor, so I think it does NOT require the WiFiNINA library.

If you have the MatrixPortal S3, try commenting the WiFiNINA and uncommenting the WiFi.h. I'm not sure what else needs to change, but that would be a good start. Good luck!

daddyusa17 commented 11 months ago

From: Hari Wiguna @.> Sent: Sunday, December 24, 2023 4:15 PM To: hwiguna/MorphingClock_for_MatrixPortal @.> Cc: daddyusa17 @.>; Author @.> Subject: Re: [hwiguna/MorphingClock_for_MatrixPortal] Matrix Portal M4 Sketch Code about Connecting Issue by hwiguna (Issue #1)

Terry, The photo did not show up for me. That's ok, I think this thread is public.

I've just learned that AdaFruit has three different versions of the Matrix Portal. From reading the specs, the MatrixPortal S3 does not have a co-processor, so I think it does NOT require the WiFiNINA library.

If you have the MatrixPortal S3, you try commenting the WiFiNINA and uncommenting the WiFi.h. I'm not sure what else needs to change, but that would be a good start. Good luck!

— Reply to this email directly, view it on GitHubhttps://github.com/hwiguna/MorphingClock_for_MatrixPortal/issues/1#issuecomment-1868620269, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACSHK527JSDFEEYVL5BKWPLYLDARBAVCNFSM6AAAAABBA5KOYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGYZDAMRWHE. You are receiving this because you authored the thread.Message ID: @.***>

hwiguna commented 11 months ago

I think the "WiFiPing" is a good test to see if you could connect to your WiFi. Open the sketch and go to the second tab "arduino_secrets.h". insert your wifi access point and password between the appropriate quote marks.

daddyusa17 commented 11 months ago

It failed. Look. What do you think? Thank you for your time, Hari. Terry.


From: Hari Wiguna @.> Sent: Monday, December 25, 2023 12:27 PM To: hwiguna/MorphingClock_for_MatrixPortal @.> Cc: daddyusa17 @.>; Comment @.> Subject: Re: [hwiguna/MorphingClock_for_MatrixPortal] Matrix Portal M4 Sketch Code about Connecting Issue by hwiguna (Issue #1)

I think the "WiFiPing" is a good test to see if you could connect to your WiFi. Open the sketch and go to the second tab "arduino_secrets.h". insert your wifi access point and password between the appropriate quote marks.

— Reply to this email directly, view it on GitHubhttps://github.com/hwiguna/MorphingClock_for_MatrixPortal/issues/1#issuecomment-1869108716, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACSHK556KBBNOZN7GOQOKQ3YLHOTJAVCNFSM6AAAAABBA5KOYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZGEYDQNZRGY. You are receiving this because you commented.Message ID: @.***>

daddyusa17 commented 11 months ago

I realized you never get any photo I sent due to public area. Anyway, it stated, ' the serial monitor stated ' Communiation with WI-FI module failed! ' Maybe you could add some code to make it work out of WiFPing sketch due to my Adafruit Matrix Portal M4 needs. Later,

daddyusa17 commented 11 months ago

WARNING: library Timezone claims to run on avr architecture(s) and may be incompatible with your current board which runs on samd architecture(s). Generating function prototypes...

What do you think?

daddyusa17 commented 11 months ago

include // AdaFruit Matrix Portal M4 uses WiFiNINA instead.

include // To communicate with NTP server

include

include

include

Correct to use these libraries?

hwiguna commented 11 months ago

I got that warning too (not an error) and it did not cause any issues.

On Fri, Dec 29, 2023 at 11:11 AM daddyusa17 @.***> wrote:

WARNING: library Timezone claims to run on avr architecture(s) and may be incompatible with your current board which runs on samd architecture(s). Generating function prototypes...

— Reply to this email directly, view it on GitHub https://github.com/hwiguna/MorphingClock_for_MatrixPortal/issues/1#issuecomment-1872226410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4TELQTGFUQ5VSKCZYMEBDYL32VDAVCNFSM6AAAAABBA5KOYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGIZDMNBRGA . You are receiving this because you commented.Message ID: @.***>

hwiguna commented 11 months ago

If you have a Matrix Portal S3 (main processor is an ESP32 S3)

include // AdaFruit Matrix Portal M4 uses WiFiNINA instead.

include // To communicate with NTP server

include

// #include

If you have Matrix Portal M4 (main processor is NOT ESP32 but includes ESP32 as Co-Processor): // #include // AdaFruit Matrix Portal M4 uses WiFiNINA instead.

include // To communicate with NTP server

include

include

On Fri, Dec 29, 2023 at 11:15 AM daddyusa17 @.***> wrote:

include // AdaFruit Matrix Portal M4 uses WiFiNINA instead.

include // To communicate with NTP server

include

include

include

Correct to use these libraries?

— Reply to this email directly, view it on GitHub https://github.com/hwiguna/MorphingClock_for_MatrixPortal/issues/1#issuecomment-1872228020, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4TELUENFTDIPIGE4NSCS3YL33BJAVCNFSM6AAAAABBA5KOYKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGIZDQMBSGA . You are receiving this because you commented.Message ID: @.***>

daddyusa17 commented 11 months ago

include // AdaFruit Matrix Portal M4 uses WiFiNINA instead.

include // To communicate with NTP server

include

//#include

OUTPUT: No error.

//#include // AdaFruit Matrix Portal M4 uses WiFiNINA instead.

include // To communicate with NTP server

include

include

OUTPUT: Too many errors.

Weird.

Sometimes I put ' // ' on

OUTPUT: No error.

I am using Matrix Portal M4.

I feel like I erase everything on Arduino IDE 2.2.1 and libraries but long time to install it again especially libraries.

I still save your Morphing Clock zip. Maybe over 20 or so. I tried again and no, nothing is working yet for Morphing Clock.

I used Arduino IDE 1.8.9 and it caused too many errors then I tried to use Arduino IDE 2.2.1 and it got worsen. Oh boy.

I am not giving up just yet.

I know I will buy another M4 board kit come with 64 x 32 panel in near future of 2024. ^_^

Thank you for being patience with me.

Cheers~

Wonder how long will it takes to connect to view Morphing Clock? You have M4? S3? ESP32? All are good? I meant they are working properly. I envy you. :-)

daddyusa17 commented 11 months ago

Hi again. I removed Arduino Lib out of Document folder. Only a few lib required to add for Morphing Clock Sketch to verify. I followed your explanation about include // tips. All verified. No error. Uploaded okay. Still waiting and waiting to see Morphing Clock running. Not yet. I chose each Time Server to see it might work. Nope. thinking reading your beautiful code scratch bald head, how come it is not hook up to connect on line, mmm

Windows 11 Pro. x64 - Latest Windows updates. Firewall enabled - Public. Firewall enabled - Private.

Last time I decided to use original SSID and PASS out of NETGEAR modem stickers and use SSID and PASS into MorphingClock.cpp Line 63. No change. Still waited and waited. Alright, I put my fav SSID and PASS back once again. No change again.

I changed the color of pretty blue instead of green on 'MORPH CLOCK' Just for fun. As long as no error issue. :-)

Line 297 (menuColors[0], menuColors[0], menuColors[2]);

Like green, purple, yellow and red as well. I got them except red, not so sure. Is there a chart to tell me all color option?

Question: Adafruit Matrix Portal M4 has a defected ESP32?

Remember 5 out of 6 examples from Adafruit ProtoMatter work okay.

Now this Morphing Clock is required to connect on line. It fails.

Don't worry. Be happy.

Peace.

daddyusa17 commented 11 months ago

WARNING: library Timezone claims to run on avr architecture(s) and may be incompatible with your current board which runs on samd architecture(s).

Is that why it can not be connected to NTP Server?

hwiguna commented 11 months ago

Question: Adafruit Matrix Portal M4 has a defected ESP32? Unless I misunderstood you, that seems to be a good explanation.

When you ran the WiFiNINA WiFiPing sample, you said it reported: "the serial monitor stated ' Communiation with WI-FI module failed! '" IMHO, this is the root of all the problems. For some reason the main microcontroller on the Matrix Portal M4 could not communicate with the ESP32 co-processor.

WiFiNINA WiFiPing should be able to detect the ESP32 co-processor. Unlikely as it sounds, maybe wifi is broken on your Matrix Portal board. Have you been able to get wifi to work with CircuitPython?

WARNING: library Timezone claims to run on avr architecture(s) and may be incompatible with your current board which runs on samd architecture(s). Is that why it can not be connected to NTP Server? That is only a warning. I got that warning too. TimeZone library works fine with the matrix portal.

Wonder how long will it takes to connect to view Morphing Clock? It usually connects in less than 5 seconds. Sometimes it does not connect right away and it has to try again. Then it works. Also it usually works instantly if I press the reset button.

You have M4? S3? ESP32? My friend Tony lent me his Matrix Portal M4 while I worked on the code. I do not have any version(s) of the Matrix Portal.

daddyusa17 commented 11 months ago

I got it!!! How? Of course, I ordered a brand new Adafruit Matrix Portal M4 with 32 x 64 RGB LED panel package overnight. Boy, I was nervous because it might not work. Ta da~ What a beauty to view a beautiful Morphing Clock running perfectly. What a special effect animation. Wow. Only ten seconds to connect. I thought I was dreaming. Nope, it is REAL. Many thanks, Hwiguna. 🥇 By the way, it would be nice to see thick bold clock, different color on each number, calendar, date, day, year plus temperature as well. Alarm, timer (counter up and down), brightness option, etc. I know I expect too much from you, a true programmer. Once again, I salute you for being a great deal of patience with me, pal. Peace out. Terry, a happy old man with a pure heart of eight years old boy. ^_^

hwiguna commented 11 months ago

OMG! That's great news! I'm happy for you. Peace out.

hwiguna commented 11 months ago

Resolved: Hardware failure (not software issue). User had a Matrix Portal M4 with a broken ESP32 (wifi co processor). :-( Even the sample WiFiNINA WiFiPing was unable to connect to the ESP32: "Communication with Wi-Fi Module Failed". He got a new Matrix Portal M4 and it works fine on that. Phew...