platform-ch32v icon indicating copy to clipboard operation
platform-ch32v copied to clipboard

Add Arduino support

Open maxgerhardt opened this issue 2 years ago • 6 comments

Once all existing frameworks are supposed, one can think about expanding / creating an Arduino core for these boards.

maxgerhardt avatar Feb 19 '23 00:02 maxgerhardt

Done for CH32V003 in https://github.com/Community-PIO-CH32V/platform-ch32v/commit/2f95c188d471f2e1087c3d5803c5c2345387887a

maxgerhardt avatar May 21 '23 15:05 maxgerhardt

Hello. When can we expect the addition of functions analogRead analogWrite AttachInterrupt for Arduino part ? I've tried changing the adc-tempo example to read voltages, but it's hard for me. Perhaps there are working pieces of code for these functions?

Perhaps I am writing to the wrong address. And this is the project https://github.com/AlexanderMandera/arduino-wch32v003 or https://github.com/openwch/ch32v003

marshalab avatar Jun 29 '23 13:06 marshalab

https://github.com/AlexanderMandera/arduino-wch32v003 doesn't have analogRead() yet, so if you want it in that core, you need to open an issue there.

I don't yet support building https://github.com/openwch/arduino_core_ch32 here in PlatformIO but it will be supported soon. This core does have analogRead(). You can use this core in the Arduino IDE already.

https://github.com/openwch/arduino_core_ch32/blob/987154335fd6834d2f547e559376d553c9356a1b/cores/arduino/wiring_analog.c#L123-L136

maxgerhardt avatar Jun 29 '23 14:06 maxgerhardt

Great, thanks a lot. https://github.com/openwch/arduino_core_ch32 This is what I need now!

marshalab avatar Jun 29 '23 16:06 marshalab

https://github.com/openwch/arduino_core_ch32 Now has native Arduino SPI implementation..

I tried adding it as a custom core to CH32V framework but failed. I think adding it now, especially for CH32V003 will be a big step in getting low cost projects going.

I can try adding it myself if there is any documentations on doing so, if not I think it will be very beneficial to add this core at least for V003.

arwidcool avatar Oct 17 '23 21:10 arwidcool

This core is already supported for CH32V003. Please see project's https://github.com/Community-PIO-CH32V/platform-ch32v/tree/develop/examples/blinky-arduino platformio.ini file.

maxgerhardt avatar Oct 17 '23 21:10 maxgerhardt

Closing since a lot of boards are supported in the OpenWCH Arduino core now. New boards will be synced here as they gain support in that core.

maxgerhardt avatar Sep 15 '24 11:09 maxgerhardt