Skip to content

Commit

Permalink
Merge pull request #55 from firmata/wifi-update
Browse files Browse the repository at this point in the history
update Wi-Fi transport implementation
  • Loading branch information
soundanalogous committed Jul 17, 2016
2 parents 7c324a1 + 2b4dba5 commit 4bd34ef
Show file tree
Hide file tree
Showing 8 changed files with 603 additions and 594 deletions.
407 changes: 238 additions & 169 deletions examples/ConfigurableFirmataWiFi/ConfigurableFirmataWiFi.ino

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions src/utility/Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,29 @@ writePort(port, value, bitmask): Write an 8 bit port.
#define PIN_TO_SERVO(p) ((p) - 2)



// 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


// anything else
#else
#error "Please edit Boards.h with a hardware abstraction for this board"
Expand Down
4 changes: 0 additions & 4 deletions src/utility/WiFi101Stream.cpp

This file was deleted.

259 changes: 0 additions & 259 deletions src/utility/WiFi101Stream.h

This file was deleted.

Loading

0 comments on commit 4bd34ef

Please sign in to comment.