Closed probonopd closed 6 years ago
This seems to be an important one, I'm researching adding a definition, but am starting at nothing, please feel free to help!
Edit: I'm running into the same issue trying to get https://github.com/octoblu/microblu_mqtt running on the ESP8266
I tried this hack around and it seems to have worked for now (IOW I'm getting other errors now):
(in sketch for now)
(in boards.h before "// anything else")
// ESP8266
I think that my cavalier copying of the text above, which did fix my compilation errors, is causing me other problems.
If someone more experienced can help me figure out the right config for this board I would appreciate it.
is there any update on this? support for firmata is really missed/would be great!
Hello, some time ago I was playing with Firmata and successfully used on it with Snap4Arduino.
The problem in definition is that Serial pins are defined as digital pins. They have to be excluded from definition. I used this one
// ESP8266
// note: boot mode GPIOs 0, 2 and 15 can be used as outputs, GPIOs 6-11 are in use for flash IO
#elif defined(ESP8266)
#define TOTAL_ANALOG_PINS NUM_ANALOG_INPUTS
#define TOTAL_PINS A0 + NUM_ANALOG_INPUTS
#define PIN_SERIAL_RX 3
#define PIN_SERIAL_TX 1
#define IS_PIN_DIGITAL(p) (((p) >= 0 && (p) <= 5) || ((p) >= 12 && (p) < A0))
#define IS_PIN_ANALOG(p) ((p) >= A0 && (p) < A0 + NUM_ANALOG_INPUTS)
#define IS_PIN_PWM(p) digitalPinHasPWM(p)
#define IS_PIN_SERVO(p) (IS_PIN_DIGITAL(p) && (p) < MAX_SERVOS)
#define IS_PIN_I2C(p) ((p) == SDA || (p) == SCL)
#define IS_PIN_SPI(p) ((p) == SS || (p) == MOSI || (p) == MISO || (p) == SCK)
#define IS_PIN_INTERRUPT(p) (digitalPinToInterrupt(p) > NOT_AN_INTERRUPT)
#define IS_PIN_SERIAL(p) ((p) == PIN_SERIAL_RX || (p) == PIN_SERIAL_TX)
#define PIN_TO_DIGITAL(p) (p)
#define PIN_TO_ANALOG(p) ((p) - A0)
#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)
#define PIN_TO_SERVO(p) (p)
#define DEFAULT_PWM_RESOLUTION 10
3rd party lib. The referenced file above is no longer hosted in this repo. Closing.
Firmata errors with
Possibly https://github.com/esp8266/Arduino/blob/esp8266/libraries/Firmata/src/Boards.h could be changed to support the esp8266?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.