I’ve got both the Uno+wifi and the Mega+wifi bought about 2016. Haven’t managed to use them yet, I think I’m misunderstanding the instructions.
Hi @mickhowe. I think you make a good point about these boards being a bit confusing to work with. I don't have experience with these specific boards, but I do have experience with using the similar shields with UNO R3 boards (which is likely functionally equivalent to your "Uno+wifi" board).
The most challenging thing I encountered with that hardware is that the ATmega328P microcontroller communicates with the ESP8266 Wi-Fi adapter using the same Serial interface that is used for communication with the computer. This means you can use the board in one two distinct configurations, controlled by changing the positions of the little DIP switches:
- ATmega328P communicates with computer
- ATmega328P communicates with ESP8266
(there is actually a 3rd where the ESP8266 communicates with the computer, but that is only needed to perform specific rare tasks)
This of course means you must fiddle with the DIP switches before and after each sketch upload, since the board must be in the "ATmega328P communicates with computer" configuration to upload a sketch, but must be in the "ATmega328P communicates with ESP8266" mode for the sketch program to use Wi-Fi. However, it also poses a more serious difficulty, which is that you can only print debugging information to the Arduino IDE Serial Monitor when the board is in the "ATmega328P communicates with computer" configuration, so you don't have any easy way to get information about what is happening while the sketch program is using Wi-Fi.
This could be solved by using a different serial interface for communication between the ATmega328P and the ESP8266, using jumper wires to connect the pins of that serial interface to the RX and TX pins of the ESP8266. However, the ATmega328P only has one hardware serial interface, so you would need to use the SoftwareSerial library to created another serial interface for that purpose. Unfortunately this is not as easy as it might seem due to the fact that the "AT" firmware on the ESP8266 communicates at 115200 baud by default, which is higher than the maximum baud rate SoftwareSerial can support. So you must adjust the configuration of the AT firmware to communicate at the 19200 baud that is supported by SoftwareSerial (this is a use case for the "ESP8266 communicates with the computer" board configuration).
The situation is better with with the "Duinotech MEGA 2560 r3 Main Board with Wi-Fi" board (XC4421) because the ATmega2560 microcontroller has multiple hardware serial ports, so you can have one dedicated to communication with the computer as usual, and a separate one dedicated to communication with the ESP8266. The board even has a switch that allows you to connect the ESP8266 to the Serial3 interface on the ATmega2560!
As far as the code side of things, I have used this library, which implements the standard Arduino "WiFi" library API for this hardware:
This allows you to use the same code as you would for other Wi-Fi enabled boards.
Although the library is generally well made, the developer made the poor decision to make the library print debug information by default, and stubbornly refuses to fix it. Although it is useful to have the option to output debug information, it is not something that should be enabled by default, since this output will use a significant amount of memory and processing resources even when you don't need it. Worse, due to the fact that this debug information is printed on the Serial interface, that causes it to be incompatible with the hardware configuration where communication with the ESP8266 is done via the Serial interface:
To make matters worse, the library doesn't provide any user friendly mechanism for disabling the debug output. The only way to do it is by modifying the source code of the library.
However, the debug output won't cause incompatibility with the superior hardware configuration where communication with the ESP8266 is done via a different serial interface (though the problem of inefficiency remains). And even if you are using the Serial interface you can fix it by editing the library source code.
In conclusion, my opinion is that there are some specific aspects in which this hardware is superior to the more modern alternatives (which are superior in many other aspects):
- You want to use the AVR architecture (due to it being extremely well supported by the Arduino community, or because its simplicity makes it well suited to understanding even the low level concepts)
- (as already mentioned by
@Wawa) You need a lot of I/O pins that support 5 V logic levels.
I would recommend against the "UNO" variant of the board due to the lack of an extra hardware serial port. I don't have any experience with the "Mega" variant, but it looks pretty nice.
If you would like assistance with that, just provide a detailed description of the problem you encountered.
I got started with arduino on getting out of hospital after 3 months following a heart attack. I needed something to occupy my mind. I could manage with the regular uno & mega boards but not the +wifi versions. I dug out my box of bit a couple of weeks ago. I currently have Uno, Mega and Due boards I can use. If I found someone to help at my home (Southern end of Wollongong, NSW) it would be a bonus, if not I can stomach the loss. The best description I can manage of the problem is my computer (ArchLinux) doesn’t acknowledge them when I plug them in. I wouldn’t expect anyone to try to diagnose from that.
Hello @mickhowe
I've split your post from another post so it can get the attention that it deserves.
Hijacking topics is in general not the best idea as it can confuse people.
I'm not sure I understand what you mean by this.
Please try this experiment and then report the results:
- Disconnect the USB cable of the Arduino board from your computer.
- Select Tools > Port from the Arduino IDE menus.
- Take note of the ports (if any) listed in the menu.
- Close the Tools menu.
The ports list is only updated when the Tools menu is re-opened, so this step is essential. - Connect the Arduino board to your computer with a USB cable.
- Select Tools > Port from the Arduino IDE menus.
Did you see a new port in the menu at step 6?
First Mega+Wifi
- All USB cables removed from sockets (except mouse & Canon printer)
- Tools>Port
- Shows No boards found for””: Ports: /dev/ttyS0 : Serial Port /dev/ttyUSB0 Serial Port (USB)
- Closed & reopened
- Connected
- Shows No boards found for””: Ports: /dev/ttyS0 : Serial Port /dev/ttyUSB0 Serial Port (USB)
First test
- Disconnect the board.
- Run lsusb.
- Connect the board.
- Run lsusb again.
Observe the differences.
Second text
- Disconnect the board.
- Run dmesg -w; the application will not close.
- Press <enter> a few times to create some spacing for the next step.
- Connect the board.
Observe the additional output; post here (using code tags) if needed.
First lsusb contained 12 entries, 2nd time 13, the new one was
“Bus 001 Device 012: ID 1a86:7523 QinHeng Electronics CH340 serial converter”
dmesg output:
[106736.832512] ch341 1-8:1.0: ch341-uart converter detected
[106736.846616] usb 1-8: ch341-uart converter now attached to ttyUSB0
[106887.253287] usb 1-8: USB disconnect, device number 12
[106887.253472] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[106887.253489] ch341 1-8:1.0: device disconnected
[107108.134721] usb 1-8: new full-speed USB device number 13 using xhci_hcd
[107108.424231] usb 1-8: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54
[107108.424238] usb 1-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[107108.424240] usb 1-8: Product: USB2.0-Serial
[107108.445562] ch341 1-8:1.0: ch341-uart converter detected
[107108.458699] usb 1-8: ch341-uart converter now attached to ttyUSB0
In the IDE, select ttyUSB0 for the port.
You will more than likely also have to give yourself permissions to access the serial port; first run ls -l /dev/ttyUSB0.
wim@2E-5E-07-7E-30-FD:~$ ls -l /dev/ttyUSB0
crw-rw----. 1 root dialout 188, 0 Oct 16 08:10 /dev/ttyUSB0
wim@2E-5E-07-7E-30-FD:~$
dialout is the group that owns /dev/ttyUSB0 so you need to make yourself a member of that group; the name on your system might be different (not familiar with archLinux).
Yoy can check if you're a member of that group with the groups command.
wim@2E-5E-07-7E-30-FD:~$ groups
wim wheel dialout
wim@2E-5E-07-7E-30-FD:~$
If you're not a member, run the following command
sudo usermod -a -G theGroup yourUsername
See e.g. https://support.arduino.cc/hc/en-us/articles/360016495679-Fix-port-access-on-Linux#dialout.
After that you can verify that you're now a member of that group
wim@2E-5E-07-7E-30-FD:~$ groups
wim wheel dialout
wim@2E-5E-07-7E-30-FD:~$
I can't remember if I have already said this but my regular boards UNO x2, MEGA x2, DUEx1 all work fine - correct sketch entered does 'what it says on the box', it only the +WIFI boards that are not working "as advertised".
I just tried selecting Adafruit Feather HUZZAH ESP8266 as the board on /dev/ttyUSB0 and the random sketch that was loaded in the IDE compiled and loaded. This is the first time I have had a board recognised as mega with ESP8622 + first time a sketch has compiled & loaded. I don't have the modules etc setup to test running
Which "Mega+WiFi" board are you actually talking about.
I only know about a non-standard XC4421 Jaycar board with two separate processors (Mega and ESP8266) that can be disconnected (and coded indivudually) or serial joined with dip switches. Not sure how well that works (communicating with AT commands).
Leo..
The boards I am dealing with are 2 x Jaycar XC4421 Duinotech Mega+WiFi and 2 x Jaycar XC4411 Duinotech UNO+WiFi boards I bought from Jaycar Enogora (Brisbane) May 2016. I tried code for the Adafruit Feather board on the basis most "OFF Brand" boards are made by a couple of Chinese factories from the same plans and sold packaged and branded for anyone who wants to market clones.
You did mention that you had other boards but it was not clear to me if you could upload to those.
It's also not clear to me what your exact problem is; the only thing till now is the below
That problem seems to be solved because you get a ttyUSB0.
You'll have to provide more details about the problem that you're experiencing now.
- Can't you select the port in the IDE?
- If you can select the port,
- Which board are you compiling for?
- What are the dipswitch settings?
- What are the errors that you get when you perform an upload. Enable verbose output during upload under file → preferences, perform an upload and post the complete output here using code tags.
Note:
I'm not familiar with those boards.
With the Mega+WiFi that I unpacked immediately before starting the test I plugged it in and had /dev/ttyS0 & /dev/tty/USB0. The only board that showed was Adafruit Feather HUZZAH ESP8266 so I selected that board and loaded a random sketch. The loading of the sketch completed without error.
When you say "loaded", do you mean that you clicked the "Upload" button?
Have you got the download sheets on how to use those controllers.
Go back to Jaycar site and look at download section of each.
https://www.jaycar.com.au/duinotech-uno-r3-main-board-with-wi-fi/p/XC4411?srsltid=AfmBOoo-gYRJvteLVUYLS1Es9vRphzCGgWtad1B1e_Kwk0EozCLWBNSZ
Tom....
![]()
Why do you call it a clone.
AFAIK Arduino never made this board.
It's just a mashup of a Mega and an ESP8266. To separate processors on one board.
The dip switches must be set correctly to select programming one of the two processors.
Leo..
yes
clicked the Verify and Upload icons