On the Arduino UNO WiFi (which is not an Arduino UNO with WiFi! The worst naming Arduino ever did!) the SPI signals are available only on the ICSP header. As you failed provide any relevant information (link to the used breakout board, wiring diagram, the code you actually used, links to the used libraries) we cannot help any further.
The original Uno WiFi actually was an ATmega328P-based board with an ESP8266 tacked on, so you could argue it was appropriate to use "Uno" in its name. The Uno WiFi Rev2 is much more of a departure from the Uno, due to it using a very different microcontroller. @clemmi do you have an Arduino Uno WiFi or an Arduino Uno WiFi Rev2? From the name, it might seem like they're about the same thing, but there is actually a huge difference.
I have an Arduino UNO WiFi REV2
I use the Example sketch to test the MAX72xx (Example from the library) and it works on a regular Arduino UNO with pins 8/11/13 for CS/DIN/CLK.
Same sketch and same hardware do not work on any combination of pins on the UNO WiFi REV2.
I have both Arduino Uno and Arduino UNO WiFi REV2 side by side.
What pins are what in the 2x3 ICSP ins?
I tested with a voltmeter and didn't see any GND/5V on those pins. Maybe they do not have the voltage.
Which pins are CS/DIN/CLK ? that will solve my problem.
how do I enter in the sketch the ICSP pins? #define CLK_PIN ?? #define DATA_PIN ?? #define CS_PIN ??
tnks
To avoid confusion, please always use the "Rev2" in the name when referring to your board. You can leave off the "Arduino" part if you want to save a bit of typing.
clemmi:
What pins are what in the 2x3 ICSP ins?
Here's the ICSP header pinout:
There's a little white dot on the silkscreen of the Uno WiFi Rev2 to indicate pin 1 of the ICSP header
clemmi:
I tested with a voltmeter and didn't see any GND/5V on those pins. Maybe they do not have the voltage.
Give it another try now that you know the pinout.
clemmi:
Which pins are CS/DIN/CLK ? that will solve my problem.
There are variables defined to give names to the pins: MOSI, MISO, SCK.
clemmi:
how do I enter in the sketch the ICSP pins? #define CLK_PIN ?? #define DATA_PIN ?? #define CS_PIN ??
#define CLK_PIN SCK
#define DATA_PIN MOSI
#define CS_PIN SS
Thank you for the extensive information. Still no luck.
The diagram has the legend "ICPS" next to pins 5-6 but according to the white dot in the board they are next to pins 1-2.
I connected DIN to MOSI pin4, CS to MISO pin 1 and CLK to SCK pin 3.
I used:
MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES #define HARDWARE_TYPE MD_MAX72XX::FC16_HW // PAROLA_HW (tried parola too)
The same sketch works on my regular UNO with pins 10, 11, 13.
Also, even if it works I will need an additional CS in the future, can I use any other digital pin? I have eventually a panel of 2 rows of 3 panels of 4 units each for a clock.
Should I return the board as defective?
I can't measure any voltage in any pins like 2 (+Vcc) and 6 (Gnd).
I was able to measure about 5 V on pins 2 and 6 (Grn) so I must have the pins rigth
You said to use another pin for CS and that I can use any digital pins for additional CS in the future, so I used pin 10 for CS and modified the sketch accordingly.
I'm attaching the sketch, pictures of the cable connectionsm the white dot I found and the pins I use..
Maybe if someone else looks at this the mistake will come out. Thansk for your time.
I took a look and no obvious problems jump out at me. However, the code is causing software SPI to be done on the hardware SPI pins, which at the very least is inefficient. Have a try with hardware SPI by uncommenting line 33 of your sketch:
I tried many combinations of that and other pins for CS. I also got the power from the ICSP pins. Nothing works.
I'm returning the board to Amazon for a replacement if the next one don't work I'll return for a refund.
Too bad, the WiFi works fine but I need both functions for my clock.
Attached is a picture of the clock to display local and UTC time from a GPS. Next are the regular UNO and the REV2 boards I've been using for these tests..
I want to remove theseconds and add sunspot number on the large display. I have all sketches worked out to get the WiFi sunspot number and parse the data. Just need to add WiFi to the large clock board. For ham radio.
If you have any further ideas please let me know. Thank you again. I'll come bak if I have new results.
The other option is to use my MKR1000 WiFi and a level converter to add to my clock nano.
The name of the Uno WiFi Rev2 is a bit unfortunate in that it gives the impression that the board is just an Uno with WiFi communication capabilities. Actually, this board uses a microcontroller that is very different from the Uno. As with any Arduino board that uses a microcontroller not previously widely used in the Arduino world, you will find that the support is not as good. The Arduino community has been using the Uno's ATmega328P for something like 14 years now, so the support for that chip is excellent. Over time, the support for the newer microcontrollers improves. Early adopters of these microcontrollers should be prepared to encounter a lot of incompatibility with 3rd party libraries, and even discover bugs in the official Arduino software. It's quite likely the author of the MD_MAX72XX has never even used an Uno WiFi Rev2 and likely that board didn't even exist when the library code was written That's just the way it goes. In a few years, if lots of people are using the Uno WiFi Rev2 and other boards with the ATmega4809 microcontroller, the support will improve. Early adopters should be trail blazers excited at the opportunity to play with new hardware, overcome the inevitable challenges, and make valuable contributions to the Arduino project. For people who aren't interested in any of that and want something that "just works", I very much recommend staying clear of the new and shiny.