Member Since: December 29, 2010

Country: United States

  • I’ve posted the open source to the Arduino library I wrote to filter out extraneous ESP8266 messages from HTTP responses. It uses the Sparkfun ESP8266 library. See with an example (not ready for Prime Time) Sketch that uses it in

    I’m using the ESP8266 Shield in a project to physically display the current phase of the moon.

  • Woops. That’s “\n0,CLOSED” that the board sends at the end of data.

  • My ESP8266 Shield is now working with my Arduino Mega 2560, with one exception which I’ll mention at the end of this comment.

    I first modified the Sparkfun 8266 library, to add serial port definitions for the Mega’s Serial1, Serial2, and Serial3 (all #if defined() the Mega2560 processor so that it would also compile on an Uno).

    Second I used hookup wire to connect the Shield pin 8 to the Mega pin 15 and Shield pin 9 to Mega pin 14 - the Mega’s Serial3 pins.

    I found I also had to cut the Shield header pins 8 and 9 to prevent them from connecting to the Mega pins 8 and 9. I’m not sure why I had to do that - I would expect those pins to be set to high-impedance with no pullup - but the board wouldn’t work with those pins in place.

    I then modified the Shield Demo Sketch to specify the Mega’s Serial3 port in the board begin() function.

    Voila! It successfully connected to my password-protected WiFi hotspot. I then modified the clientdemo() function in the Sketch because it assumed that the server’s response would be immediately available. I added a loop to wait for data from the Shield.

    Now it successfully reads and prints the contents of The one thing I still have to fix is fairly messy: the data read from the board includes the board data messages: “\n+IPD,0,1470:” and at the end a “\n0,CONNECT”. I’ll be adding a state-machine to the input processing to remove these strings.

    So with a little work, the board seems to work fine with an Arduino Mega 2650.

  • I’d love to know what others have done to connect this shield to an Arduino Mega 2560.

    So far I’ve found that the Mega doesn’t support software serial on pins 8 and 9 (the shield I/O) because those Mega pins don’t support Change Interrupts. See for details.

    I’m planning to 1) cut the shield’s header pins 8 and 9 so they don’t connect to the Arduino, 2) use hookup wire to connect the shield’s pin 8 and 9 to Mega pins that support software serial (for example pins 10 and 11) or hardware serial (for example pins 18 and 19), then 3) modify the Sparkfun Esp8266 library to work with the new pins.

    I’ll post again once I get it working.

  • For those connecting a USB-to-Serial cable like CAB-12977 to the Raspberry Pi B+ (or any Pi) console, avoid the newbie mistake of misconnecting transmit and receive: the connections should be: GPIO connector pin 6 to cable pin labeled GND; pin 8 (TXD0) to cable pin labeled RXD; pin 10 (RXD0) to cable pin labeled TXD.

    That is, connect transmit to receive and receive to transmit (duh); not transmit to transmit and receive to receive..

    Luckily, connecting transmit and receive backwards didn’t blow anything up.

  • All better now: the problem was that I’d left MEGA_SOFT_SPI turned on, which double-swizzled the pins when I used the Transmogri Sheild, making the SD not work. The CC3000 library has its own SPI library, which doesn’t seem to support soft SPI, so the Wifi was happy with the Transmogri shield.

    In summary: For Arduino Mega 2560 rev 3 + the MicroSD shield, the MEGA_SOFT_SPI solution works great for me. For Arduino Mega 2560 rev 3 + the CC3000 Wifi Shield, I found it better to put a Transmogri Shield between the Mega 2560 and the CC3000 Shield, and leave the SD library untouched (left MEGA_SOFT_SPI as 0)

    Thanks for your help - works great!

  • The Transmogri Shield gives me good news and bad news: the good news is that my Sparkfun Wifi CC3000 Shield wifi works great with my Arduino Mega 2560 with a Triansmogri Shield in between (which was what I wanted to do in the first place: wifi + SD). The bad news is that with the Aruindo Mega 2560, the Transmogri Sheid,, the SD card on the Wifi shield doesn’t seem to work, using either the stock SD library or the Sparkfun SD library with MEGA_SOFT_SPI turned on: The WebClientSD example fails to initialize the SD card. I think too many wires are being swizzled by too many things.

    Fortunately, I have several things to try out yet - I’ll let you know how it goes.

  • I have a question: to make the shield work with Arduino Mega 2560, could I make some hardware changes instead of modifying the SD library? From the schematic, it looks like it might work if I use some sort of headers to connect the Arduino Mega 2560’s ICSP pins to the shield ICSP holes, then cut the shield’s pins 11, 12, and 13.

    I think if I make these changes I should then be able to use the standard SD library, with pinMode(8, OUTPUT) and SD.begin(8) in my sketch.

    Is that correct? What headers should I use? Do you have headers that will plug into the ICSP 2x3 pins and extend them through the shield so I can do the same trick on a second, stacked shield?

  • Had to make some changes to make the shield work with Arduino Mega 2560. 1) In the SD library, in file Sd2Card.h, change MEGA_SOFT_SPI to 1 (rather than 0). 2) As described in the documentation, set pinMode(8, OUTPUT) and call SD.begin(8).

    The change to MEGA_SOFT_SPI makes the SD library use pins 11, 12, and 13. The pinMode and SD.begin changes make the SD library use the required pin 8. I didn’t have to make the recommended changes to pin 53 or pinMode(10, OUTPUT).

  • “I’m sad Mr. Dunlap is out with a bad case of ‘Friday Flu’ - whatever that is - but Captain Sparkfun is the coolest sub we’ve had in years!”

No public wish lists :(