News for hackers. Stuff that matters.
Re:How to write a great Arduino library by klingonopera on Monday March 02, 2020 @01:38AM (#22462194)
I've managed to setup Code::Blocks[0] to use WinAVR to program Arduinos. Here's a guide[1] I found for that. It works, but I probably forgot to add some optimization flags, because the code ran slower than when compiled with the Arduino IDE.

And then I realized, you can just take any .c or .cpp written for the AVR, rename it to .ino, put it in a folder with the same name, and use the Arduino IDE to compile and flash.

So I never really use C::B for the Arduino anymore, I just write the code in Notepad++[2] and use the Arduino IDE to upload.

[0]: http://www.codeblocks.org/

[1]: https://uetianblogger.blogspot.com/2015/05/winavr-and-codebl...

[2]: https://notepad-plus-plus.org/

EDIT: > you can just take any .c or .cpp file

Eh... actually only .cpp, as the Arduino IDE is C++. Or a .c file that will also compile in C++.

There are no comments on this comment yet.