Greetings. I am completely new to PlatformIO so apologies if this is a dumb question.
I’ve purchased several cheap Arduino clones which are called “WAVGAT UNO R3”. I believe these use the ATmega328P chip. I found software for the Arduino IDE, installed it, and tested there and it seems to work OK. I tested with your garden-variety blink code: LED on, delay 1 second, LED off, delay 1 second.
Anyway, I’ve (tried to) set up a VSCode/PlatformIO environment for this board (the Arduino IDE leaves much to be desired, at least for me.) I’ve already used this IDE to load firmware into my 3D printer, so I think my environment setup isn’t too far off.
I’m now trying to use that same IDE to program the WAVGAT. I couldn’t find much for platformio for this board, so I decided to try to copy one of the other boards that use the same cpu.
I can now compile and upload to a WAVGAT using the VSCode/PlatformIO IDE - however, the timing I get seems way off. By that I mean a “delay(1000)” in the code produces delays that are far longer than 1 second (more like 3 or 4). In the Arduino IDE, uploading the same code seems to yield accurate timing.
The “specs” on the WAVGAT suggest that it runs at 16MHz. That is what I originally put in the platformio board definition. When I saw that the timing was way off, I tried playing with the board speed just to see what would happen. I seem to get “better” results if I decrease the CPU speed in the board definition. I’ve tried setting it all the way down to 4MHz, and got faster blinking, but I’m puzzled about why the 16MHz seems so far off, and what I should be using instead (or what else I probably have missed.)
Since it looks to be an atmega328p, running at 16Mhz… you should be able to use the bog standard (aka ordinary/standard)board = uno board type. It’s possible you picked an atmega328 configuration that runs at a different speed or something, and that’s why it didn’t work properly out of the box…
Hi, I’m new here too. But I encountered the same problems.
The problem is that it is not an atmega328p, but a Logic Green LGT8F328P. (On the chip it says Wavgat AVGA328P) There is a procedure to install the correct files on the Arduino IDE. There is also more information about this on Github. I had it installed on my Arduino IDE, but unfortunately the newer versions of the Arduino IDE continue to give errors. So I went looking for an alternative and installed MS Visual Studio and PlatformIO. That works great, but it does not support the Wavgat boards. It would be great if these boards were supported in the near future because they are inexpensive and of good hardware quality. But without the right software to program them, they are useless.
@Rob52 I just bought a couple LGT8F328P boards on ebay. I was having fun messing around with board files the other day. It looks like the github link you provided has everything needed to get it working.
I’m not one of the pros on this forum, but I’ll take a stab at getting it working with an Arduino as an ISP programmer.
I have just tried out some programs on both the Arduino Uno and the Wavgat Uno, but they are certainly not 100% interchangeable. Simple sketches such as Blink work, but slightly more complex sketches do not. Wavgat has made some files available for Arduino IDE, but unfortunately they are not updated. Because the Wavgat is not 100% compatible, it will be difficult to transfer existing Arduino sketches to a Wavgat Uno R3. For that reason I have ordered a few Chinese Arduino Uno clones. I doubt that much will change from China because they have probably just developed the Wavgat for the local market and that is of course very large in China.
Well, I never did find that json file. If I understand correctly, board files can be placed either in a boards subdirectory within a project, or globally under ~/.platformio. Since I’d been using that board definition in several projects (again, successfully), I would assume it was located globally. But I’ve checked thoroughly and I can’t find it anywhere (and every project I’ve tested gets the same “unknown board” error.) I also checked all my git logs to try to find it…nothing. I remained baffled as to what happened to it. The only possibility I can think of, which sounds very unlikely, is that I did perform a platformio update earlier and perhaps that action somehow blew it away. But if that really is the culprit, I’d classify that as “very bad”.
To be clear, when I stated that I “got it working” in my last post, I didn’t meant to imply that I had found the missing file. What I meant was that I did find a way to build and upload code to the WAVGAT UNO board, by going here. That framework includes a board def named “wavgatnano”, which seems to work with the WAVGAT UNO, although I imagine there are probably a few values in it that should be changed.
Update: OK, this is embarrassing…I completely forgot that originally I had been working with platformio on a Windows box, and later switched to Linux. Moreover, I had forgotten to copy over that file. Here is the contents of the file “wavgat328p.json” that I have (if you see anything wrong in it, please let me know)