ESP8266 Firmata Probleme beim kompilieren

Hallo liebe Leute. Ich versuche mich gerade an Firmata für den ESP8266. Leider kriege ich mehrere Fehler beim kompilieren.

Folgendes Setup:

IDE 1.6.5 frisch installiert. Über den Boardmanager ESP8266 genommen

https://github.com/Familienpapi/ESP8266ConfigurableFirmata hiervon die Library installiert.#

Danach wähle ich den ESP8266 aus und öffne das Beispielsketch. Beim kompilieren kriege ich folgenden Fehler. Den Firmata Ordner hatte ich vorher gelöscht, weil es den Fehler gab das Firmata.h 2 mal vorhanden ist.

Arduino: 1.6.5 (Windows 7), Platine: "Generic ESP8266 Module, Serial, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS)"

Build-Optionen wurden verändert, alles wird neu gebaut

ESP8266ConfigurableFirmata:105: error: 'Serial' does not name a type ESP8266ConfigurableFirmata:106: error: expected constructor, destructor, or type conversion before '(' token ESP8266ConfigurableFirmata:107: error: 'Serial' does not name a type ESP8266ConfigurableFirmata:108: error: expected unqualified-id before 'if' ESP8266ConfigurableFirmata:111: error: expected unqualified-id before 'if' ESP8266ConfigurableFirmata:112: error: 'WiFi' does not name a type ESP8266ConfigurableFirmata:113: error: expected constructor, destructor, or type conversion before '(' token ESP8266ConfigurableFirmata:114: error: 'WiFi' does not name a type ESP8266ConfigurableFirmata:115: error: expected constructor, destructor, or type conversion before '(' token ESP8266ConfigurableFirmata:116: error: 'WiFi' does not name a type ESP8266ConfigurableFirmata:117: error: expected constructor, destructor, or type conversion before '(' token ESP8266ConfigurableFirmata:118: error: expected unqualified-id before 'if' ESP8266ConfigurableFirmata:120: error: 'EthernetClientStream' does not name a type 'Serial' does not name a type

Dieser Report hätte mehr Informationen mit "Ausführliche Ausgabe während der Kompilierung" aktiviert in Datei > Einstellungen

/*
 * Firmata is a generic protocol for communicating with microcontrollers
 * from software on a host computer. It is intended to work with
 * any host computer software package.
 *
 * To download a host software package, please click on the following link
 * to open the download page in your default browser.
 *
 * http://firmata.org/wiki/Download
 */

/*
  Copyright (C) 2006-2008 Hans-Christoph Steiner.  All rights reserved.
  Copyright (C) 2010-2011 Paul Stoffregen.  All rights reserved.
  Copyright (C) 2009 Shigeru Kobayashi.  All rights reserved.
  Copyright (C) 2009-2013 Jeff Hoefs.  All rights reserved.
  Copyright (C) 2013 Norbert Truchsess. All rights reserved.
  Copyright (C) 2014 Nicolas Panel. All rights reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  See file LICENSE.txt for further informations on licensing terms.

  formatted using the GNU C formatting and indenting
*/

/*
  This version is for the ESP8266 generic only
  brought to you by Familienpapi
*/

#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <WiFiClient.h>
#include <Firmata.h>

// *** Debugging
bool debug = true;
int serialBaud = 115200;

// *** WiFi Credentials
const char* wifiSSID = "SSID";
const char* wifiPASS = "PASS";

// *** Firmata partner
#define remote_ip IPAddress (192,168,1,1)
#define remote_port 12345 

// comment out what you don't need

#include <utility/DigitalInputFirmata.h>
DigitalInputFirmata digitalInput;

#include <utility/DigitalOutputFirmata.h>
DigitalOutputFirmata digitalOutput;

//#include <utility/AnalogInputFirmata.h>
//AnalogInputFirmata analogInput;

//#include <utility/AnalogOutputFirmata.h>
//AnalogOutputFirmata analogOutput;

//#include <Servo.h> //wouldn't load from ServoFirmata.h in Arduino1.0.3
//#include <utility/ServoFirmata.h>
//ServoFirmata servo;

//#include <Wire.h> //wouldn't load from I2CFirmata.h in Arduino1.0.3
//#include <utility/I2CFirmata.h>
//I2CFirmata i2c;

//#include <utility/OneWireFirmata.h>
//OneWireFirmata oneWire;

//#include <utility/StepperFirmata.h>
//StepperFirmata stepper;

//#include <utility/FirmataExt.h>
//FirmataExt firmataExt;

//#include <utility/FirmataScheduler.h>
//FirmataScheduler scheduler;

//#include <utility/EncoderFirmata.h>
//EncoderFirmata encoder;


/*
 * no further changes necessary
 */

// dependencies. Do not comment out the following lines
#if defined AnalogOutputFirmata_h || defined ServoFirmata_h
#include <utility/AnalogWrite.h>
#endif

#if defined AnalogInputFirmata_h || defined I2CFirmata_h || defined EncoderFirmata_h
#include <utility/FirmataReporting.h>
FirmataReporting reporting;
#endif

// init serial output
Serial.begin(serialBaud, SERIAL_8N1);
delay(500);
Serial.println();
if (debug) {Serial.println(); Serial.println("ESP : Welcome to ESP8266ConfigurableFirmata"); Serial.println("ESP : let's start");}

// Wifi initializing
if (debug) {Serial.println("WiFi: start");}
WiFi.mode(WIFI_STA);
delay(500);
WiFi.disconnect();
delay(5000);
WiFi.begin(wifiSSID, wifiPASS);
delay(3000);
if (debug) {Serial.println("WiFi: initialized");}
WiFiClient client;
EthernetClientStream stream(client, IPAddress(0, 0, 0, 0), remote_ip, NULL, remote_port);

/*==============================================================================
 * FUNCTIONS
 *============================================================================*/

void systemResetCallback() {
  // initialize a defalt state

  // pins with analog capability default to analog input
  // otherwise, pins default to digital output
  for (byte i = 0; i < TOTAL_PINS; i++) {
    if (IS_PIN_ANALOG(i)) {
#ifdef AnalogInputFirmata_h
      // turns off pullup, configures everything
      Firmata.setPinMode(i, ANALOG);
#endif
    } else if (IS_PIN_DIGITAL(i)) {
#ifdef DigitalOutputFirmata_h
      // sets the output to 0, configures portConfigInputs
      Firmata.setPinMode(i, OUTPUT);
#endif
    }
  }

#ifdef FirmataExt_h
  firmataExt.reset();
#endif
}

/*==============================================================================
 * SETUP()
 *============================================================================*/

void setup() {
#ifdef NETWORK_FIRMATA
  Firmata.setFirmwareVersion(FIRMATA_MAJOR_VERSION, FIRMATA_MINOR_VERSION);
#endif

#if defined AnalogOutputFirmata_h || defined ServoFirmata_h
  /* analogWriteCallback is declared in AnalogWrite.h */
  Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
#endif

#ifdef FirmataExt_h
#ifdef DigitalInputFirmata_h
  firmataExt.addFeature(digitalInput);
#endif

#ifdef DigitalOutputFirmata_h
  firmataExt.addFeature(digitalOutput);
#endif

#ifdef AnalogInputFirmata_h
  firmataExt.addFeature(analogInput);
#endif

#ifdef AnalogOutputFirmata_h
  firmataExt.addFeature(analogOutput);
#endif

#ifdef ServoFirmata_h
  firmataExt.addFeature(servo);
#endif

#ifdef I2CFirmata_h
  firmataExt.addFeature(i2c);
#endif

#ifdef OneWireFirmata_h
  firmataExt.addFeature(oneWire);
#endif

#ifdef StepperFirmata_h
  firmataExt.addFeature(stepper);
#endif

#ifdef FirmataReporting_h
  firmataExt.addFeature(reporting);
#endif

#ifdef FirmataScheduler_h
  firmataExt.addFeature(scheduler);
#endif

#ifdef EncoderFirmata_h
  firmataExt.addFeature(encoder);
#endif

#endif

  /* systemResetCallback is declared here (in ConfigurableFirmata.ino) */
  Firmata.attach(SYSTEM_RESET, systemResetCallback);

  // Network Firmata communicates with Ethernet-shields over SPI. Therefor all
  // SPI-pins must be set to IGNORE. Otherwise Firmata would break SPI-communication.
  // add Pin 10 and configure pin 53 as output if using a MEGA with Ethernetshield.
  // No need to ignore pin 10 on MEGA with ENC28J60, as here pin 53 should be connected to SS:
#ifdef NETWORK_FIRMATA
  // ignore SPI and pin 4 that is SS for SD-Card on Ethernet-shield
  for (byte i = 0; i < TOTAL_PINS; i++) {
    if (IS_PIN_SPI(i)
        || 4 == i
        // || 10==i //explicitly ignore pin 10 on MEGA as 53 is hardware-SS but Ethernet-shield uses pin 10 for SS
       ) {
      Firmata.setPinMode(i, IGNORE);
    }
  }
  //  pinMode(PIN_TO_DIGITAL(53), OUTPUT); configure hardware-SS as output on MEGA
  pinMode(PIN_TO_DIGITAL(4), OUTPUT); // switch off SD-card bypassing Firmata
  digitalWrite(PIN_TO_DIGITAL(4), HIGH); // SS is active low;

  // start up Network Firmata:
  Firmata.begin(stream);
#else
  // start up the default Firmata using Serial interface:
  Firmata.begin(57600);
#endif
  systemResetCallback();  // reset to default config
}

/*==============================================================================
 * LOOP()
 *============================================================================*/
void loop()
{
#ifdef DigitalInputFirmata_h
  /* DIGITALREAD - as fast as possible, check for changes and output them to the
   * stream buffer using Firmata.write()  */
  digitalInput.report();
#endif

  /* STREAMREAD - processing incoming messagse as soon as possible, while still
   * checking digital inputs.  */
  while (Firmata.available()) {
    Firmata.processInput();
#ifdef FirmataScheduler_h
    if (!Firmata.isParsingMessage()) {
      goto runtasks;
    }
  }
  if (!Firmata.isParsingMessage()) {
runtasks: scheduler.runTasks();
#endif
  }

  /* SEND STREAM WRITE BUFFER - TO DO: make sure that the stream buffer doesn't go over
   * 60 bytes. use a timer to sending an event character every 4 ms to
   * trigger the buffer to dump. */

#ifdef FirmataReporting_h
  if (reporting.elapsed()) {
#ifdef AnalogInputFirmata_h
    /* ANALOGREAD - do all analogReads() at the configured sampling interval */
    analogInput.report();
#endif
#ifdef I2CFirmata_h
    // report i2c data for all device with read continuous mode enabled
    i2c.report();
#endif
#ifdef EncoderFirmata_h
    // report encoders positions if reporting enabled.
    encoder.report();
#endif
  }
#endif
#ifdef StepperFirmata_h
  stepper.update();
#endif
#if defined NETWORK_FIRMATA && !defined local_ip &&!defined _YUN_CLIENT_H_
  if (Ethernet.maintain())
  {
    stream.maintain(Ethernet.localIP());
  }
#endif
}

ESP8266ConfigurableFirmata.ino (8.04 KB)