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 [2016/04/06 21:43]
dokuwikiadmin
arduino [2018/03/26 00:45] (aktuell)
karl [C++ new operator]
Zeile 18: Zeile 18:
   * add #include <Arduino.h>   * add #include <Arduino.h>
  
-Now you are ready to go!+Now you are ready to go! \\ 
 +If you want to open this project in Arduino IDE, rename the .cpp file back to .ino
  
  
Zeile 232: Zeile 233:
 Most useful is the placement operator for static allocated memory.  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.1459971820.txt.gz · Zuletzt geändert: 2016/04/06 21:43 von dokuwikiadmin