'arduino', 'label' => 'Arduino', 'icon' => 'fas fa-code', 'color' => '#ffffff', 'background' => '#00979d', 'description' => 'Fichier contenant du langage arduino (proche du c++)', 'fromExtension' => array('ino'), 'toExtension' => 'ino', 'default' => ' void setup() { Serial.begin(9600); Serial.println("Starting.."); //pinMode(1, INPUT); //pinMode(2, OUTPUT); } void loop() { }', ); } /* EDITION */ public static function toHtml($resource,$sketch=null){ $infos = self::manifest(); return array( 'html'=>'', 'javascript' => " hackpoint_resource_mirrorify('.arduino-text',{ mode : 'text/x-carduino', lineNumbers : true, theme : 'monokai', readOnly : false }); " ); } //Export vers un fichier brut public static function toFile($resource){ $infos = self::manifest(); return array( 'name'=> slugify($resource->label).'.'.$infos['toExtension'], 'content' => html_entity_decode($resource->content) ); } } ?>