Author Topic: Simple Way to Use Dev C++ for Arduino?  (Read 7709 times)

0 Members and 2 Guests are viewing this topic.

Roy Batty

  • Guest
Simple Way to Use Dev C++ for Arduino?
« on: January 08, 2017, 12:13:59 am »
So long, and thanks for all the fish.
« Last Edit: June 25, 2017, 03:20:26 pm by Roy Batty »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9915
  • Country: us
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #1 on: January 08, 2017, 02:18:39 am »
I don't know about Dev C++ but there is an add-in for the free Community Version of Microsoft Visual Studio.  It works well!

And, yes, just about ANY IDE is better than the Arduino IDE.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4247
  • Country: us
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #2 on: January 08, 2017, 05:23:33 am »
Quote
I can always write in Dev C++ and paste it iin Arduino. Just wondered if there was a well-known obvious way to do the whole thing in Dev C++.
Arduino also has a "use external editor" feature that you can check in the "preferences" dialog.  In this mode, you can use your choice of editor, and the Arduino IDE just turns into a one-button upload/compile application.  It will gray out the window, prevent you from making "local" changes, and re-read the sketch whenever it has changed on disk.  it works REALLY WELL, for such a simple feature...
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #3 on: January 08, 2017, 10:22:16 am »
It looks like you can configure Dev-C++ to compile for Arduino with avr-gcc. That just leaves the step of running avrdude to be done manually. Probably there is a way to run it from Dev-C++ as well.

An IDE for C++ written in Delphi, ironic :)
Bob
"All you said is just a bunch of opinions."
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20140
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #4 on: January 08, 2017, 10:38:33 am »
Is there some simple way to get Dev C++ to work with Arduino?

There is no simple way to get C++ to work with anything; it is a very complex tool and there are many subtle pitfalls for the beginner and for the expert.

To begin to get an appreciation, read and understand the Frequently Questioned Answers. Once you understand those points, you can move onto the various C++ language groups.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 20140
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #5 on: January 08, 2017, 05:16:14 pm »
Thanks for all the help. It looks like copying and pasting will work about as well as anything.

For some definition of 'work', but how will you know?
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #6 on: January 08, 2017, 05:32:15 pm »
I don't know about Dev C++ but there is an add-in for the free Community Version of Microsoft Visual Studio.  It works well!

And, yes, just about ANY IDE is better than the Arduino IDE.

 Well I for one will disagree with your subjective opinion. For a raw beginner to electronics or C++ programming I think there is no better IDE to START with then the Arduino IDE. Once one needs or wants to move onto another 'better' C++ IDE, they will know why and when to move on. But for starting a journey with microcontrollers and C++ programming there is no better choice then the Arduino IDE.

 Funny how opinions can vary and that they are all probably correct for each individual.  :-+
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #7 on: January 08, 2017, 08:13:23 pm »
[...]
I have a question. Is there some simple way to get Dev C++ to work with Arduino? I find it easier to read than the Arduino application.

I can always write in Dev C++ and paste it iin Arduino. Just wondered if there was a well-known obvious way to do the whole thing in Dev C++.

Sorry that i can't answer your question directly. However, there is another alternative to Arduino IDE that many including myself find preferable: Atmel Studio + Visual Micro extension. Outwardly it looks a lot like Dev C++ with all the bells and whistles normally associated with a modern IDE.

Both are free to use; just go and download Studio from Atmel website, install the VM extension (can be done from withing the Studio) and blast away.
As an added bonus you now have a full IDE to write code for any Atmel processor, not just the Arduinos.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #8 on: January 08, 2017, 10:07:20 pm »
That is called syntax highlighting. It is half a lifetime ago since i used Turbo Pascal last - can't recall if it has anything like that. But Atmel Studio sure does. It will highlight your code in color (configurable i think although never tried), it has autoindent and autocompletion as well as keyword highlighting (when your cursor is over a variable name, all occurrences are highlighted). It also follows references when you double click them so if you need to see how a function is implemented, just double click a call and Studio will open the releant source file.
« Last Edit: January 08, 2017, 10:12:14 pm by Kremmen »
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9915
  • Country: us
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #9 on: January 08, 2017, 10:56:56 pm »
I decided to try Visual Studio Community. I look forward to trying it some time in 2018, when it finishes installing.

How odd you should mention that...  Installation takes forever!
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9915
  • Country: us
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #10 on: January 09, 2017, 02:25:02 pm »
Right!  You want a candy bar, the program is designed to cure world hunger!

The program will work with Makefile projects so it is possible to use the VS IDE for just about anything even without a specific plug-in.  Some years back, I used it to write code for an AVR based Teensy board which interfaced to switches, knobs and dials and sent USB HID packets to a PC.  I also wrote the PC end of the app in C such that I could interface physical hardware wth Microsoft Flight Simulator.  The neat thing is that the entire project was developed using the same IDE.

Eclipse is another nice IDE that works with Makefiles.  I'm using it for both ARM and PC projects.
 

Offline kerrsmith

  • Regular Contributor
  • *
  • Posts: 77
  • Country: 00
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #11 on: January 09, 2017, 02:49:48 pm »
I usually use Visual Studio Community when programming my Arduinos. It has live error checking and will format your code very neatly with the click of a button.

https://www.visualstudio.com/vs/visual-studio-2017-rc/

In order to actually upload a program to the Arduino you just need to install the Visual Micro plugin:

http://www.visualmicro.com/page/Arduino-Visual-Studio-Downloads.aspx

This plugin adds a toolbar with all the required options such as hardware type (Arduino Uno for example), COM port, upload and serial monitor plus several other useful options (basically all the ones you get in the standard Arduino editor).

This combination makes creating code much easier as it is neat and you spot coding errors and typos immediately as they are highlighted in red.

If you get stuck the Visual Micro forum is very friendly and helpful:

http://www.visualmicro.com/forums/
« Last Edit: January 09, 2017, 02:52:59 pm by kerrsmith »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4247
  • Country: us
Re: Simple Way to Use Dev C++ for Arduino?
« Reply #12 on: January 10, 2017, 12:52:11 am »
Quote
What I recall about [turbo pascal] (maybe incorrectly) is that it was easy to read, indenting things and using colored fonts to make it easier to see what went with what.
I was hoping there was something similar (and free) for C.
Doesn't the Arduino IDE do that?  It has keyword highlighting rather than true syntax coloring, and a rather "fixed" idea of correct formatting/indenting, but it's got the basics.

The Arduino IDE does a number of non-editing related things "behind the scenes", including function prototype creation and library path derivation.  Using another IDE will require some replacement for those capabilities, either manual effort or special hooks.

There was a Turbo-C at one time (from Borland, the same company that brought you Turbo-Pascal.)  It does PC programs only, though.  If you're interested in writing C programs for a PC environment, there are a separate set of IDEs that you might find useful, including a FREE DOWNLOAD of an old version of Turbo-C.  (It looks like it's a hopelessly ancient DOS program to me, but YMMV.)

Quote
I decided to try Visual Studio Community. I look forward to trying it some time in 2018, when it finishes installing.
For all the complaints about the Arduino IDE, it's about 1/10th the size and 1/10th the install time and effort compared to a bunch of near competitors.  I've only actually measured Atmel Studio and Microchip MPLAB-X, but they both ran 3-5 GB in size.  (the AS7 install is a big improvement over the AS6 install.  Now it remembers that you accepted the license(s), instead of needing your input every 30 minutes or so.  So you can mostly start it up and leave it...)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf