WAVGAT: close, but no guitar

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.)

Thanks for any help!

Boo hoo. Looks like everyone else is getting replies but none for me.:disappointed_relieved:

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…

I’m not sure what “bog” refers to, but I’ll look for the uno board. Thanks for the help.

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.

2 Likes

@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.

This Github repo looks helpful too:

1 Like

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.

1 Like

Interesting… Well I probably won’t get my boards for a week or so… (EDIT - I just got a shipping notification that says it’ll be here around 2/7/2020… Are these made on the moon?)

I just ran the “data book” from the repo I linked to through google translate… It did a pretty impressive job! It doesn’t look like I can share PDF files on here though.

Just for fun - I’ll poke through it and the arduino files / libraries in the repo and see if I have any luck.

FWIW I did manage to get a dev environment working with the WAVGAT “UNO R3” board (with VSCode and platformIO). At least it works for what I’m doing with the board right now. Thanks for all the input

1 Like

Which board did you choose to work with? Neither the Wavgat nor the LGT8F328P are a choice option.

My platformio.ini:

[env:wavgat]
platform = atmelavr
board = wavgat328p
framework = arduino
monitor_speed = 9600
lib_deps =
    https://github.com/z3t0/Arduino-IRremote
2 Likes

Thanks, I’ll try that.

Hi, did you have to add some file to vscode/platformio configuration? In this case do you remember which ones? Sorry but I’m totally new to platformio…

OK, I am back to being completely baffled. I have been using the platformio.ini entry I posted earlier for a while now, on several projects.

But today, after a moderately long hiatus, when I try to build any of these projects, I always get the “unknown board” error.

Something has changed somewhere (globally?), but I haven’t a clue what.

Thanks for any guidance.

This board isn’t known in the platform-atmelavr board selection (platform-atmelavr/boards at develop · platformio/platform-atmelavr · GitHub). Where did you find this board definition wavgat328p.json?

Also btw if the chip is not a ATMega328P but one of the LGT8F328P chippies, you might want to use this PlatformIO integration.

1 Like

Well, I’m not sure how my previous setup got broken but I managed to get it working again, thanks for the help.

How exactly? I’d be really interested if you can find the wavgat328.json file on your computer via the file search and post its contents o_o

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.

Thank you for your assistance.

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)

{
  "build": {
    "core": "arduino",
    "extra_flags": "-DARDUINO_AVR_MICRODUINO_CORE",
    "f_cpu": "4000000L",
    "mcu": "atmega328p",
    "variant": "standard"
  },
  "frameworks": [
    "arduino"
  ],
  "name": "WAVGAT UNO R3 (Atmega328P@8M,3.3V)",
  "upload": {
    "maximum_ram_size": 2048,
    "maximum_size": 32256,
    "protocol": "arduino",
    "require_upload_port": true,
    "speed": 57600
  },
  "url": "http://wiki.microduinoinc.com/Microduino-Module_Core",
  "vendor": "Microduino"
}

Sorry for the posting “noise”.

1 Like

Dammit… you weren’t supposed to let the robot nation see you bleed! :laughing:

image