Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Hot answers tagged

63

There is an Arduino Eclipse plugin named sloeber! And Eclipse is an awesome cross-platform open-source IDE! Stino is good. It requires Sublime Text 2 which has an indefinite free trial. Visual Micro provides a full build system with debugger for Arduino in Microsoft Visual Studio. For advanced users it also allows the underlying Arduino source code to be ...


26

Expanding on Fake Name's answer, there is also Visual Micro's Arduino plugin for Atmel Studio (built off Visual Studio). It shares the tools, sources and libraries with the Arduino IDE but provides all the code completion and other features of Visual Studio. The Visual Micro plugin also works in all versions of Visual Studio. Provides Arduino usb debugging ...


20

vim can be used for Arduino development, but it will take some configuration (as is the way of vim). You'll need the syntax file and this plugin that enables you to compile and deploy from vim. Grant Lucas produced a great write-up on getting your environment situation squared away: Using Vim for Arduino development Here's a quick post on setting up ...


20

You can use AVR Studio to write programs for Arduinos. There is a plugin that lets you link against and use the arduino libraries from within Atmel Studio. If you've used Microsoft Visual Studio, Atmel Studio is basically a reskin of Visual studio with different compiler backends that target the ATmega series of devices, so you'll feel right at home.


17

One rather good IDE extension is the Arduino Mode for Emacs. It allows using a highly versatile and extensible IDE such as Emacs for writing, compiling and uploading code to the Arduino. The documentation and instructions can be found here.


17

There is a half way solution as well since the Arduino IDE has support for external a editor, then the Arduio IDE just compiles and uploads. Now you can use whatever IDE/editor you like to edit the code, and then you switch back to the Arduino IDE to press the compile and upload button when you are done.


13

If you want an exact duplication of what the IDE does but want it driven from the command line, that's what Ino is for. The full Arduino build process involves copying a lot of files from a lot of places, and is generally not trivial to duplicate. If you're ready to let go of .ino files and the Arduino libraries, you get a much simpler toolset. avr-gcc ...


12

You can easily use notepad++ or any text editor to edit arduino code files (.pde or .ino). I use the sublime text editor for all my arduino coding. As you noted, the arduino syntax is c++, so setting the syntax highlighting mode to c++ is all that you need to do; no mod should be necessary. Arduino includes a "Use external editor" option in the preferences ...


12

UPDATE-> Codebender is being shut down. There is a brilliant open source, web based IDE called Codebender It is like Github for Arduino and has a great community working from it with thousands of examples and the dev team are exceptional. With codebender, you can: program an existing sketch to your device clone an existing sketch modfy it to your ...


12

Yes! Its possible that you can upload a previously complied binary, using AVRDUDE - a command line utility which is actually used to upload binaries, behind the arduino IDE. You can find AVRDUDE in Arduino folder > hardware > tools > avr > bin This some documentation for AVRDUDE http://www.nongnu.org/avrdude/user-manual/avrdude.html else simplest ...


11

Majenko created and maintains UECIDE. His contributions are pretty epic; I've seen first hand his coding prowess as we worked together to get the Adafruit 1.8" TFT Joystick shield working on the chipKIT platform.


10

Thanks to @Majenko I looked some place new: documented in the arduino plugin of VS Code Arduino Extension there is an option to set an output directory. Note though that according to this it should not be in the workspace or subfolders. So in arduino.json settings file add: "output": "../ArduinoOutput"


8

There is one from Brazil called MariaMole: http://dalpix.com/mariamole According to the author, like the original Arduino environment, the MariaMole facilitates the creation of software for the Arduino. However, while the original Arduino IDE has limitations to make life easier for beginners, MariaMole brings features that more advanced users are accustomed ...


8

In addition to the mentioned IDEs you can use Xcode with embedXcode if you use a mac. The IDE has a great file structure and support for a lot of boards. For big and complex projects it is really good. I like to use vim or the arduino IDE for simpler and less complex sketches/projects.


8

The list of board symbols can be generated by this shell command: $ grep board= boards.txt | cut -f2 -d= | sort -u AVR_ADK AVR_BT AVR_DUEMILANOVE AVR_ESPLORA AVR_ETHERNET AVR_FIO AVR_GEMMA AVR_LEONARDO AVR_LILYPAD AVR_LILYPAD_USB AVR_MEGA AVR_MEGA2560 AVR_MICRO AVR_MINI AVR_NANO AVR_NG AVR_PRO AVR_ROBOT_CONTROL AVR_ROBOT_MOTOR AVR_UNO AVR_YUN The boards ...


7

Add this to your code at the beginning of set void setup(): //********** CHANGE PIN FUNCTION TO GPIO ********** //GPIO 1 (TX) swap the pin to a GPIO. pinMode(1, FUNCTION_3); //GPIO 3 (RX) swap the pin to a GPIO. pinMode(3, FUNCTION_3); //************************************************** You will no longer be able to use the Serial Monitor as TX will ...


6

I figured out a way to do this without having to port the compiler to iOS. It only works with the arduino Yún, but the Yún can send code to other arduinos with an spi cable. Install an SSH app on your device so you can communicate with the arduino Using that, install Ino on your Yún, a command line arduino compiler Create a file, put your code in it, then ...


6

The Arduino Uno uses the Atmel Atmega328p microcontroller, which only has one debug option, DebugWire. There are a few tools that can work with it, but the least expensive and most commonly available is the AVR Dragon. You can use AVR Studio 6 for this. You can use the .elf file file produced during the Arduino build process directly, but setting up the ...


6

You can workaround the issue by putting your enum and function into a namespace. You can even take advantage of C++ unnamed namespaces if you like: namespace { enum WhatArduinoIs { Easy, But, Insane, Obsolete, And, Far, Worse, Than, mBed }; void TellMe(WhatArduinoIs pls) { } } void setup() { } void loop() { } It's annoying (as are many things ...


6

To clarify the answer, for those new in arduino world +StudioCode (source: https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino ) The following settings are as per sketch settings of the Arduino extension. You can find them in .vscode/arduino.json under the workspace. { "sketch": "example.ino", "port": "COM5", "board"...


5

So... I want to debug the WaterMote sketch, but I do not see an option in my Arduino IDE on Mac OS X. Is there a way to debug sketches using Macs? Searching online shows various and preferred options, but mostly on Windows (of which I don't have any at home). It's definitely possible to debug a sketch with OS X. But it's definitely an advanced AVR ...


5

This is simply because the CH340G is not supported officially. The Arduino IDE is meant primarily for genuine Arduinos. What you could do is repackage the Arduino zip file with the required library and create a basic script file to install the drivers with just a couple of clicks. Or you could shift to another board that uses the ATMEGA32u4 as this might ...


5

I should mention that the CH340G are also used in many "Arduino Nano" clones from China. I believe that the Arduino company already has concerns about the number of unofficial clones (many pretending to be genuine) and have lost a considerable amount of revenue to those knock-off products. I imagine they are not going to make things worse for themselves ...


5

There are several problems with your program as shown that make a good answer impossible. After I list those problems, I'll then proceed to give an answer, partly good, partly bad. The good part is that the 432-bytes-of-code program shown below should send all the indicated text strings, in the proper order and separated by appropriate delays. The bad ...


5

I only use Visual Studio for Arduino programming. Arduino Plugin for Visual Studio


5

You need to "split" your library. Placing full functions inside a header file (.h) is bad form and causes the exact problem you are seeing. Every time you include the header file you create an entirely new copy of the function. This can only work if the functions are static, which means that they exist, and are contained entirely within, the function in ...


5

You don't need to abandon the Arduino IDE. Let me quote from my forum post about sketch sizes. Introduction Every now and again this subject pops up on the Arduino forum. Why does it take 1000 bytes to blink an LED? Why, oh why? It is obviously very bloated, eh? Example: blink Let's check that claim first. The "blink" sketch, as shipped with the IDE (...


4

I have always wanted to use Eclipse, since that is our standard (for Java) at work. But I never managed to get the debugger working with my AVR Dragon board - just too many layers between the source code and the chip. So I am back to using Atmel Studio. You can set the keyboard mapping to emulate various other IDEs (including Eclipse and Netbeans). I can ...


4

You can use any editor to write Arduino code. @BrettM has already detailed it. Instead of the external editor option, you can do away with the Arduino IDE completely using Makefile and build and upload your code yourself. Arduino IDE sucks. Ok, I admit it’s nice for beginners and for the click-and-forget kind of programmers, but it needs the full Java ...


4

You seem to be correct about what the arduino IDE is doing to your sketch. Arduino will not preprocess any .h or .cpp files, so you could use a second file. you could also break the IDE's function locating regex with a dummy throw() statement like this: void TellMe(WhatArduinoIs pls) throw() { } The dummy throw allows it to compile for me on 1.5.8


Only top voted, non community-wiki answers of a minimum length are eligible