Benutzer-Werkzeuge

Webseiten-Werkzeuge


arduino

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
arduino [2015/03/21 15:02]
karl [AVR ISP mkII with USB on Linux]
arduino [2018/03/26 00:45] (aktuell)
karl [C++ new operator]
Zeile 2: Zeile 2:
 10.12.2014 10.12.2014
  
-===== Sublime IDE =====+====== Eclipse Arduino IDE ====== 
 +4.4.2016 
 + 
 +https://www.youtube.com/watch?v=GZJ6UH_V_fg 
 + 
 +  * Download and extract Eclipse IDE for C/C++ Mars.2 
 +  * Go to Help->Eclipse Marketplace 
 +  * Install Arduino eclipse IDE V2 
 +  * Install AVR Eclipse Plugin V2.3.4 
 +  * Window -> Preferences -> Arduino: Point to your Arduino IDE installation (V1.6.5 recommended) 
 + 
 +===== New Project ===== 
 +  * Create a new Arduino Project 
 +  * rename your .ino file into .cpp 
 +  * add #include <Arduino.h> 
 + 
 +Now you are ready to go! \\ 
 +If you want to open this project in Arduino IDE, rename the .cpp file back to .ino 
 + 
 + 
 + 
 +====== Sublime IDE ======
 https://sublime.wbond.net/packages/Arduino-like%20IDE https://sublime.wbond.net/packages/Arduino-like%20IDE
  
 This should be great, since it has the sublime autocompletion, which is really missing in the original Arduiono IDE.  This should be great, since it has the sublime autocompletion, which is really missing in the original Arduiono IDE. 
  
-===== ino - The Command Line Interface =====+====== ino/Arturo - The Command Line Interface ======
 10.12.2014 10.12.2014
  
Zeile 20: Zeile 41:
   sudo pip install glob2 jinja2 pyserial configobj ordereddict argparse   sudo pip install glob2 jinja2 pyserial configobj ordereddict argparse
   sudo apt-get install python-serial   sudo apt-get install python-serial
 +  sudo make install
  
 Here is the documentation for it: \\ Here is the documentation for it: \\
 http://inotool.org/quickstart http://inotool.org/quickstart
 +
 +==== Update: ino forked into Arturo ====
 +since ino wasn't supported any more, a fork of the project named "Arturo" was created:
 +https://github.com/scottdarch/Arturo
 +
 +
  
 ==== ~/.inorc ==== ==== ~/.inorc ====
Zeile 43: Zeile 71:
  
 **Important:** Don't forget to define the arduino-dist for both, the build and the upload command. Otherwise the upload command doesn't find the correct build-path, which as a suffix which is generated from the arduino-dist-dir.  **Important:** Don't forget to define the arduino-dist for both, the build and the upload command. Otherwise the upload command doesn't find the correct build-path, which as a suffix which is generated from the arduino-dist-dir. 
 +
 +==== Error when moving host platform ====
 +Today I moved my ino-project to a new computer, and forgot to erase the .build directory. 
 +I got nothing-saying error messages like this:
 +<code>
 +karl@LackerServer:/xxxxxxxxxxxxxxx/yyyyyyyyyy$ ino build
 +Traceback (most recent call last):
 +  File "/usr/local/bin/ino", line 6, in <module>
 +    main()
 +  File "/usr/local/lib/python2.7/dist-packages/ino/runner.py", line 76, in main
 +    args.func(args)
 +  File "/usr/local/lib/python2.7/dist-packages/ino/commands/build.py", line 286, in run
 +    self.make('Makefile.sketch')
 +  File "/usr/local/lib/python2.7/dist-packages/ino/commands/build.py", line 216, in make
 +    ret = subprocess.call([self.e.make, '-f', makefile, 'all'])
 +  File "/usr/lib/python2.7/subprocess.py", line 493, in call
 +    return Popen(*popenargs, **kwargs).wait()
 +  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
 +    errread, errwrite)
 +  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
 +    raise child_exception
 +OSError: [Errno 2] No such file or directory
 +</code>
 +
 +
 ==== Compile existing project ==== ==== Compile existing project ====
 If we have an existing folder, with it's source files, we have to do a little adoption, so we can compile it with **ino**:\\ If we have an existing folder, with it's source files, we have to do a little adoption, so we can compile it with **ino**:\\
Zeile 132: Zeile 185:
 </code> </code>
  
-===== avrdude and AVR ISP mkII with USB on Linux =====+====== avrdude and AVR ISP mkII with USB on Linux ======
 unlike as decribed here, which is a bit more complicated unlike as decribed here, which is a bit more complicated
 http://stackoverflow.com/a/5414566 http://stackoverflow.com/a/5414566
Zeile 147: Zeile 200:
   sudo service udev restart   sudo service udev restart
  
-unplug the programmer and plig it in again. +unplug the programmer and plug it in again. 
 now avrdude can be used without sodo! now avrdude can be used without sodo!
  
Zeile 153: Zeile 206:
   avrdude -U flash:w:firmware.hex -p m328p -c avrispmkII -P usb   avrdude -U flash:w:firmware.hex -p m328p -c avrispmkII -P usb
  
-Without the USB permission, we must call it with sudo (which cannot be done by the Arduino IDE): 
-  sudo avrdude -U flash:w:firmware.hex -p m328p -c avrispmkII -P usb 
  
  
- +====== Fuse Bit Calculator ======
-===== Fuse Bit Calculator =====+
 http://www.engbedded.com/fusecalc/ http://www.engbedded.com/fusecalc/
  
-===== avrdude =====+====== avrdude ======
 ==== Example Invocations ==== ==== Example Invocations ====
 http://www.nongnu.org/avrdude/user-manual/avrdude_6.html http://www.nongnu.org/avrdude/user-manual/avrdude_6.html
  
 +====== Arduino and size optimization ======
 +  * http://blog.oscarliang.net/check-ram-memory-usage-arduino-optimization/ 
 +  * http://www.avrfreaks.net/forum/how-optimize-size
 +  * http://www.avrfreaks.net/forum/tut-c-gcc-and-progmem-attribute?name=PNphpBB2&file=viewtopic&t=38003
 +  * very interesting: PROGMEM and strings in flash with <code> PSTR("My String in flash")</code>  \\ access this string with <code> pgm_read_byte_near(str+i) </code>, where str is the pointer given by a PSTR()-expression. 
 +  * http://playground.arduino.cc/Main/CorruptArrayVariablesAndMemory
 +
 +====== Arduino IDE for the ESP8266 ======
 +https://github.com/esp8266/Arduino
 +
 +====== C++ new operator ======
 +Here is a great article about this topic. 
 +
 +http://arduino.land/FAQ/content/4/20/en/can-i-use-new-and-delete-with-arduino.html \\
 +http://www.cplusplus.com/reference/new/operator%20new/
 +
 +Most useful is the placement operator for static allocated memory. 
 +
 +<code,c++>
 +#include <new> // very important, otherwise you get helpless compile errors!
 +#include "memorydispenser.h"
 +
 +#define m(x) new (MemoryDispenser::get(sizeof(x))) x
 +
 +
 +// usage example:
 +JobController job = m(JobController(2));
 +</code>
  
 +{{tag>software english collection}}
arduino.1426946541.txt.gz · Zuletzt geändert: 2015/03/21 15:02 (Externe Bearbeitung)